26{
27
31 int code;
33 int total_events=0;
34 int r;
36
37
39
40
44 }
45
47
48 for(cid=0; cid<numcmp; cid++) {
49
51 test_fail(__FILE__, __LINE__,
"PAPI_get_component_info failed\n", 0);
52 }
54 printf(
"\tComponent %d - %s\n", cid, cmpinfo->
name);
55 }
56
57 if ( 0 != strncmp(cmpinfo->
name,
"host_micpower",13)) {
58 continue;
59 }
60
62
64
68 printf("Error translating %#x\n",code);
70 "PAPI_event_code_to_name",
retval );
71 }
72
74
76
80 "PAPI_create_eventset()",
retval);
81 }
82
86 "PAPI_add_event()",
retval);
87 }
88
92 }
93
97 }
98
100
104 "PAPI_cleanup_eventset()",
retval);
105 }
106
110 "PAPI_destroy_eventset()",
retval);
111 }
112
113 total_events++;
115 }
116 }
117
118 if (total_events==0) {
119
120 test_skip(__FILE__,__LINE__,
"No events from host_micpower found",0);
121 }
122
124
125 return 0;
126}
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
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.
char event_name[2][PAPI_MAX_STR_LEN]
#define NUM_EVENTS
Tests basic component functionality.
static long long values[NUM_EVENTS]
int tests_quiet(int argc, char **argv)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
void PAPI_NORETURN test_pass(const char *filename)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)
char name[PAPI_MAX_STR_LEN]