25int main(
int argc,
char **argv) {
34 unsigned long long seconds;
35 unsigned long long ns;
46 printf(
"\nTesting PAPI_HW_INT\n");
56 if (!
quiet) printf(
"Could not add PAPI_HW_INT\n");
65 printf(
"\nRunning for 3 seconds\n");
68 clock_gettime(CLOCK_REALTIME,&before);
74 clock_gettime(CLOCK_REALTIME,&after);
78 ns = (seconds*1000000000ULL)+ns;
81 if (ns>3000000000ULL)
break;
91 printf(
"\tMeasured interrupts = %lld\n",
count);
94 printf(
"\tAssuming HZ=250, expect roughly 750\n");
97 if (!
quiet) printf(
"\n");
100 if (!
quiet) printf(
"Too few interrupts!\n");
101 test_fail( __FILE__, __LINE__,
"Too few interrupts!", 1 );
add PAPI preset or native hardware event by name to an EventSet
Create a new empty PAPI EventSet.
initialize the PAPI library.
Reset the hardware event counts in an event set.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
Return codes and api definitions.
int tests_quiet(int argc, char **argv)
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)
__syscall_slong_t tv_nsec