11#define OVER_FMT "handler(%d ) Overflow at %p! bit=%#llx \n"
12#define THRESHOLD 100000
13#define ERROR_RETURN(retval) { fprintf(stderr, "Error %d %s:line %d: \n", retval,__FILE__,__LINE__); exit(retval); }
48 printf(
"Library initialization error! \n");
66 printf (
"PAPI_TOT_INS not available on this platform.");
67 printf (
" so subst PAPI_event with PAPI_TOT_CYC !\n\n");
87 printf (
"Here are the addresses at which overflows occurred and overflow vectors \n");
88 printf (
"--------------------------------------------------------------\n");
96 for (
i = 0;
i < 2000000;
i++)
107 printf (
"The total no of overflows was %d\n",
total);
#define ERROR_RETURN(retval)
void handler(int EventSet, void *address, long long overflow_vector, void *context)
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.
Convert a numeric hardware event code to a name.
initialize the PAPI library.
Set up an event set to begin registering overflows.
Query if PAPI event exists.
Finish using PAPI and free all related resources.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
char event_name[2][PAPI_MAX_STR_LEN]
static long long values[NUM_EVENTS]
Return codes and api definitions.