intel_pt_find_overlap(9)
π intel_pt_find_overlap β a Kernel API Manual moment, bestie
okay so this one is from the Kernel API Manual (yes, the Kernel API Manual, we're fancy now π ) and it's about figuring out where the actually-new part of your trace data starts. let's get into it π
β¨ NAME β¨
intel_pt_find_overlap β determine start of non-overlapped trace data.
like, literally its whole job is spotting where the overlap ends and the fresh data begins. icon behaviour honestly π
π¦ SYNOPSIS π¦
unsigned char * intel_pt_find_overlap (unsigned char *buf_a , size_t
len_a , unsigned char *buf_b , size_t len_b , bool have_tsc , bool
*consecutive , bool ooo_tsc );
π ARGUMENTS π
buf_aβ first buffer. that's the one you already had.len_aβ size of first buffer. how muchbuf_awe're working with.buf_bβ second buffer. the new one coming in.len_bβ size of second buffer. the size ofbuf_b, no cap.have_tscβ can use TSC packets to detect overlap. so like, are we allowed to read the TSC packets to sniff out the overlap or not π΅οΈconsecutiveβ returns true if there is data inbuf_bthat is consecutive tobuf_a. it's an out-param, so it tells you the answer πooo_tscβ out-of-order TSC due to VM TSC offset / scaling. yes that's a real thing that happens in VMs, and yes it matters here πΈ
π DESCRIPTION π
okay so when trace samples or snapshots are recorded there is the possibility that the data overlaps. that's the whole situation. two buffers, potential double-dipping, we gotta sort it out.
note that, for the purposes of decoding, data is only useful if it begins with a PSB packet. like, fr fr, that's the rule. no PSB at the start = not useful to the decoder. periodt.
π₯ RETURN π₯
it hands you back a pointer into buf_b from where non-overlapped data starts. β¨
or, if there's literally no non-overlapped data at all, you get buf_b + len_b. literally the end of the buffer, the "nothing for you here" pointer π
π«Ά SEE ALSO π«Ά
- Kernel file
./tools/perf/util/intel-pt-decoder/intel-pt-decoder.c intel_pt_next_psb(9)intel_pt_step_psb(9)intel_pt_last_psb(9)intel_pt_next_tsc(9)intel_pt_tsc_cmp(9)adj_for_padding(9)intel_pt_find_overlap_tsc(9)struct fast_forward_data(9)intel_pt_ff_cb(9)intel_pt_fast_forward(9)
go read those next bestie, they're all part of the same squad π
k that's the whole page!! source is ./tools/perf/util/intel-pt-dec... and it's dated October 2026, so mark your calendar π thanks for reading my lil manual era, mwah πβ¨
π¦ 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