PAPI 7.1.0.0
Loading...
Searching...
No Matches
PAPI_get_overflow_event_index Class Reference

converts an overflow vector into an array of indexes to overflowing events More...

Detailed Description

Parameters
EventSetan integer handle to a PAPI event set as created by PAPI_create_eventset
overflow_vectora vector with bits set for each counter that overflowed. This vector is passed by the system to the overflow handler routine.
*arrayan array of indexes for events in EventSet. No more than *number indexes will be stored into the array.
*numberOn input the variable determines the size of the array. On output the variable contains the number of indexes in the array.
Return values
PAPI_EINVALOne or more of the arguments is invalid. This could occur if the overflow_vector is empty (zero), if the array or number pointers are NULL, if the value of number is less than one, or if the EventSet is empty.
PAPI_ENOEVSTThe EventSet specified does not exist.
Examples
void handler(int EventSet, void *address, long_long overflow_vector, void *context){
int Events[4], number, i;
int total = 0, retval;
printf("Overflow #%d\n Handler(%d) Overflow at %p! vector=%#llx\n",
total, EventSet, address, overflow_vector);
number = 4;
overflow_vector, Events, &number);
for(i=0; i<number; i++) printf("Event index[%d] = %d", i, Events[i]);}
int i
converts an overflow vector into an array of indexes to overflowing events
#define PAPI_OK
Definition: f90papi.h:73
static int EventSet
Definition: init_fini.c:8
#define long_long
Definition: papi.h:559
static int total
Definition: rapl_overflow.c:9
void handler(int EventSet, void *address, long long overflow_vector, void *context)
Definition: rapl_overflow.c:21
int retval
Definition: zero_fork.c:53
Bug:
This function may not return all overflowing events if used with software-driven overflow of multiple derived events. PAPI_get_overflow_event_index decomposes an overflow_vector into an event index array in which the first element corresponds to the least significant set bit in overflow_vector and so on. Based on overflow_vector, the user can only tell which physical counters overflowed. Using this function, the user can map overflowing counters to specific events in the event set. An array is used in this function to support the possibility of multiple simultaneous overflow events.
See also
PAPI_overflow

The documentation for this class was generated from the following file: