12#define ERROR_RETURN(retval) { fprintf(stderr, "Error %d %s:line %d: \n", retval,__FILE__,__LINE__); exit(retval); }
42 printf(
"Library initialization error! \n");
53 printf(
"This machine has %d counters.\n",num);
87 printf(
" Total instructions: %lld Total Cycles: %lld \n",
values[0],
int poorly_tuned_function()
#define ERROR_RETURN(retval)
add PAPI preset or native hardware event to an event set
Create a new empty PAPI EventSet.
Get PAPI library or event set options.
initialize the PAPI library.
Set PAPI library or event set options.
Finish using PAPI and free all related resources.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
static long long values[NUM_EVENTS]
Return codes and api definitions.
A pointer to the following is passed to PAPI_set/get_opt()