1PAPI_enum_event(3)                   PAPI                   PAPI_enum_event(3)
2
3
4

NAME

6       PAPI_enum_event - enumerate PAPI preset or native events
7
8

SYNOPSIS

10       C Interface
11       #include <papi.h>
12       int PAPI_enum_event(int *EventCode,int modifer);
13       Fortran Interface
14       #include fpapi.h
15       PAPIF_enum_event(C_INT EventCode, C_INT modifier, C_INT check)
16
17

DESCRIPTION

19       Given  a  preset  or  native event code, PAPI_enum_event() replaces the
20       event code with the next available event in either the preset or native
21       table.   The  modifier  argument affects which events are returned. For
22       all platforms and event types, a value of PAPI_ENUM_ALL (zero)  directs
23       the  function  to return all possible events. For preset events, a TRUE
24       (non-zero) value currently directs the function to return  event  codes
25       only for PAPI preset events available on this platform. This may change
26       in the future.  For native events, the effect of the modifier  argument
27       is  different  on each platform. See the discussion below for platform-
28       specific definitions.
29
30
31

ARGUMENTS

33       EventCode -- a defined preset or native event such as PAPI_TOT_INS.
34
35       modifier -- modifies the search logic. For preset events,  TRUE  speci‐
36       fies  available  events only.  For native events, each platform behaves
37       differently.  See platform-specific documentation for details
38
39

PENTIUM 4

41       The following values are  implemented  for  modifier  on  Pentium  4:
42       PAPI_PENT4_ENUM_GROUPS  -  45  groups  +  custom  +  user  event types
43       PAPI_PENT4_ENUM_COMBOS - all combinations of mask bits for given group
44       PAPI_PENT4_ENUM_BITS - all individual bits for a given group
45
46

ITANIUM

48       The  following  values  are  implemented  for  modifier  on  Itanium:
49       PAPI_ITA_ENUM_IARR - Enumerate IAR (instruction address ranging) events
50          PAPI_ITA_ENUM_DARR  -  Enumerate  DAR (data address ranging) events
51       PAPI_ITA_ENUM_OPCM  -  Enumerate  OPC   (opcode   matching)   events
52       PAPI_ITA_ENUM_IEAR  -  Enumerate  IEAR  (instr  event address register)
53       events   PAPI_ITA_ENUM_DEAR - Enumerate DEAR (data event address regis‐
54       ter) events
55
56

POWER 4

58       The  following  values  are  implemented  for  modifier  on  POWER  4:
59       PAPI_PWR4_ENUM_GROUPS - Enumerate groups to which an event belongs
60
61

RETURN VALUES

63       On success, this function returns PAPI_OK , and on  error,  a  non-zero
64       error code is returned.
65
66

ERRORS

68       PAPI_ENOEVNT
69              The  next requested PAPI preset or native event is not available
70              on the underlying hardware.
71
72

EXAMPLES

74       /* Scan for all supported native events on this platform */
75
76          printf("Name       Code   Description0);
77          do {
78                retval = PAPI_get_event_info(i, &info);
79                if (retval == PAPI_OK) {
80                   printf("%-30s 0x%-10x2s0, info.symbol, info.event_code, info.long_descr);
81                }
82          } while (PAPI_enum_event(&i, PAPI_ENUM_ALL) == PAPI_OK);
83
84
85

BUGS

87       This function has no known bugs.
88
89

SEE ALSO

91       PAPI_preset(3),         PAPI_native(3),         PAPI_get_event_info(3),
92       PAPI_event_name_to_code(3) PAPI(3), PAPIF(3)
93
94
95
96PAPI Programmer's Reference      October, 2006              PAPI_enum_event(3)
Impressum