PAPI_hl_read(3)
Hey bestie! Welcome to the PAPI_hl_read(3) page from the PAPI manual π This one is lowkey the βgrab the delta since the region startedβ moment, and yes, itβs iconic.
πΈ NAME πΈ
PAPI_hl_read β read performance events inside of a region and store the difference to the corresponding beginning of the region. Thatβs the whole assignment, periodt. π
β¨ SYNOPSIS β¨
π Detailed Description π
Okay so hereβs the C interface, bestie β keep it cute and keep it exact:
π» C Interface: π»
#include <papi.h>
int PAPI_hl_read( const char* region );
π Parameters π
regionβ a unique region name corresponding toPAPI_hl_region_begin. Yes, it has to match, bestie. π
π¦ Return values π¦
PAPI_OKβ the good one, slay β¨PAPI_ENOTRUNβ the EventSet is currently not running or couldnβt be determined. πPAPI_ESYSβ a system or C library call failed inside PAPI; see theerrnovariable. π₯PAPI_EMISCβ PAPI has been deactivated due to previous errors. πPAPI_ENOMEMβ insufficient memory. π΅βπ«
PAPI_hl_read reads performance events inside of a region and stores the difference to the corresponding beginning of the region. Itβs giving βcalculate the region differenceβ energy, no cap. π«
Heads up: it assumes that PAPI_hl_region_begin was called before. Do not skip the begin, bestie. π«Ά
π§ͺ Example π§ͺ
Hereβs the example, exactly as it is β copy it with your whole chest:
int retval;
retval = PAPI_hl_region_begin("computation");
if ( retval != PAPI_OK )
handle_error(1);
//Do some computation here
retval = PAPI_hl_read("computation");
if ( retval != PAPI_OK )
handle_error(1);
//Do some computation here
retval = PAPI_hl_region_end("computation");
if ( retval != PAPI_OK )
handle_error(1);
π See also π
PAPI_hl_region_beginPAPI_hl_region_endPAPI_hl_stop
π Author π
The author line is literally: Generated automatically by Doxygen for PAPI from the source code. Iconic, honestly. π
This page is from PAPI version 7.2.0.0 and is dated Wed Jun 25 2025 19:30:48. Bye bestie, go read those performance events! π
π
π¦ 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