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);
char event_name[2][PAPI_MAX_STR_LEN]
Empty and destroy an EventSet.
Return codes and api definitions.
Stop counting hardware events in an event set.
Create a new empty PAPI EventSet.
Start counting hardware events in an event set.
Query if PAPI event exists.
add PAPI preset or native hardware event to an event set
initialize the PAPI library.
int PAPI_destroy_eventset(int *EventSet)
Convert a numeric hardware event code to a name.
#define ERROR_RETURN(retval)
static long long values[NUM_EVENTS]
Set up an event set to begin registering overflows.
void handler(int EventSet, void *address, long long overflow_vector, void *context)