STRUCT PT(9)
π struct pt(9) β the Kernel API Manual, bestie edition β¨
okay so this is struct pt, and it's literally the per-cpu pt context. that's the whole vibe. one struct, per cpu, holding all the PT state. iconic behavior honestly π
πΈ SYNOPSIS πΈ
struct pt {
struct perf_output_handle handle;
struct pt_filters filters;
int handle_nmi;
int vmx_on;
int pause_allowed;
int resume_allowed;
u64 output_base;
u64 output_mask;
};
no cap, that's the whole shape of it. copy it exact if you're typing it out, don't be out here freestyling the field names π
β¨ Members β¨
here's the member-by-member breakdown, and yes i'm gonna hype each one up because they all matter:
handleβ the perf output handle. that's it, that's the field π«Άfiltersβ the last configured filters. like, the filters you set most recently? those ones. kept right here βhandle_nmiβ do handle PT PMI on this cpu, there's an active event. so: handle the PT PMI on this cpu, and there's an active event. that's the deal π₯vmx_onβ1if VMX is ON on this cpu.1. VMX. ON. this cpu. simple as πpause_allowedβPERF_EF_PAUSEis allowed to stop tracing. like, pausing is permitted here, that's what the flag is saying πresume_allowedβPERF_EF_RESUMEis allowed to start tracing. and this one's the opposite: resuming is permitted πΈoutput_baseβ cachedRTIT_OUTPUT_BASEMSR value. cached. MSR value.RTIT_OUTPUT_BASE. mwah πoutput_maskβ cachedRTIT_OUTPUT_MASKMSR value. same deal, but MASK instead of BASE, don't mix em up bestie π
ngl the two*_allowedfields are straight-up permission slips β one for stopping tracing, one for starting it back up. keep the semantics straight (PERF_EF_PAUSE= stop,PERF_EF_RESUME= start) and you're golden π
π¦ SEE ALSO π¦
- the kernel file
./arch/x86/events/intel/pt.h struct pt_buffer(9)struct pt_filter(9)struct pt_filters(9)
go read those, they're the friend group this struct rolls with π§
and that's the page!! π this lil beauty comes to you from ./arch/x86/events/intel, dated October 2026, and it's struct pt(9) β the Kernel API Manual's own. mwah, go forth and read your structs ππ
π¦ 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