perf_event Generalized Events

This is an examination of which events are used by the perf_event Generalized Events (the ones shown when you run perf list). It is not possible to determine which events are being used from kernel space, you have to read the kernel source.

I personally agree with the PAPI philosophy that pre-defined events should be defined in userspace, not in the kernel like perf_events does. However that doesn't seem likely to change.

This started out mainly as a sanity check to make sure PAPI is using good events, but it turns out to be the opposite, the kernel is often using improper events.

AMD fam10h

perf_event name perf_event libpfm4 equivperf_event rawPAPI name PAPI libpfm4 equivPAPI raw
cycles CPU_CLK_UNHALTED0x530076 PAPI_TOT_CYC CPU_CLK_UNHALTED0x530076
instructions RETIRED_INSTRUCTIONS0x5300c0 PAPI_TOT_INS RETIRED_INSTRUCTIONS0x5300c0
cache-referencesINSTRUCTION_CACHE_FETCHES0x530080
cache-misses INSTRUCTION_CACHE_MISSES0x530081
branches RETIRED_BRANCH_INSTRUCTIONS0x5300c2 PAPI_BR_INS RETIRED_BRANCH_INSTRUCTIONS0x5300c2
branch-misses RETIRED_MISPREDICTED_BRANCH-_INSTRUCTIONS0x5300c3 PAPI_BR_MSP RETIRED_MISPREDICTED_BRANCH-_INSTRUCTIONS0x5300c3
bus-cycles N/A
stalled-cycles-backendDECODER_EMPTY0x5300d0 PAPI_STL_ICYDECODER_EMPTY0x5300d0
stalled-cycles-frontendDISPATCH_STALLS0x5300d1 PAPI_RES_STLDISPATCH_STALLS0x5300d1
l1-dcache-loadsDATA_CACHE_ACCESSES0x530040 PAPI_L1_DCRN/A
l1-dcache-load-missDATA_CACHE_MISSES:1 (?)0x530141 PAPI_L1_LDMN/A
l1-dcache-storesDATA_CACHE_REFILLS:SYSTEM0x5300142 PAPI_L1_DCW N/A
l1-dcache-store-missesN/A0 PAPI_L1_STMN/A


Known bad events used by the kernel in the past on AMD:

Intel


Back to unofficial perf_events page