PAPI_query_named_event(3)
β¨ PAPI_query_named_event β¨
okay so this is the PAPI_query_named_event(3) page from the PAPI manual, and honestly? it's a little icon and it does exactly one job π
π NAME π
PAPI_query_named_event β query if a named PAPI event exists.
πΈ SYNOPSIS πΈ
Detailed Description
C Interface:
#include <papi.h>
int PAPI_query_named_event(const char *EventName);
PAPI_query_named_event() is literally just asking the PAPI library "hey bestie, can this PAPI named event 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 π
and lowkey the extra cute part: you can also use this function to check the syntax of native and user events π
Parameters
EventNameβ a defined event such asPAPI_TOT_INS. π
Return values
PAPI_EINVALβ one or more of the arguments is invalid.PAPI_ENOEVNTβ the PAPI preset is not available on the underlying hardware.
Examples
int 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_named_event("PAPI_TOT_INS") != PAPI_OK) {
fprintf(stderr,\"No instruction counter? How lame.\\n\");
exit(1);
}
See also
PAPI_query_event π
π Author π
Generated automatically by Doxygen for PAPI from the source code.
and that's the whole page, no cap π§ Version 7.2.0.0, dated Wed Jun 25 2025 19:30:48, and yes the footer still says PAPI_query_named_event(3) because the vibes may change but the facts do not π periodt β¨
π¦ where this page comes from
- nixos 26.05: papi 7.2.0
- nixpkgs unstable: papi 7.2.0
- opensuse-leap 16.0: papi-devel 7.2.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: papi-devel 7.2.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: papi-devel 7.2.0-160000.2.2 Β· BSD-3-Clause
- ubuntu resolute: libpapi-dev 7.2.0-2 Β· BSD-3-Clause
- ubuntu stonking: libpapi-dev 7.2.0-2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms