31 static const char *
name =
"unknown";
65 static int last_count = -1;
67 double st_secs, last_secs;
74 if ( last_secs <= 0.001 )
78 printf(
"[%d] %s, time = %.3f, total = %ld, last = %ld, rate = %.1f/sec\n",
80 ( (
double )
count ) / last_secs );
83 if ( last_count != -1 ) {
84 if (
count < .1 * last_count ) {
89 last_count = ( int )
count;
104 for (
x = 1.0;
x < 250000.0;
x += 1.0 )
107 printf(
"==>> SUM IS NEGATIVE !! <<==\n" );
130 test_fail(
name, __LINE__,
"PAPI_create_eventset failed", 1 );
134 if (!
TESTS_QUIET) printf(
"Trouble adding event\n");
158 run(
const char *str,
int len )
162 for ( n = 1; n <= len; n++ ) {
221 if ( WEXITSTATUS(
status ) != 0 )
int PAPI_stop(int EventSet, long long *values)
static void my_papi_start(void)
void test_pass(const char *filename)
int PAPI_add_event(int EventSet, int EventCode)
static void run(const char *str, int len)
static void print_here(const char *str)
int PAPI_overflow(int EventSet, int EventCode, int threshold, int flags, PAPI_overflow_handler_t handler)
static struct timeval start
static void my_papi_stop(void)
static int Threshold[MAX_EVENTS]
Return codes and api definitions.
void test_skip(const char *file, int line, const char *call, int retval)
static void zero_count(void)
int PAPI_library_init(int version)
int PAPI_create_eventset(int *EventSet)
static void do_cycles(int program_time)
static void my_handler(int EventSet, void *pc, long long ovec, void *context)
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 print_rate(const char *str)
int PAPI_start(int EventSet)
static void my_papi_init(void)
static int Event[MAX_EVENTS]
int main(int argc, char **argv)
static struct timeval start last
volatile int buf[CACHE_FLUSH_BUFFER_SIZE_INTS]