16 char *EventName[] = {
"PAPI_TOT_CYC",
"PAPI_TOT_INS" };
63 printf(
"%12lld \t\t --> %s (thread %d) \n",
values[
i],
77int main(
int argc,
char **argv )
90 printf (
"PAPI_VERSION : %4d %6d %7d\n",
106 printf(
"ERROR: pthread_create: %d\n",
retval );
112 printf(
"Trying to join with tid %d\n",
i);
113 retval = pthread_join(tids[
i], &retval2);
115 printf(
"ERROR: pthread_join: %d\n",
retval );
118 printf(
"Joined with tid %d\n",
i);
add multiple PAPI presets or native hardware events to an event set
Create a new empty PAPI EventSet.
Convert a name to a numeric hardware event code.
initialize the PAPI library.
Notify PAPI that a thread has 'appeared'.
Finish using PAPI and free all related resources.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
Returns a string describing the PAPI error code.
Initialize thread support in the PAPI library.
Notify PAPI that a thread has 'disappeared'.
char events[MAX_EVENTS][BUFSIZ]
static long long values[NUM_EVENTS]
Return codes and api definitions.
#define PAPI_VERSION_REVISION(x)
#define PAPI_VERSION_MAJOR(x)
#define PAPI_VERSION_MINOR(x)
unsigned long int pthread_t