pt_buffer_reset_markers(9)
π pt_buffer_reset_markers(9) β like, the whole page, bestie
okay so this is pt_buffer_reset_markers, and it lives in the Kernel API Manual, section 9. yes it's a real manual page, yes it's about Intel PT buffers, and yes we're gonna get through it together π«Ά
β¨ NAME β¨
pt_buffer_reset_markers β place interrupt and stop bits in the buffer π―
πΈ SYNOPSIS πΈ
int pt_buffer_reset_markers (struct pt_buffer *buf , struct
perf_output_handle *handle );
π ARGUMENTS π
bufβ the PT buffer, that's the one bb πhandleβ the current output handle, iykyk
π¦ DESCRIPTION π¦
So what this bad boy does: it places INT and STOP marks in the buffer. why? two reasons, and both are iconic:
- to prevent overwriting old data that the consumer hasn't yet collected π β like, rude, don't touch her stuff
- to wake up the consumer after a certain fraction of the buffer has filled up β° β a little tap on the shoulder, "hey bestie, there's stuff for you"
heads up: this is only needed and sensible for non-snapshot counters. snapshot counters? not the vibe, don't bother π
And ngl, this whole thing obviously relies on buf::head to figure out the buffer markers β so it has to be called after pt_buffer_reset_offsets and before the hardware tracing is enabled. get the order wrong and it's giving chaos π
π₯ SEE ALSO π₯
Kernel file ./arch/x86/events/intel/pt.c β and the whole friend group:
struct topa(9)struct topa_page(9)topa_alloc(9)topa_free(9)topa_insert_table(9)topa_table_full(9)topa_insert_pages(9)pt_topa_dump(9)pt_buffer_advance(9)pt_update_head(9)pt_buffer_region(9)pt_buffer_region_size(9)pt_handle_status(9)pt_read_offset(9)pt_buffer_reset_offsets(9)pt_buffer_fini_topa(9)pt_buffer_init_topa(9)pt_buffer_setup_aux(9)pt_buffer_free_aux(9)intel_pt_interrupt(9)
okay that's the page!! β¨ this lil gem comes to you from ./arch/x86/events/intel, dated October 2026, and it's filed under pt_buffer_reset_markers(9) β periodt π
π
π¦ 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