intel_pt_next_tsc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ intel_pt_next_tsc(9) ✨

okay so bestie, welcome to the Kernel API Manual β€” this one's a little function from the perf intel-pt decoder and honestly it's giving "small but crucial" energy πŸ’…

🌸 NAME 🌸

intel_pt_next_tsc β€” find and return next TSC. that's it, that's the whole gig πŸŽ€

⭐ SYNOPSIS ⭐

bool intel_pt_next_tsc (unsigned char *buf , size_t len , uint64_t *tsc
, size_t *rem );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • buf β€” the buffer, bestie. that's where we're snooping πŸ‘€
  • len β€” size of buffer. gotta know how much room we have before we go wandering
  • tsc β€” the TSC value returned. we're writing the answer here 🫢
  • rem β€” returns remaining size when TSC is found. leftover bytes, iykyk

πŸ’œ DESCRIPTION πŸ’œ

so what it actually does: find a TSC packet in buf and return the TSC value. simple, iconic, does what it says 🌈

now for the ✨lore✨ β€” this function assumes that buf starts at a PSB and that PSB+ will contain TSC, and so it stops if a PSBEND packet is found. no cap, it just trusts you on that. it's built on that assumption fr fr πŸ™ˆ

heads up: if your buf doesn't start at a PSB the way it expects, that's on you β€” the function is not checking your vibe first πŸ’€

πŸ”₯ RETURN πŸ”₯

  • true if TSC is found πŸ’–
  • false otherwise 😭

like a light switch but for TSC packets, periodt.

🧚 SEE ALSO 🧚

Kernel file ./tools/perf/util/intel-pt-decoder/intel-pt-decoder.c

and the whole friend group, because nobody exists in isolation:


and that's the whole page, bestie 🫢 this little beauty lives in the Kernel file <purple>./tools/perf/util/intel-pt-decoder/intel-pt-decoder.c</purple>, dated October 2026, and its name is β€” say it with me β€” intel_pt_next_tsc(9). slay πŸ’…βœ¨πŸ‘‘

πŸ“¦ where this page comes from