table of contents
PAPI_derived_event_files(1) | PAPI | PAPI_derived_event_files(1) |
NAME¶
PAPI_derived_event_files - Describes derived event definition file syntax.
Derived Events¶
PAPI provides the ability to define events whose value will be derived from multiple native events. The list of native events to be used in a derived event and a formula which describes how to use them is provided in an event definition file. The PAPI team provides an event definition file which describes all of the supported PAPI preset events. PAPI also allows a user to provide an event definition file that describes a set of user defined events which can extend the events PAPI normally supports.
This page documents the syntax of the commands which can appear in an event definition file.
General Rules:¶
- Blank lines are ignored.
- Lines that begin with '#' are comments (they are also ignored).
- Names shown inside < > below represent values that must be provided by the user.
- If a user provided value contains white space, it must be protected with quotes.
Commands:¶
CPU,<pmuName>
PRESET,<eventName>,<derivedType>,<eventAttr>,LDESC,"<longDesc>",SDESC,"<shortDesc>",NOTE,"<note>"
EVENT,<eventName>,<derivedType>,<eventAttr>,LDESC,"<longDesc>",SDESC,"<shortDesc>",NOTE,"<note>"
Where:
pmuName:
eventName:
derivedType:
eventAttr:
longDesc:
shortDesc:
note:
baseEvent (used below):
Notes:¶
The PRESET command has traditionally been used in the PAPI
provided preset definition file. The EVENT command is intended to be used in
user defined event definition files. The code treats them the same so they
are interchangeable and they can both be used in either event definition
file.
Derived Types:¶
This describes values allowed in the 'derivedType' field of the PRESET and EVENT commands. It also shows the syntax of the 'eventAttr' field for each derived type supported by these commands. All of the derived events provide a list of one or more events which the derived event is based on (baseEvent). Some derived events provide a formula that specifies how to compute the derived events value using the baseEvents in the list. The following derived types are supported, the syntax of the 'eventAttr' parameter for each derived event type is shown in parentheses.
NOT_DERIVED (<baseEvent>):
DERIVED_ADD (<baseEvent1>,<baseEvent2>):
DERIVED_PS (PAPI_TOT_CYC,<baseEvent1>):
DERIVED_ADD_PS (PAPI_TOT_CYC,<baseEvent1>,<baseEvent2>):
DERIVED_CMPD (<baseEvent1>,<baseEvent2):
DERIVED_SUB (<baseEvent1>,<baseEvent2>):
DERIVED_POSTFIX (<pfFormula>,<baseEvent1>,<baseEvent2>, ... ,<baseEventn>):
DERIVED_INFIX (<ifFormula>,<baseEvent1>,<baseEvent2>, ... ,<baseEventn>):
Example:¶
In the following example, the events PAPI_SP_OPS, USER_SP_OPS, and ALIAS_SP_OPS will all measure the same events and return the same value. They just demonstrate different ways to use the PRESET and EVENT event definition commands.
- # The following lines define pmu names that all share the following events
- CPU nhm
- CPU nhm-ex
- # Events which should be defined for either of the above pmu types
- PRESET,PAPI_TOT_CYC,NOT_DERIVED,UNHALTED_CORE_CYCLES
- PRESET,PAPI_REF_CYC,NOT_DERIVED,UNHALTED_REFERENCE_CYCLES
- PRESET,PAPI_SP_OPS,DERIVED_POSTFIX,N0|N1|3|*|+|,FP_COMP_OPS_EXE:SSE_SINGLE_PRECISION,FP_COMP_OPS_EXE:SSE_FP_PACKED,NOTE,'Using a postfix formula'
- EVENT,USER_SP_OPS,DERIVED_INFIX,N0+(N1*3),FP_COMP_OPS_EXE:SSE_SINGLE_PRECISION,FP_COMP_OPS_EXE:SSE_FP_PACKED,NOTE,'Using the same formula in infix format'
- EVENT,ALIAS_SP_OPS,NOT_DERIVED,PAPI_SP_OPS,LDESC,'Alias for preset event PAPI_SP_OPS'
- # End of event definitions for above pmu names and start of a section for a new pmu name.
- CPU snb
Fri Nov 17 2023 | Version 6.0.0.0 |