|
PAPI
5.1.0.2
|

Go to the source code of this file.
Defines | |
| #define | PAPI_FCALL(function, caps, args) void function args |
Functions | |
| PAPI_FCALL (papif_accum, PAPIF_ACCUM,(int *EventSet, long long *values, int *check)) | |
| PAPI_FCALL (papif_add_event, PAPIF_ADD_EVENT,(int *EventSet, int *Event, int *check)) | |
| PAPI_FCALL (papif_add_named_event, PAPIF_ADD_NAMED_EVENT,(int *EventSet, char *EventName, int *check)) | |
| PAPI_FCALL (papif_add_events, PAPIF_ADD_EVENTS,(int *EventSet, int *Events, int *number, int *check)) | |
| PAPI_FCALL (papif_cleanup_eventset, PAPIF_CLEANUP_EVENTSET,(int *EventSet, int *check)) | |
| PAPI_FCALL (papif_create_eventset, PAPIF_CREATE_EVENTSET,(int *EventSet, int *check)) | |
| PAPI_FCALL (papif_assign_eventset_component, PAPIF_ASSIGN_EVENTSET_COMPONENT,(int *EventSet, int *cidx, int *check)) | |
| PAPI_FCALL (papif_destroy_eventset, PAPIF_DESTROY_EVENTSET,(int *EventSet, int *check)) | |
| PAPI_FCALL (papif_get_dmem_info, PAPIF_GET_DMEM_INFO,(long long *dest, int *check)) | |
| PAPI_FCALL (papif_get_exe_info, PAPIF_GET_EXE_INFO,(char *fullname, char *name, long long *text_start, long long *text_end, long long *data_start, long long *data_end, long long *bss_start, long long *bss_end, int *check)) | |
| PAPI_FCALL (papif_get_hardware_info, PAPIF_GET_HARDWARE_INFO,(int *ncpu, int *nnodes, int *totalcpus, int *vendor, char *vendor_string, int *model, char *model_string, float *revision, float *mhz)) | |
| #define PAPI_FCALL | ( | function, | |
| caps, | |||
| args | |||
| ) | void function args |
Definition at line 36 of file papi_fwrappers.c.
| PAPI_FCALL | ( | papif_accum | , |
| PAPIF_ACCUM | , | ||
| (int *EventSet, long long *values, int *check) | |||
| ) |
Definition at line 77 of file papi_fwrappers.c.
{
*check = PAPI_accum( *EventSet, values );
}

| PAPI_FCALL | ( | papif_add_event | , |
| PAPIF_ADD_EVENT | , | ||
| (int *EventSet, int *Event, int *check) | |||
| ) |
Definition at line 93 of file papi_fwrappers.c.
{
*check = PAPI_add_event( *EventSet, *Event );
}

| PAPI_FCALL | ( | papif_add_named_event | , |
| PAPIF_ADD_NAMED_EVENT | , | ||
| (int *EventSet, char *EventName, int *check) | |||
| ) |
Definition at line 118 of file papi_fwrappers.c.
{
*check = PAPI_add_named_event( *EventSet, EventName );
}

| PAPI_FCALL | ( | papif_add_events | , |
| PAPIF_ADD_EVENTS | , | ||
| (int *EventSet, int *Events, int *number, int *check) | |||
| ) |
Definition at line 135 of file papi_fwrappers.c.
{
*check = PAPI_add_events( *EventSet, Events, *number );
}

| PAPI_FCALL | ( | papif_cleanup_eventset | , |
| PAPIF_CLEANUP_EVENTSET | , | ||
| (int *EventSet, int *check) | |||
| ) |
Definition at line 151 of file papi_fwrappers.c.
{
*check = PAPI_cleanup_eventset( *EventSet );
}

| PAPI_FCALL | ( | papif_create_eventset | , |
| PAPIF_CREATE_EVENTSET | , | ||
| (int *EventSet, int *check) | |||
| ) |
Definition at line 167 of file papi_fwrappers.c.
{
*check = PAPI_create_eventset( EventSet );
}

| PAPI_FCALL | ( | papif_assign_eventset_component | , |
| PAPIF_ASSIGN_EVENTSET_COMPONENT | , | ||
| (int *EventSet, int *cidx, int *check) | |||
| ) |
Definition at line 183 of file papi_fwrappers.c.
{
*check = PAPI_assign_eventset_component( *EventSet, *cidx );
}

