46 int retval,
i, j = 2, skipped_counters=0;
73 test_fail( __FILE__, __LINE__,
"PAPI_assign_eventset_component",
79 test_skip(__FILE__, __LINE__,
"Multiplex not supported", 1);
94 if (!
TESTS_QUIET) printf(
"Trouble adding PAPI_TOT_INS\n");
99 printf(
"Added %s\n",
"PAPI_TOT_INS" );
106 printf(
"Added %s\n",
"PAPI_TOT_CYC" );
111 test_fail( __FILE__, __LINE__,
"malloc", 0 );
184 test_fail( __FILE__, __LINE__,
"all counter registered no counts", 1 );
210 printf(
"%s: Using %d threads\n\n", argv[0],
NUM_THREADS );
211 printf(
"Does non-threaded multiplexing work "
212 "with extraneous threads present?\n" );
218 pthread_attr_init( &attr );
219#ifdef PTHREAD_CREATE_UNDETACHED
220 pthread_attr_setdetachstate( &attr, PTHREAD_CREATE_UNDETACHED );
222#ifdef PTHREAD_SCOPE_SYSTEM
223 retval = pthread_attr_setscope( &attr, PTHREAD_SCOPE_SYSTEM );
230 sigemptyset( &sigprof );
231 sigaddset( &sigprof, SIGPROF );
240 test_fail( __FILE__, __LINE__,
"pthread_create",
rc );
242 pthread_attr_destroy( &attr );
add PAPI preset or native hardware event to an event set
Assign a component index to an existing but empty EventSet.
Empty and destroy an EventSet.
Create a new empty PAPI EventSet.
Empty and destroy an EventSet.
Get the event's name and description info.
initialize the PAPI library.
Initialize multiplex support in the PAPI library.
removes a hardware event from a PAPI event set.
Convert a standard event set to a multiplexed event set.
Finish using PAPI and free all related resources.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
Initialize thread support in the PAPI library.
static long long values[NUM_EVENTS]
void * thread_fn(void *dummy)
static void mainloop(int arg)
#define PAPI_MAX_PRESET_EVENTS
Return codes and api definitions.
unsigned long int pthread_t
int sigprocmask(int __how, const sigset_t *__restrict __set, sigset_t *__restrict __oset) __attribute__((__nothrow__
int tests_quiet(int argc, char **argv)
void test_print_event_header(const char *call, int evset)
void PAPI_NORETURN test_fail(const char *file, int line, const char *call, int retval)
void PAPI_NORETURN test_pass(const char *filename)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)
char symbol[PAPI_HUGE_STR_LEN]