STRUCT TRACE_REMOTE_CALLBACKS(9)
π NAME π
struct trace_remote_callbacks β the callback squad that Tracefs uses to keep the remote in check π (this one lives in the Kernel API Manual, iykyk)
β¨ SYNOPSIS β¨
struct trace_remote_callbacks {
int (*init)(struct dentry *d, void *priv);
struct trace_buffer_desc *(*load_trace_buffer)(unsigned long size,
void *priv);
void (*unload_trace_buffer)(struct trace_buffer_desc *desc, void
*priv);
int (*enable_tracing)(bool enable, void *priv);
int (*swap_reader_page)(unsigned int cpu, void *priv);
int (*reset)(unsigned int cpu, void *priv);
int (*enable_event)(unsigned short id, bool enable, void *priv);
};
π«Ά Members π«Ά
Okay bestie, here's the whole cast of function pointers, one by one, no skips π
initβ called the moment the remote has been registered. It's your lil' window to extend the Tracefs remote directory. Slay πload_trace_bufferβ called before Tracefs touches the trace buffer for the very first time. It must return atrace_buffer_desc(and like, most likely you're filling it withtrace_remote_alloc_buffer, fr fr).unload_trace_bufferβ called once Tracefs has no more use for the trace buffer (most likely you'll calltrace_remote_free_bufferhere). Closing time, bye buffer π¦enable_tracingβ called on Tracefstracing_on. The remote is expected to allow writing. Periodt.swap_reader_pageβ called when Tracefs consumes a new page from a ring-buffer. The remote is expected to isolate aresetβ called onecho 0 > trace. The remote is expected to reset all ring-buffer pages. new reader-page from the cpu ring-buffer.enable_eventβ called onevents/event_name/enable. The remote is expected to allow the writing event id. π
Real talk: theswap_reader_pageblurb literally ends at "isolate a" and theresetblurb has a stray "new reader-page from the cpu ring-buffer." floating after it β that's exactly how it shows up in this page, so I'm not gonna gaslight you by inventing the rest π
π SEE ALSO π
- Kernel file
./include/linux/trace_remote.h
That's the whole vibe check, bestie π§ β this icon was served up from ./include/linux, dated October 2026, and the header tag reads struct trac...te_callbacks(9). Go forth and callback responsibly ππ
π¦ 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