papi_enum_event(3) - Linux man page
Name
PAPI_enum_event - enumerate PAPI preset or native events
Synopsis
C Interface#include <papi.h>int PAPI_enum_event(int *EventCode,int modifer);Fortran Interface
#include "fpapi.h"PAPIF_enum_event(C_INT EventCode, C_INT modifier, C_INT check)
Description
Arguments
EventCode -- a defined preset or native event such as PAPI_TOT_INS.modifier -- modifies the search logic. For preset events, TRUE specifies available events only. For native events, each platform behaves differently. See platform-specific
documentation for details
Pentium 4
The following values are implemented for modifier on Pentium 4: PAPI_PENT4_ENUM_GROUPS - 45 groups + custom + user event types PAPI_PENT4_ENUM_COMBOS - all combinations of mask bits for given group PAPI_PENT4_ENUM_BITS - all individual bits for a givengroup
Itanium
The following values are implemented for modifier on Itanium: PAPI_ITA_ENUM_IARR - Enumerate IAR (instruction address ranging) events PAPI_ITA_ENUM_DARR - Enumerate DAR (data address ranging) events PAPI_ITA_ENUM_OPCM - Enumerate OPC (opcode matching) events PAPI_ITA_ENUM_IEAR - Enumerate IEAR (instr event address register) events PAPI_ITA_ENUM_DEAR - Enumerate DEAR (data event address register) eventsPower 4
The following values are implemented for modifier on POWER 4: PAPI_PWR4_ENUM_GROUPS - Enumerategroups to which an event belongs
Return Values
On success, this function returns PAPI_OK , and on error, a non-zero error code is returned.Errors
- PAPI_ENOEVNT
- The next requested PAPI preset or native event is not available on the underlying hardware.
Examples
/* Scan for all supported native events on this platform */
printf("Namettt Codet Description0);
do {
retval = PAPI_get_event_info(i, &info);
if (retval == PAPI_OK) {
printf("%-30s 0x%-10x0s0, info.symbol, info.event_code, info.long_descr);
}
} while (PAPI_enum_event(&i, PAPI_ENUM_ALL) == PAPI_OK);