18{
19 (void) argv;
20 (void) argc;
21 int retval,cid,sensors_ppc_cid=-1,numcmp;
25 int code;
29
32
33
36 fprintf(
stderr,
"PAPI_library_init failed %d\n",
retval );
37
39
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" ) ) {
44 sensors_ppc_cid=cid;
45 break;
46 }
47 }
48
49
50 if ( cid==numcmp )
51 fprintf(
stderr,
"No sensors_ppc component found\n");
52
53
55 fprintf(
stderr,
"No counters in the sensors_ppc component\n");
56
57
60 fprintf(
stderr,
"PAPI_create_eventset()\n");
61
62
68 fprintf(
stderr,
"Error from PAPI_event_code_to_name, error = %d\n",
retval);
69
72 fprintf(
stderr,
"Error getting event info, error = %d\n",
retval);
73
74 char *evt = "sensors_ppc:::VOLTVDD:occ=0";
79 }
80
82 }
83
86 fprintf(
stderr,
"No memory");
87
89
91
94
95
98 fprintf(
stderr,
"PAPI_cleanup_eventset(), error=%d\n",
retval );
99
102 fprintf(
stderr,
"PAPI_destroy_eventset(), error=%d\n",
retval );
103
104 return 0;
105}
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]
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]