PAPI_get_overflow_event_index - Online Linux Manual PageSection : 3
Updated : September, 2004
Source : PAPI Programmer's Reference
Note : PAPI
NAMEPAPI_get_overflow_event_index − converts an overflow vector into an array of indexes to overflowing events
SYNOPSISC Interface #include <papi.h>
int PAPI_get_overflow_event_index(int EventSet, long_long overflow_vector, int *array, int *number);Fortran Interface Not implemented
DESCRIPTIONPAPI_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.
ARGUMENTSEventSet -- an integer handle to a PAPI event set as created by "PAPI_create_eventset(3) overflow_vector -- a vector with bits set for each counter that overflowed. This vector is passed by the system to the overflow handler routine. *array -- an array of indexes for events in EventSet. No more than *number indexes will be stored into the array. *number -- On input the variable determines the size of the array.
On output the variable contains the number of indexes in the array. Note that if the given *array is too short to hold all the indexes correspond to the set bits in the overflow_vector the *number variable will be set to the size of array.
RETURN VALUESOn success, this function returns PAPI_OK."
On error, a non-zero error code is returned.
ERRORSPAPI_EINVAL" One 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_ENOEVST" The EventSet specified does not exist.
EXAMPLESCreate a user defined overflow handler routine that prints diagnostic information about the overflow: 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=0x%llx\n",
total, EventSet, address, overflow_vector);
total++;
number = 4;
retval = PAPI_get_overflow_event_index(EventSet,
overflow_vector, Events, &number);
if(retval == PAPI_OK)
for(i=0; i<number; i++) printf("Event index[%d] = %d", i, Events[i]);
}
BUGSThis function may not return all overflowing events if used with software-driven overflow of multiple derived events.
SEE ALSOPAPI_overflow(3)" 0
Johanes Gumabo
Data Size : 8,569 byte
man-PAPI_get_overflow_event_index.3Build : 2024-12-29, 07:25 :
Visitor Screen : x
Visitor Counter ( page / site ) : 4 / 256,274
Visitor ID : :
Visitor IP : 18.116.80.68 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.29
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (rof_nr_x|149|PAPI_get_overflow_event_index.3|94|\n Handler(%d) Overflow at %p! vector=0x%llx\n",| printf("Overflow #%d\n Handler(%d) Overflow at %p! vector=0x%llx\n",
)