intel_pt_next_tsc(9)
β¨ 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 wanderingtscβ 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 π₯
trueif TSC is found πfalseotherwise π
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:
intel_pt_next_psb(9)intel_pt_step_psb(9)intel_pt_last_psb(9)intel_pt_tsc_cmp(9)adj_for_padding(9)intel_pt_find_overlap_tsc(9)intel_pt_find_overlap(9)struct fast_forward_data(9)intel_pt_ff_cb(9)intel_pt_fast_forward(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms