STRUCT PT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ 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 β€” 1 if VMX is ON on this cpu. 1. VMX. ON. this cpu. simple as 🌈
  • pause_allowed β€” PERF_EF_PAUSE is allowed to stop tracing. like, pausing is permitted here, that's what the flag is saying πŸ™ˆ
  • resume_allowed β€” PERF_EF_RESUME is allowed to start tracing. and this one's the opposite: resuming is permitted 🌸
  • output_base β€” cached RTIT_OUTPUT_BASE MSR value. cached. MSR value. RTIT_OUTPUT_BASE. mwah πŸ’–
  • output_mask β€” cached RTIT_OUTPUT_MASK MSR value. same deal, but MASK instead of BASE, don't mix em up bestie 😭
ngl the two *_allowed fields 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