36 ( void ) overflow_vector;
39 fprintf(
stderr,
"handler(%d ) Overflow at %p, thread %#lx!\n",
70 if (!
TESTS_QUIET) printf(
"Trouble creating events\n");
71 test_skip(__FILE__,__LINE__,
"Creating events",0);
101 printf(
"Thread %#x %s : \t%lld\n", (
int ) pthread_self( ),
103 printf(
"Thread %#x PAPI_TOT_CYC: \t%lld\n", (
int ) pthread_self( ),
131 printf(
"%s: Using %d threads\n\n", argv[0],
NUM_THREADS );
132 printf(
"Does non-threaded overflow work "
133 "with extraneous threads present?\n" );
136 pthread_attr_init( &attr );
137#ifdef PTHREAD_CREATE_UNDETACHED
138 pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_UNDETACHED );
140#ifdef PTHREAD_SCOPE_SYSTEM
141 retval = pthread_attr_setscope( &attr, PTHREAD_SCOPE_SYSTEM );
149 test_fail( __FILE__, __LINE__,
"pthread_create",
rc );
151 pthread_attr_destroy( &attr );
Empty and destroy an 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.
Finish using PAPI and free all related resources.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
Get the thread identifier of the current thread.
char event_name[2][PAPI_MAX_STR_LEN]
static long long values[NUM_EVENTS]
void * thread_fn(void *dummy)
void handler(int EventSet, void *address, long long overflow_vector, void *context)
Return codes and api definitions.
unsigned long int pthread_t
int tests_quiet(int argc, char **argv)
int add_two_nonderived_events(int *num_events, int *papi_event, int *mask)
void free_test_space(long long **values, int num_tests)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
long long ** allocate_test_space(int num_tests, int num_events)
void PAPI_NORETURN test_pass(const char *filename)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)