STRUCT HISI_PTT_TRACE_CTRL(9)
π 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 isHISI_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.truemeans 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 au32with a:2width, so it's living small.filterβ the filter value for tracing the TLP headers. it's au32but sized:16β highkey specific.formatβ the format of the TLP headers to trace. tiny:1field, doing big things π«typeβ the type of the TLP headers to trace.:4bits of pure personality β¨
ngl the TLP header gang βdirection,filter,format,typeβ are all bitfields insideu32. 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.hstruct 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
- 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