15 {
16
18
19 char *offcore_event=NULL;
21
24
25 long long total_values[1];
26
27
29
30
34 }
35
39 }
40
41
43 if (offcore_event==NULL) {
45 printf("No test event available on this processor\n");
46 }
48 "PAPI does not support offcore on this processor",
50 }
51
55 fprintf(
stderr,
"Error trying to add %s\n",offcore_event);
56 }
58 }
59
63 }
64
66
70 }
71
73 printf("\t%s count = %lld\n",offcore_event,total_values[0]);
74 }
75
77
78 return 0;
79}
add PAPI preset or native hardware event by name to an EventSet
Create a new empty PAPI EventSet.
initialize the PAPI library.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
char event_name[2][PAPI_MAX_STR_LEN]
char * get_offcore_event(char *event, int size)
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)