Go to the source code of this file.
◆ TOTAL_EVENTS
◆ case1()
| static int case1 |
( |
void |
| ) |
|
|
static |
Definition at line 407 of file multiplex1_pthreads.c.
static int PAPI_events[TOTAL_EVENTS]
static int PAPI_events_len
static int do_pthreads(void *(*fn)(void *))
static void * case1_pthreads(void *arg)
static void init_papi_pthreads(int *out_events, int *len)
◆ case1_pthreads()
| static void* case1_pthreads |
( |
void * |
arg | ) |
|
|
static |
Definition at line 139 of file multiplex1_pthreads.c.
161 printf(
"Added %s\n", out );
175 printf(
"case1 thread %4x:", (
unsigned ) pthread_self( ) );
177 printf(
"case1 thread %4x:", (
unsigned ) pthread_self( ) );
int PAPI_stop(int EventSet, long long *values)
int PAPI_add_event(int EventSet, int EventCode)
static int PAPI_events[TOTAL_EVENTS]
static int PAPI_events_len
void test_print_event_header(const char *call, int evset)
int PAPI_register_thread(void)
int PAPI_cleanup_eventset(int EventSet)
int PAPI_create_eventset(int *EventSet)
int PAPI_event_code_to_name(int EventCode, char *out)
int PAPI_unregister_thread(void)
void test_fail(const char *file, int line, const char *call, int retval)
int PAPI_destroy_eventset(int *EventSet)
int PAPI_start(int EventSet)
static long long values[NUM_EVENTS]
◆ case2()
| static int case2 |
( |
void |
| ) |
|
|
static |
Definition at line 422 of file multiplex1_pthreads.c.
static int PAPI_events[TOTAL_EVENTS]
static int PAPI_events_len
static int do_pthreads(void *(*fn)(void *))
static void init_papi_pthreads(int *out_events, int *len)
static void * case2_pthreads(void *arg)
◆ case2_pthreads()
| static void* case2_pthreads |
( |
void * |
arg | ) |
|
|
static |
Definition at line 196 of file multiplex1_pthreads.c.
215 test_fail(__FILE__, __LINE__,
"PAPI_assign_eventset_component",
retval );
220 test_skip(__FILE__, __LINE__,
"Multiplex not supported", 1);
226 printf(
"++case2 thread %4x:", (
unsigned ) pthread_self( ) );
237 printf(
"Added %s\n", out );
251 printf(
"case2 thread %4x:", (
unsigned ) pthread_self( ) );
253 printf(
"case2 thread %4x:", (
unsigned ) pthread_self( ) );
int PAPI_stop(int EventSet, long long *values)
int PAPI_add_event(int EventSet, int EventCode)
static int PAPI_events[TOTAL_EVENTS]
static int PAPI_events_len
void test_print_event_header(const char *call, int evset)
int PAPI_register_thread(void)
void test_skip(const char *file, int line, const char *call, int retval)
int PAPI_cleanup_eventset(int EventSet)
int PAPI_assign_eventset_component(int EventSet, int cidx)
int PAPI_create_eventset(int *EventSet)
int PAPI_event_code_to_name(int EventCode, char *out)
int PAPI_unregister_thread(void)
void test_fail(const char *file, int line, const char *call, int retval)
int PAPI_set_multiplex(int EventSet)
int PAPI_destroy_eventset(int *EventSet)
int PAPI_start(int EventSet)
static long long values[NUM_EVENTS]
◆ case3()
| static int case3 |
( |
void |
| ) |
|
|
static |
Definition at line 437 of file multiplex1_pthreads.c.
static int PAPI_events[TOTAL_EVENTS]
static int PAPI_events_len
static void * case3_pthreads(void *arg)
static int do_pthreads(void *(*fn)(void *))
static void init_papi_pthreads(int *out_events, int *len)
◆ case3_pthreads()
| static void* case3_pthreads |
( |
void * |
arg | ) |
|
|
static |
Definition at line 276 of file multiplex1_pthreads.c.
298 printf(
"Added %s\n", out );
303 test_skip(__FILE__, __LINE__,
"Multiplex not supported", 1);
320 printf(
"case3 thread %4x:", (
unsigned ) pthread_self( ) );
322 printf(
"case3 thread %4x:", (
unsigned ) pthread_self( ) );
int PAPI_stop(int EventSet, long long *values)
int PAPI_add_event(int EventSet, int EventCode)
static int PAPI_events[TOTAL_EVENTS]
static int PAPI_events_len
void test_print_event_header(const char *call, int evset)
int PAPI_register_thread(void)
void test_skip(const char *file, int line, const char *call, int retval)
int PAPI_cleanup_eventset(int EventSet)
int PAPI_create_eventset(int *EventSet)
int PAPI_event_code_to_name(int EventCode, char *out)
int PAPI_unregister_thread(void)
void test_fail(const char *file, int line, const char *call, int retval)
int PAPI_set_multiplex(int EventSet)
int PAPI_destroy_eventset(int *EventSet)
int PAPI_start(int EventSet)
static long long values[NUM_EVENTS]
◆ case4()
| static int case4 |
( |
void |
| ) |
|
|
static |
Definition at line 452 of file multiplex1_pthreads.c.
static int PAPI_events[TOTAL_EVENTS]
static int PAPI_events_len
static int do_pthreads(void *(*fn)(void *))
static void init_papi_pthreads(int *out_events, int *len)
static void * case4_pthreads(void *arg)
◆ case4_pthreads()
| static void* case4_pthreads |
( |
void * |
arg | ) |
|
|
static |
Definition at line 341 of file multiplex1_pthreads.c.
365 test_skip(__FILE__, __LINE__,
"Multiplex not supported", 1);
388 printf(
"case4 thread %4x:", (
unsigned ) pthread_self( ) );
390 printf(
"case4 thread %4x:", (
unsigned ) pthread_self( ) );
int PAPI_stop(int EventSet, long long *values)
int PAPI_add_event(int EventSet, int EventCode)
static int PAPI_events[TOTAL_EVENTS]
void test_print_event_header(const char *call, int evset)
int PAPI_register_thread(void)
void test_skip(const char *file, int line, const char *call, int retval)
int PAPI_cleanup_eventset(int EventSet)
int PAPI_create_eventset(int *EventSet)
int PAPI_event_code_to_name(int EventCode, char *out)
int PAPI_unregister_thread(void)
void test_fail(const char *file, int line, const char *call, int retval)
int PAPI_set_multiplex(int EventSet)
int PAPI_destroy_eventset(int *EventSet)
int PAPI_start(int EventSet)
static long long values[NUM_EVENTS]
◆ do_pthreads()
| static int do_pthreads |
( |
void *(*)(void *) |
fn | ) |
|
|
static |
Definition at line 107 of file multiplex1_pthreads.c.
113 pthread_attr_init( &attr );
114 #ifdef PTHREAD_CREATE_UNDETACHED 115 pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_UNDETACHED );
117 #ifdef PTHREAD_SCOPE_SYSTEM 118 retval = pthread_attr_setscope( &attr, PTHREAD_SCOPE_SYSTEM );
124 rc = pthread_create( &
id[
i], &attr, fn, NULL );
129 pthread_join(
id[
i], NULL );
131 pthread_attr_destroy( &attr );
unsigned long int pthread_t
void test_skip(const char *file, int line, const char *call, int retval)
◆ init_papi_pthreads()
| static void init_papi_pthreads |
( |
int * |
out_events, |
|
|
int * |
len |
|
) |
| |
|
static |
Definition at line 37 of file multiplex1_pthreads.c.
52 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info", 2 );
64 "PAPI_set_domain",
retval );
70 test_skip(__FILE__, __LINE__,
"Multiplex not supported", 1);
84 for (
i = 0; in_events[
i] != 0;
i++ ) {
89 out_events[real_len++] = in_events[
i];
91 if ( real_len == *len )
96 printf(
"%s does not exist\n", out );
100 if (!
TESTS_QUIET) printf(
"No counters available\n");
101 test_skip(__FILE__, __LINE__,
"No counters available", 0 );
static int solaris_preset_PAPI_events[TOTAL_EVENTS]
static int preset_PAPI_events[TOTAL_EVENTS]
void test_skip(const char *file, int line, const char *call, int retval)
int PAPI_thread_init(unsigned long int(*id_fn)(void))
int PAPI_library_init(int version)
static int power6_preset_PAPI_events[TOTAL_EVENTS]
char model_string[PAPI_MAX_STR_LEN]
int PAPI_event_code_to_name(int EventCode, char *out)
int PAPI_query_event(int EventCode)
int PAPI_multiplex_init(void)
void test_fail(const char *file, int line, const char *call, int retval)
int PAPI_set_domain(int domain)
const PAPI_hw_info_t * PAPI_get_hardware_info(void)
static const PAPI_hw_info_t * hw_info
◆ main()
| int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 467 of file multiplex1_pthreads.c.
476 printf(
"%s: Using %d threads\n\n", argv[0],
NUM_THREADS );
481 printf (
"case1: Does PAPI_multiplex_init() " 482 "not break regular operation?\n" );
491 printf(
"case2: Does setmpx/add work?\n" );
499 printf(
"case3: Does add/setmpx work?\n" );
507 printf(
"case4: Does add/setmpx/add work?\n" );
void test_pass(const char *filename)
int PAPI_library_init(int version)
int tests_quiet(int argc, char **argv)
void test_fail(const char *file, int line, const char *call, int retval)
◆ PAPI_events
◆ PAPI_events_len
◆ power6_preset_PAPI_events
◆ preset_PAPI_events
◆ solaris_preset_PAPI_events