Go to the source code of this file.
◆ handler()
| void handler |
( |
int |
EventSet, |
|
|
void * |
address, |
|
|
long long |
overflow_vector, |
|
|
void * |
context |
|
) |
| |
Definition at line 34 of file overflow3_pthreads.c.
36 ( void ) overflow_vector;
39 fprintf( stderr,
"handler(%d ) Overflow at %p, thread %#lx!\n",
unsigned long PAPI_thread_id(void)
◆ main()
| int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 120 of file overflow3_pthreads.c.
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 );
void test_pass(const char *filename)
unsigned long int pthread_t
void test_skip(const char *file, int line, const char *call, int retval)
int tests_quiet(int argc, char **argv)
void * thread_fn(void *dummy)
void test_fail(const char *file, int line, const char *call, int retval)
◆ mainloop()
Definition at line 46 of file overflow3_pthreads.c.
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( ),
char event_name[2][PAPI_MAX_STR_LEN]
int PAPI_stop(int EventSet, long long *values)
int PAPI_overflow(int EventSet, int EventCode, int threshold, int flags, PAPI_overflow_handler_t handler)
void test_skip(const char *file, int line, const char *call, int retval)
int PAPI_library_init(int version)
void free_test_space(long long **values, int num_tests)
int PAPI_cleanup_eventset(int EventSet)
int PAPI_event_code_to_name(int EventCode, char *out)
void handler(int EventSet, void *address, long long overflow_vector, void *context)
void test_fail(const char *file, int line, const char *call, int retval)
int PAPI_destroy_eventset(int *EventSet)
int add_two_nonderived_events(int *num_events, int *papi_event, int *mask)
int PAPI_start(int EventSet)
static long long values[NUM_EVENTS]
long long ** allocate_test_space(int num_tests, int num_events)
◆ thread_fn()
| void* thread_fn |
( |
void * |
dummy | ) |
|
◆ total