69{
75 int index_array[2], number;
78
79
81
85 }
86
87
88
89
91
93 if (!
quiet) printf(
"Trouble adding events\n");
94 test_skip(__FILE__,__LINE__,
"Adding events",0);
95 }
96
100
102
106
113
117
119
123
127 }
128
130 printf( "Test case: Overflow dispatch of 2nd event in set with 2 events.\n" );
131 printf( "---------------------------------------------------------------\n" );
132 printf(
"Threshold for overflow is: %d\n",
THRESHOLD );
133 printf(
"Using %d iterations of c += a*b\n",
NUM_FLOPS );
134 printf( "-----------------------------------------------\n" );
135
136 printf( "Test type : %16d%16d\n", 1, 2 );
139 }
140
143 "one counter had no overflows", 1 );
144 }
145
146 for ( k = 0; k < 3; k++ ) {
148 number = 2;
151 index_array, &number );
154 "PAPI_get_overflow_event_index",
retval );
155 }
159 for (
i = 0;
i < number;
i++ )
160 printf(
" Event Index %d ", index_array[
i] );
161 printf( "\n" );
162 }
163 }
164 }
165
167 printf(
"Case 2 %s Overflows: %d\n",
"Unknown",
total_unknown );
168 printf( "-----------------------------------------------\n" );
169 }
170
172 test_fail( __FILE__, __LINE__,
"Unknown counter had overflows", 1 );
173 }
174
178 }
179
181
182 return 0;
183}
Empty and destroy an EventSet.
Convert a numeric hardware event code to a name.
converts an overflow vector into an array of indexes to overflowing events
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.
char event_name[2][PAPI_MAX_STR_LEN]
static long long values[NUM_EVENTS]
static void handler(int EventSet, void *address, long long overflow_vector, void *context)
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)
void PAPI_NORETURN test_pass(const char *filename)
void PAPI_NORETURN test_skip(const char *file, int line, const char *call, int retval)