File: PAPI_get_overflow_event_index.3

package info (click to toggle)
papi 7.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 31,272 kB
  • sloc: ansic: 485,669; cpp: 7,483; fortran: 3,138; makefile: 2,501; xml: 2,460; f90: 1,374; python: 1,062; sh: 780; perl: 242; pascal: 167; asm: 5
file content (64 lines) | stat: -rw-r--r-- 1,820 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.TH "PAPI_get_overflow_event_index" 3 "Wed Jun 25 2025 19:30:48" "Version 7.2.0.0" "PAPI" \" -*- nroff -*-
.ad l
.nh
.SH NAME
PAPI_get_overflow_event_index \- converts an overflow vector into an array of indexes to overflowing events  

.SH SYNOPSIS
.br
.PP
.SH "Detailed Description"
.PP 

.PP
\fBParameters\fP
.RS 4
\fIEventSet\fP an integer handle to a PAPI event set as created by \fBPAPI_create_eventset\fP 
.br
\fIoverflow_vector\fP a vector with bits set for each counter that overflowed\&. This vector is passed by the system to the overflow handler routine\&. 
.br
\fI*array\fP an array of indexes for events in EventSet\&. No more than *number indexes will be stored into the array\&. 
.br
\fI*number\fP On input the variable determines the size of the array\&. On output the variable contains the number of indexes in the array\&.
.RE
.PP
\fBReturn values\fP
.RS 4
\fIPAPI_EINVAL\fP 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\&. 
.br
\fIPAPI_ENOEVST\fP The EventSet specified does not exist\&. 
.RE
.PP
\fBExamples\fP
.RS 4

.PP
.nf
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);
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]);}

.fi
.PP
 
.RE
.PP
.PP
\fBSee also\fP
.RS 4
\fBPAPI_overflow\fP 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for PAPI from the source code\&.