intel_pt_find_overlap_tsc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… intel_pt_find_overlap_tsc(9) β€” like, the Kernel API Manual page you didn't know you needed πŸŽ€

okay so bestie. this is a page straight out of the Kernel API Manual, and it's about one very specific little function: intel_pt_find_overlap_tsc. it figures out where the non-overlapped trace data starts, using TSC. that's it. that's the whole vibe. let's get into it ✨


🌸 NAME 🌸

intel_pt_find_overlap_tsc β€” determine start of non-overlapped trace data using TSC.

like, literally in the name. it finds the overlap. with TSC. slay πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

unsigned char * intel_pt_find_overlap_tsc (unsigned char *buf_a , size_t
len_a , unsigned char *buf_b , size_t len_b , bool *consecutive , bool
ooo_tsc );

no cap, that's the signature, character for character. don't come for me about the spacing, that's how it's written πŸ’€


πŸŽ€ ARGUMENTS πŸŽ€

the cast of characters, in order:

  • buf_a β€” first buffer. the one that comes first. main character energy πŸ‘‘
  • len_a β€” size of first buffer. you gotta tell it how big buf_a is, obviously.
  • buf_b β€” second buffer. the other one. the sequel πŸ¦‹
  • len_b β€” size of second buffer. yes, it needs this too.
  • consecutive β€” returns true if there is data in buf_b that is consecutive to buf_a. it's a pointer, so it writes back to you. that's the whole point 🫢
  • ooo_tsc β€” out-of-order TSC due to VM TSC offset / scaling. it's a bool, and honestly if you're in a VM this one's for you πŸ™ˆ

πŸ”₯ DESCRIPTION πŸ”₯

okay so here's the tea β˜•

If the trace contains TSC, we can look at the last TSC of buf_a and the first TSC of buf_b in order to determine if the buffers overlap. then we walk forward in buf_b until a later TSC is found. iconic behaviour, honestly.

⚠️ precondition alert!! buf_a and buf_b must be positioned at a PSB. like, that's not optional, bestie. if they're not at a PSB, that's a you problem 😭

⭐ RETURN ⭐

what you get back:

  • a pointer into buf_b from where non-overlapped data starts, or
  • buf_b + len_b if there is no non-overlapped data.

that's it. that's the return value. no surprises, no plot twists πŸ’…


🌈 SEE ALSO 🌈

go read these next, they're all in the same friend group:

iykyk 🧚


and that's the whole page!! this lil icon came from ./tools/perf/util/intel-pt-dec... and it's dated October 2026 β€” yes, the future, we're built different πŸ’œβœ¨ bye bestie, go decode some trace data πŸ“

πŸ“¦ where this page comes from