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 by PAPI_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 invalid
  • PAPI_ESYS β€” a system or C library call failed inside PAPI; go check the errno variable
  • PAPI_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_read
  • PAPI_accum
  • PAPI_start
  • PAPI_stop
  • PAPI_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 🫢✨