STRUCT HISI_PTT_TRACE_CTRL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct hisi_ptt_trace_ctrl(9) β€” like, the whole Kernel API Manual page, bestie πŸŽ€

okay so first things first: this is the manual page for struct hisi_ptt_trace_ctrl from the Kernel API Manual, and no cap it is the literal control room and status board for PTT trace. everything u need to know about this struct, we're going through it together, one member at a time. grab a snack πŸ“


✨ NAME ✨

struct hisi_ptt_trace_ctrl β€” the control and status of PTT trace, both at once. it's giving main character energy: it holds the vibes AND the receipts πŸ’…


🌸 SYNOPSIS 🌸

struct hisi_ptt_trace_ctrl {
    struct hisi_ptt_dma_buffer *trace_buf;
    struct perf_output_handle handle;
    u32 buf_index;
    int on_cpu;
    bool started;
    bool is_port;
    u32 direction:2;
    u32 filter:16;
    u32 format:1;
    u32 type:4;
 };

yes bestie, look at those bitfields β€” direction:2, filter:16, format:1, type:4. the way they packed those in there is honestly iconic πŸ”₯ note the little }; on its own line with a space before it, that's canon, we don't touch it.


πŸ¦‹ Members πŸ¦‹

so these are all the members and what each one is doing. no skipping, we love a complete list πŸ’–

  • trace_buf β€” an array of the trace buffers, and their whole job is holding the trace data. the length is HISI_PTT_TRACE_BUF_CNT, okay? not vibes-based, it's that constant. periodt.
  • handle β€” the perf output handle of the current trace session. current one only, don't go looking for exes πŸ™ˆ
  • buf_index β€” the index of the trace buffer that's currently being used. like, which one is on aux rn 🎧
  • on_cpu β€” the cpu we're currently tracing. yes girl, tracking which cpu.
  • started β€” the current trace status. true means started. that's it, that's the field 🫢
  • is_port β€” tells u whether we're tracing a root port or not. cute little bool for identity crisis purposes.
  • direction β€” the direction of the TLP headers we're tracing. it's a u32 with a :2 width, so it's living small.
  • filter β€” the filter value for tracing the TLP headers. it's a u32 but sized :16 β€” highkey specific.
  • format β€” the format of the TLP headers to trace. tiny :1 field, doing big things πŸ’«
  • type β€” the type of the TLP headers to trace. :4 bits of pure personality ✨
ngl the TLP header gang β€” direction, filter, format, type β€” are all bitfields inside u32. keep their exact widths if ur ever touching this, or it's a whole mess 😭

πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, i'm literally obsessed:

  • Kernel file ./drivers/hwtracing/ptt/hisi_ptt.h struct
  • hisi_ptt_tune_desc(9)
  • struct hisi_ptt_dma_buffer(9)
  • struct hisi_ptt_filter_desc(9)
  • struct hisi_ptt_filter_update_info(9)
  • struct hisi_ptt_pmu_buf(9)
  • struct hisi_ptt(9)

the whole friend group fr fr 🌈


that's the page bestie, u ate that πŸ“ β€” this lil drop came from ./drivers/hwtracing/ptt, dated October 2026, and it lives in/signs off as struct hisi_ptt_trace_ctrl(9). k bye, ily, go read the source πŸ’œ

πŸ“¦ where this page comes from