97 const char *
name =
"unknown";
118 test_fail( __FILE__, __LINE__,
"PAPI_library_init failed", 1 );
123 printf(
"[%d] %s, num_events = %d\n", getpid(),
129 test_fail( __FILE__, __LINE__,
"PAPI_create_eventset failed", 1 );
135 if (!
quiet) printf(
"Trouble adding event\n");
136 test_skip( __FILE__, __LINE__,
"PAPI_add_event failed", 1 );
145 test_fail( __FILE__, __LINE__,
"PAPI_overflow failed", 1 );
151 test_fail( __FILE__, __LINE__,
"PAPI_start failed", 1 );
161 printf(
"[%d] %s, %s\n", getpid(),
name,
"stop");
169 printf(
"[%d] %s, %s\n", getpid(),
170 name,
"exec(./child_overflow)");
175 if ( access(
"./child_overflow", X_OK ) == 0 )
176 execl(
"./child_overflow",
"./child_overflow",
177 (
quiet ?
"TESTS_QUIET" : NULL ), NULL );
178 else if ( access(
"./ctests/child_overflow", X_OK ) == 0 )
179 execl(
"./ctests/child_overflow",
"./ctests/child_overflow",
180 (
quiet ?
"TESTS_QUIET" : NULL ), NULL );
int PAPI_stop(int EventSet, long long *values)
int PAPI_add_event(int EventSet, int EventCode)
static int Threshold[MAX_EVENTS]
int PAPI_overflow(int EventSet, int EventCode, int threshold, int flags, PAPI_overflow_handler_t handler)
static struct timeval start
static int Event[MAX_EVENTS]
void test_skip(const char *file, int line, const char *call, int retval)
int PAPI_library_init(int version)
static void my_handler(int EventSet, void *pc, long long ovec, void *context)
int PAPI_create_eventset(int *EventSet)
static void do_cycles(int program_time)
static struct timeval start last
int gettimeofday(void *ptr1, void *ptr2)
int tests_quiet(int argc, char **argv)
void test_fail(const char *file, int line, const char *call, int retval)
static void run(const char *str, int len)
int PAPI_start(int EventSet)