PAPI_event_code_to_name - Online Linux Manual PageSection : 3
Updated : September, 2004
Source : PAPI Programmer's Reference
Note : PAPI
NAMEPAPI_event_code_to_name − convert a numeric hardware event code to a name.
PAPI_event_name_to_code − convert a name to a numeric hardware event code.
SYNOPSISC Interface #include <papi.h>
int PAPI_event_code_to_name(int EventCode, char *EventName);
int PAPI_event_name_to_code(char *EventName, int *EventCode);Fortran Interface #include "fpapi.h"
PAPIF_event_code_to_name(C_INT EventCode, C_STRING EventName, C_INT check)
PAPIF_event_name_to_code(C_STRING EventName, C_INT EventCode, C_INT check)
DESCRIPTIONPAPI_event_code_to_name( ) is used to translate a 32-bit integer PAPI event code into an ASCII PAPI event name. Either Preset event codes or Native event codes can be passed to this routine. Native event codes and names differ from platform to platform. PAPI_event_name_to_code( ) is used to translate an ASCII PAPI event name into an integer PAPI event code.
ARGUMENTSEventName -- a string containing the event name as listed in PAPI_presets(3) or discussed in PAPI_native(3) EventCode -- the numeric code for the event
RETURN VALUESOn success, these functions return PAPI_OK."
On error, a non-zero error code is returned.
ERRORSPAPI_EINVAL" One or more of the arguments is invalid. PAPI_ENOTPRESET" The hardware event specified is not a valid PAPI preset. PAPI_ENOEVNT" The hardware event is not available on the underlying hardware.
EXAMPLESint EventCode, EventSet = PAPI_NULL;
char EventCodeStr[PAPI_MAX_STR_LEN];
char EventDescr[PAPI_MAX_STR_LEN];
char EventLabel[20];
/* Convert to integer */
if (PAPI_event_name_to_code("PAPI_TOT_INS",&EventCode) != PAPI_OK)
handle_error(1);
/* Create the EventSet */
if (PAPI_create_eventset(&EventSet) != PAPI_OK)
handle_error(1);
/* Add Total Instructions Executed to our EventSet */
if (PAPI_add_event(EventSet, EventCode) != PAPI_OK)
handle_error(1);
BUGSThese functions have no known bugs.
SEE ALSOPAPI_presets(3), PAPI_native (3)," PAPI_enum_events(3), PAPI_add_event(3), PAPI_remove_event(3), PAPI_get_event_info (3)" 0
Johanes Gumabo
Data Size : 8,696 byte
man-PAPI_event_code_to_name.3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 6 / 170,590
Visitor ID : :
Visitor IP : 18.223.241.235 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.