pt_buffer_reset_offsets(9)
pt_buffer_reset_offsets(9) π
okay so welcome to this Kernel API Manual page, bestie β weβre talking about pt_buffer_reset_offsets(9), and yes itβs giving βtiny function, very specific jobβ energy. π
πΈ NAME πΈ
pt_buffer_reset_offsets β adjust bufferβs write pointers from aux_head β¨
π¦ SYNOPSIS π¦
void pt_buffer_reset_offsets (struct pt_buffer *buf , unsigned long head
);
π ARGUMENTS π
bufβ PT buffer. πheadβ Write pointer (aux_head) from AUX buffer.
π« DESCRIPTION π«
Find the ToPA table and entry corresponding to the given head, and set the bufferβs βcurrentβ pointers accordingly. This is done after we have obtained the current aux_head position from a successful call to perf_aux_output_begin, to make sure the hardware is writing to the right place. π«Ά
This function modifies buf::{cur,cur_idx,output_off} that will be programmed into PT msrs when the tracing is enabled, and buf::head and buf::data_size, which are used to determine INT and STOP markersβ locations by a subsequent call to pt_buffer_reset_markers. like, thatβs the whole little pointer-maintenance moment, and it ate. π₯
π SEE ALSO π
Kernel file ./arch/x86/events/intel/pt.c:
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_markers(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)
later bestie π«Ά β this oneβs from source/version ./arch/x86/events/intel, dated October 2026, and it will always be pt_buffer_reset_offsets(9) to me. π
π¦ 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