96{
100 const char *
name =
"unknown";
101
102
104
105
107
109
110
111 gettimeofday( &
start, NULL );
115
116
120 }
121
124 printf( "[%d] %s, num_events = %d\n", getpid(),
126 }
127
128
130 test_fail(
name, __LINE__,
"PAPI_create_eventset failed", 1 );
131 }
132
133
136 if (!
quiet) printf(
"Trouble adding event.\n");
138 }
139 }
140
141
147 }
148 }
149
150
153 }
154
155
157
159 printf(
"[%d] %s, %s\n", getpid(),
name,
"stop");
160 }
161
162
165 }
166
168 printf(
"[%d] %s, %s\n", getpid(),
name,
"end");
169 }
170
172
173 return 0;
174}
static struct timeval start last
static void run(const char *str, int len)
static int Event[MAX_EVENTS]
static int Threshold[MAX_EVENTS]
static void my_handler(int EventSet, void *pc, long long ovec, void *context)
add PAPI preset or native hardware event to an event set
Create a new empty PAPI EventSet.
initialize the PAPI library.
Set up an event set to begin registering overflows.
Start counting hardware events in an event set.
Stop counting hardware events in an event set.
static void do_cycles(int program_time)
static struct timeval start
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)