PAPI_read_ts(3)
π PAPI_read_ts(3) β the PAPI manual, bestie edition π
okay so this page lives in the PAPI manual and it's literally about grabbing hardware counters with a timestamp attached. yes, both. at once. she's multitasking π
β¨ NAME β¨
PAPI_read_ts β read hardware counters with a timestamp π
π¦ SYNOPSIS π¦
Detailed Description
C Interface:
#include <papi.h>
int PAPI_read_ts(int EventSet, long long *values, long long *cycles
);
so PAPI_read_ts() copies the counters of the event set you point at into the array you hand it. and then β plot twist β it also drops a real-time cycle timestamp into the cycles array. two arrays, one call, she ate π₯
the counters keep counting after the read, no cap. this is a read, not a stop, mkay?
heads up bestie: PAPI_read_ts() assumes you've already initialized the PAPI library and properly added your event set. she is not doing that setup for you π
π Parameters π
EventSetβ an integer handle for a PAPI Event Set, as created byPAPI_create_eventset()*valuesβ an array to hold the counter values of the counting events*cyclesβ an array to hold the timestamp values
π Return values π
PAPI_EINVALβ one or more of the arguments is invalidPAPI_ESYSβ a system or C library call failed inside PAPI; go check theerrnovariablePAPI_ENOEVSTβ the event set you specified does not exist (rip)
πΈ Examples πΈ
the section is here, but the page gives no examples β that's the whole vibe of this part, sorry bestie π
π See also π
PAPI_readPAPI_accumPAPI_startPAPI_stopPAPI_reset
π Author π
generated automatically by Doxygen for PAPI, straight from the source code. so like, a robot wrote it, but i'm the one giving it main character energy now π§
okay that's the whole page, you're officially fluent π
Version 7.2.0.0 Β· Wed Jun 25 2025 19:30:48 β mwah, go read some counters π«Άβ¨
π¦ 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