15#define MAX_sensors_ppc_EVENTS 64
17int main (
int argc,
char **argv )
21 int retval,cid,sensors_ppc_cid=-1,numcmp;
36 fprintf(
stderr,
"PAPI_library_init failed %d\n",
retval );
40 for( cid=0; cid<numcmp; cid++ ) {
42 fprintf(
stderr,
"PAPI_get_component_info failed cid=%d\n", cid);
43 if ( strstr( cmpinfo->
name,
"sensors_ppc" ) ) {
51 fprintf(
stderr,
"No sensors_ppc component found\n");
55 fprintf(
stderr,
"No counters in the sensors_ppc component\n");
60 fprintf(
stderr,
"PAPI_create_eventset()\n");
68 fprintf(
stderr,
"Error from PAPI_event_code_to_name, error = %d\n",
retval);
72 fprintf(
stderr,
"Error getting event info, error = %d\n",
retval);
74 char *evt =
"sensors_ppc:::VOLTVDD:occ=0";
86 fprintf(
stderr,
"No memory");
98 fprintf(
stderr,
"PAPI_cleanup_eventset(), error=%d\n",
retval );
102 fprintf(
stderr,
"PAPI_destroy_eventset(), error=%d\n",
retval );
static const char * event_names[2]
add PAPI preset or native hardware event to an event set
Empty and destroy an EventSet.
Create a new empty PAPI EventSet.
Empty and destroy an EventSet.
Enumerate PAPI preset or native events for a given component.
Convert a numeric hardware event code to a name.
get information about a specific software component
Get the event's name and description info.
initialize the PAPI library.
Get the number of components available on the system.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
static long long values[NUM_EVENTS]
Return codes and api definitions.
char units[MAX_EVENTS][BUFSIZ]
#define MAX_sensors_ppc_EVENTS
Tests basic functionality of sensors_ppc component.
char name[PAPI_MAX_STR_LEN]
char units[PAPI_MIN_STR_LEN]