| PAPI_FCALL | ( | papif_destroy_eventset | , |
| PAPIF_DESTROY_EVENTSET | , | ||
| (int *EventSet, int *check) | |||
| ) |
Definition at line 199 of file papi_fwrappers.c.
{
*check = PAPI_destroy_eventset( EventSet );
}

| PAPI_FCALL | ( | papif_get_dmem_info | , |
| PAPIF_GET_DMEM_INFO | , | ||
| (long long *dest, int *check) | |||
| ) |
Definition at line 216 of file papi_fwrappers.c.
{
*check = PAPI_get_dmem_info( ( PAPI_dmem_info_t * ) dest );
}

| PAPI_FCALL | ( | papif_get_exe_info | , |
| PAPIF_GET_EXE_INFO | , | ||
| (char *fullname, char *name, long long *text_start,long long *text_end, long long *data_start, long long *data_end,long long *bss_start, long long *bss_end, int *check) | |||
| ) |
Definition at line 242 of file papi_fwrappers.c.
{
PAPI_option_t e;
/* WARNING: The casts from caddr_t to long below WILL BREAK on systems with
64-bit addresses. I did it here because I was lazy. And because I wanted
to get rid of those pesky gcc warnings. If you find a 64-bit system,
conditionalize the cast with (yet another) #ifdef...
*/
if ( ( *check = PAPI_get_opt( PAPI_EXEINFO, &e ) ) == PAPI_OK ) {
#if defined(_FORTRAN_STRLEN_AT_END)
int i;
strncpy( fullname, e.exe_info->fullname, ( size_t ) fullname_len );
for ( i = ( int ) strlen( e.exe_info->fullname ); i < fullname_len;
fullname[i++] = ' ' );
strncpy( name, e.exe_info->address_info.name, ( size_t ) name_len );
for ( i = ( int ) strlen( e.exe_info->address_info.name ); i < name_len;
name[i++] = ' ' );
#else
strncpy( fullname, e.exe_info->fullname, PAPI_MAX_STR_LEN );
strncpy( name, e.exe_info->address_info.name, PAPI_MAX_STR_LEN );
#endif
*text_start = ( long ) e.exe_info->address_info.text_start;
*text_end = ( long ) e.exe_info->address_info.text_end;
*data_start = ( long ) e.exe_info->address_info.data_start;
*data_end = ( long ) e.exe_info->address_info.data_end;
*bss_start = ( long ) e.exe_info->address_info.bss_start;
*bss_end = ( long ) e.exe_info->address_info.bss_end;
}
}

| PAPI_FCALL | ( | papif_get_hardware_info | , |
| PAPIF_GET_HARDWARE_INFO | , | ||
| (int *ncpu,int *nnodes,int *totalcpus,int *vendor,char *vendor_string,int *model,char *model_string,float *revision,float *mhz) | |||
| ) |
Definition at line 303 of file papi_fwrappers.c.
{
const PAPI_hw_info_t *hwinfo;
int i;
hwinfo = PAPI_get_hardware_info( );
if ( hwinfo == NULL ) {
*ncpu = 0;
*nnodes = 0;
*totalcpus = 0;
*vendor = 0;
*model = 0;
*revision = 0;
*mhz = 0;
} else {
*ncpu = hwinfo->ncpu;
*nnodes = hwinfo->nnodes;
*totalcpus = hwinfo->totalcpus;
*vendor = hwinfo->vendor;
*model = hwinfo->model;
*revision = hwinfo->revision;
*mhz = hwinfo->cpu_max_mhz;
#if defined(_FORTRAN_STRLEN_AT_END)
strncpy( vendor_str, hwinfo->vendor_string, ( size_t ) vendor_len );
for ( i = ( int ) strlen( hwinfo->vendor_string ); i < vendor_len;
vendor_str[i++] = ' ' );
strncpy( model_str, hwinfo->model_string, ( size_t ) model_len );
for ( i = ( int ) strlen( hwinfo->model_string ); i < model_len;
model_str[i++] = ' ' );
#else
(void)i; /* unused... */
/* This case needs the passed strings to be of sufficient size *
* and will include the NULL character in the target string */
strcpy( vendor_string, hwinfo->vendor_string );
strcpy( model_string, hwinfo->model_string );
#endif
}
return;
}
