PAPI_remove_named_event(3)
π PAPI_remove_named_event(3) β the "bye bestie" page π
okay so this is a page from the PAPI manual, bestie, and it's lowkey so useful. It's all about PAPI_remove_named_event β the function that removes a named hardware event from a PAPI event set. Think of it as the un-invite button for an event you already added to your set π
β¨ NAME β¨
PAPI_remove_named_event β removes a named hardware event from a PAPI event set. periodt π
πΈ SYNOPSIS πΈ
Detailed Description π¦
so listen. A hardware event can be either a PAPI Preset or a native hardware event code β those are the two flavors, iykyk.
- Wanna see the list of PAPI preset events? Check out
PAPI_presets, or just run thepapi_availutility that ships in the PAPI distribution β¨ - You can also pass PAPI Presets to
PAPI_query_eventto find out if they even exist on the underlying architecture π - Wanna see the native events your current platform actually has? Run
papi_native_availfrom the PAPI distribution π
C Interface π
#include <papi.h>
int PAPI_remove_named_event( int EventSet, const char *EventName );
Parameters π«Ά
EventSetβ an integer handle for a PAPI event set, as created byPAPI_create_eventsetEventNameβ a defined event such asPAPI_TOT_INS, or a native event
Return values β
PAPI_OKβ Everything worked. slay πPAPI_EINVALβ One or more of the arguments is invalid.PAPI_ENOINITβ The PAPI library has not been initialized.PAPI_ENOEVSTβ TheEventSetspecified does not exist.PAPI_EISRUNβ TheEventSetis currently counting events. πPAPI_ECNFLCTβ The underlying counter hardware can not count this event and other events in theEventSetsimultaneously. not the conflict πPAPI_ENOEVNTβ The PAPI preset is not available on the underlying hardware. rude, honestly π
Example π
char EventName = "PAPI_TOT_INS";
int EventSet = PAPI_NULL;
int ret;
// Create an empty EventSet
ret = PAPI_create_eventset(&EventSet);
if (ret != PAPI_OK) handle_error(ret);
// Add Total Instructions Executed to our EventSet
ret = PAPI_add_named_event(EventSet, EventName);
if (ret != PAPI_OK) handle_error(ret);
// Start counting
ret = PAPI_start(EventSet);
if (ret != PAPI_OK) handle_error(ret);
// Stop counting, ignore values
ret = PAPI_stop(EventSet, NULL);
if (ret != PAPI_OK) handle_error(ret);
// Remove event
ret = PAPI_remove_named_event(EventSet, EventName);
if (ret != PAPI_OK) handle_error(ret);
See also π
PAPI_remove_eventPAPI_query_named_eventPAPI_add_named_event
π Author π
Generated automatically by Doxygen for PAPI from the source code. (not a human, just a very efficient little bot π§)
aaaand that's the whole page, bestie!! π this doc is Version 7.2.0.0, dated Wed Jun 25 2025 19:30:48 β so go forth and remove those named events with main character energy π β¨π₯
π¦ 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