PAPI_set_debug(3)
πΈ NAME πΈ
okay so bestie, welcome to PAPI_set_debug(3) from the PAPI manual β this function is literally here to set the current debug level for error output from PAPI. That's the whole name, no cap π
β¨ SYNOPSIS β¨
π Detailed Description π
π§ C Prototype π§
#include <papi.h>
int PAPI_set_debug( int level );
π Parameters π
levelβ one of the constants shown in the table below and defined in thepapi.hheader file.
The possible debug levels for debugging are shown below.
PAPI_QUIETβ do not print anything, just return the error code.PAPI_VERB_ECONTβ print error message and continue.PAPI_VERB_ESTOPβ print error message and exit.
π¦ Return values π¦
PAPI_OKβ listed as a return value, okay? β¨PAPI_EINVALβ the debug level is invalid.
The current debug level is used by both the internal error and debug message handler subroutines.
The debug handler is only used if the library was compiled with -DDEBUG.
The debug handler is called when there is an error upon a call to the PAPI API.
The error handler is always active and its behavior cannot be modified except for whether or not it prints anything.
The default PAPI debug handler prints out messages in the following form:
PAPI Error: Error Code code, symbol, description
If the error was caused from a system call and the return code is PAPI_ESYS, the message will have a colon space and the error string as reported by strerror() appended to the end.
The PAPI error handler prints out messages in the following form:
PAPI Error: message.
π Note π
This is the ONLY function that may be called BEFORE PAPI_library_init(). Like, the only one. Bestie, respect the caps. π«Ά
β Example β
int ret;
ret = PAPI_set_debug(PAPI_VERB_ECONT);
if ( ret != PAPI_OK ) handle_error();
π₯ See also π₯
PAPI_library_initPAPI_get_optPAPI_set_opt
π Author π
Generated automatically by Doxygen for PAPI from the source code.
mwah π this page is Version 7.2.0.0, dated Wed Jun 25 2025 19:30:49, and it's the PAPI_set_debug(3) page. Byeee π«Άβ¨
π¦ 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