54 test_fail( __FILE__, __LINE__,
"PAPI_get_hardware_info", 2 );
70 test_skip(__FILE__, __LINE__,
"Multiplex not supported", 1);
76 for (
i = 0; in_events[
i] != 0;
i++ ) {
81 out_events[real_len++] = in_events[
i];
83 if ( real_len == *len )
88 printf(
"%s does not exist\n", out );
93 if (!
TESTS_QUIET) printf(
"Trouble adding events\n");
94 test_skip(__FILE__,__LINE__,
"No counters available", 0 );
122 printf(
"Added %s\n", out );
168 test_fail(__FILE__,__LINE__,
"PAPI_assign_eventset_component",
retval );
172 test_skip(__FILE__, __LINE__,
"Multiplex not supported", 1);
185 printf(
"Added %s\n", out );
235 printf(
"Added %s\n", out );
240 test_skip(__FILE__, __LINE__,
"Multiplex not supported", 1);
296 test_skip(__FILE__, __LINE__,
"Multiplex not supported", 1);
339 long long start_values[4] = { 0,0,0,0 },
values[4] = {0,0,0,0};
355 test_fail(__FILE__,__LINE__,
"PAPI_assign_eventset_component",
retval );
359 test_skip(__FILE__, __LINE__,
"Multiplex not supported", 1);
399 printf(
"read @start counter[%d]: %lld\n",
401 printf(
"read @stop counter[%d]: %lld\n",
403 printf(
"difference counter[%d]: %lld\n ",
404 j,
values[j]-start_values[j]);
406 if (
values[j]-start_values[j] < 0LL) {
407 test_fail(__FILE__,__LINE__,
"Difference in start and stop resulted in negative value!", 0 );
426 printf(
"case1: Does PAPI_multiplex_init() not break regular operation?\n" );
431 printf(
"\ncase2: Does setmpx/add work?\n" );
436 printf(
"\ncase3: Does add/setmpx work?\n" );
441 printf(
"\ncase4: Does add/setmpx/add work?\n" );
446 printf(
"\ncase5: Does setmpx/add/add/start/read work?\n" );
static const PAPI_hw_info_t * hw_info
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.
Convert a numeric hardware event code to a name.
get information about the system hardware
initialize the PAPI library.
Initialize multiplex support in the PAPI library.
Query if PAPI event exists.
Read hardware counters from an event set.
Set the default counting domain for new event sets bound to the cpu component.
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.
static long long values[NUM_EVENTS]
int preset_PAPI_events[TOTAL_EVENTS]
int power6_preset_PAPI_events[TOTAL_EVENTS]
int solaris_preset_PAPI_events[TOTAL_EVENTS]
static int PAPI_events_len
static int PAPI_events[TOTAL_EVENTS]
static void init_papi(int *out_events, int *len)
Return codes and api definitions.
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 model_string[PAPI_MAX_STR_LEN]