21#define OVER_FMT "handler(%d) Overflow at %p! vector=%#llx\n"
22#define OUT_FMT "%-12s : %16lld%16lld\n"
53 "(Reading counters)\n" );
56 test_fail( __FILE__, __LINE__,
"Total Cycles == 0", 1 );
60main(
int argc,
char **argv )
85 if (!
quiet) printf(
"Trouble adding events\n");
86 test_skip(__FILE__,__LINE__,
"Adding event",1);
124 (
"Test case: Overflow dispatch of 1st event in set with 2 events.\n" );
126 (
"---------------------------------------------------------------\n" );
127 printf(
"Threshold for overflow is: %d\n",
THRESHOLD );
128 printf(
"Using %d iterations of c += a*b\n",
NUM_FLOPS );
129 printf(
"-----------------------------------------------\n" );
131 printf(
"Test type : %16d%16d\n", 1, 2 );
Convert a numeric hardware event code to a name.
initialize the PAPI library.
Set up an event set to begin registering overflows.
Read hardware counters from an event set.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
char event_name[2][PAPI_MAX_STR_LEN]
static long long values[NUM_EVENTS]
ocount_t overflow_counts[3]
void handler(int EventSet, void *address, long long overflow_vector, void *context)
Return codes and api definitions.
int tests_quiet(int argc, char **argv)
int add_two_nonderived_events(int *num_events, int *papi_event, int *mask)
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)
int remove_test_events(int *EventSet, int mask)