11#define THRESHOLD 100000
12#define ERROR_RETURN(retval) { fprintf(stderr, "Error %d %s:line %d: \n", retval,__FILE__,__LINE__); exit(retval); }
56 printf(
"Library initialization error! \n");
63 fprintf(
stderr,
"Error in get executable information \n");
80 fprintf(
stderr,
"Not enough memory \n");
119 printf(
"-----------------------------------------------------------\n");
120 printf(
"Text start: %p, Text end: %p, \n",
122 printf(
"Data start: %p, Data end: %p\n",
124 printf(
"BSS start : %p, BSS end: %p\n",
127 printf(
"------------------------------------------\n");
129 printf(
"Test type : \tPAPI_PROFIL_POSIX\n");
130 printf(
"------------------------------------------\n\n\n");
131 printf(
"PAPI_profil() hash table.\n");
132 printf(
"address\t\tflat \n");
136 printf(
"%#lx\t%d \n",
140 printf(
"-----------------------------------------\n");
146 printf(
"Test succeeds! \n");
148 printf(
"No information in buffers\n");
#define ERROR_RETURN(retval)
add PAPI preset or native hardware event to an event set
Create a new empty PAPI EventSet.
Get the executable's address space info.
initialize the PAPI library.
Generate a histogram of hardware counter overflows vs. PC addresses.
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]
#define PAPI_PROFIL_POSIX
#define PAPI_PROFIL_BUCKET_16
static long long values[NUM_EVENTS]
static struct timeval start
Return codes and api definitions.
get the executable's info
PAPI_address_map_t address_info