STRUCT TRACE_REMOTE_CALLBACKS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 a trace_buffer_desc (and like, most likely you're filling it with trace_remote_alloc_buffer, fr fr).
  • unload_trace_buffer β€” called once Tracefs has no more use for the trace buffer (most likely you'll call trace_remote_free_buffer here). Closing time, bye buffer πŸ¦‹
  • enable_tracing β€” called on Tracefs tracing_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 a
  • reset β€” called on echo 0 > trace. The remote is expected to reset all ring-buffer pages. new reader-page from the cpu ring-buffer.
  • enable_event β€” called on events/event_name/enable. The remote is expected to allow the writing event id. πŸ’€
Real talk: the swap_reader_page blurb literally ends at "isolate a" and the reset blurb 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