PAPI_query_event - Online Linux Manual PageSection : 3
Updated : September, 2004
Source : PAPI Programmer's Reference
Note : PAPI
NAMEPAPI_query_event − query if PAPI event exists
SYNOPSISC Interface #include <papi.h>
int PAPI_query_event(int EventCode);Fortran Interface #include "fpapi.h"
PAPIF_query_event(C_INT EventCode, C_INT check)
DESCRIPTIONPAPI_query_event()" asks the PAPI library if the PAPI Preset event can be counted on this architecture. If the event CAN be counted, the function returns PAPI_OK. If the event CANNOT be counted, the function returns an error code. This function also can be used to check the syntax of a native event.
ARGUMENTSEventCode -- a defined event such as PAPI_TOT_INS.
RETURN VALUESOn success, PAPI_query_event returns 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 PAPI preset is not available on the underlying hardware.
EXAMPLESint retval;
/* Initialize the library */
retval = PAPI_library_init(PAPI_VER_CURRENT);
if (retval != PAPI_VER_CURRENT) {
fprintf(stderr,"PAPI library init error!\n");
exit(1); }
if (PAPI_query_event(PAPI_TOT_INS) != PAPI_OK) {
fprintf(stderr,"No instruction counter? How lame.\n");
exit(1);
}
BUGSThese functions have no known bugs.
SEE ALSOPAPI_preset(3), PAPI_native(3), PAPI_remove_event(3)," PAPI_remove_events(3)," 0
Johanes Gumabo
Data Size : 7,150 byte
man-PAPI_query_event.3Build : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 4 / 175,376
Visitor ID : :
Visitor IP : 18.117.151.127 :
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.
ERROR : Need New Coding : (rof_nr_x|149|PAPI_query_event.3|62|\n");| fprintf(stderr,"PAPI library init error!\\n");
) (rof_nr_x|149|PAPI_query_event.3|66|\n");| fprintf(stderr,"No instruction counter? How lame.\\n");
)