Question

Is it possible to find the set of native events (CPU counter registers) that maps to a PAPI event ?

Was it helpful?

Solution

If you have papi installed, you can use papi_avail to get the native events. For example,

papi_avail -e PAPI_TOT_INS

Event name: PAPI_TOT_INS
Event Code: 0x80000032
Number of Native Events: 1 Short Description: |Instr completed|
Long Description: |Instructions completed|
Developer's Notes: ||
Derived Type: |NOT_DERIVED|
Postfix Processing String: ||
Native Code[0]: 0x40000002 |INSTRUCTION_RETIRED|
Number of Register Values: 0
Native Event Description: |Number of instructions at retirement|

-Ganesh

OTHER TIPS

I think you mean

papi_native_avail

With PAPI_event_name_to_code(...) you can add your event to your eventset for example.

In order to quickly see and export all available mappings from preset events to native events use papi_decode -a command. The output is in the CSV format. An example from my CPU:

pc@pc ~> papi_decode -a
name,derived,postfix,short_descr,long_descr,note,[native,...]

PAPI_L1_DCM,NOT_DERIVED,,"L1D cache misses","Level 1 data cache misses",,L1D:REPLACEMENT
PAPI_L1_ICM,NOT_DERIVED,,"L1I cache misses","Level 1 instruction cache misses",,L2_RQSTS:ALL_CODE_RD
PAPI_L2_DCM,DERIVED_SUB,,"L2D cache misses","Level 2 data cache misses",,LLC_REFERENCES,L2_RQSTS:CODE_RD_MISS
(...)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top