event_trace_add_tracer(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’« event_trace_add_tracer(9) πŸ’«

okay so bestie, this is a page from the Kernel API Manual and it's literally about giving a brand-new trace instance its own little events corner in the filesystem ✨ buckle up πŸŽ€


🌸 NAME 🌸

event_trace_add_tracer β€” adds an instance of a trace_array to events πŸ¦‹


✨ SYNOPSIS ✨

int event_trace_add_tracer (struct dentry *parent , struct trace_array *tr );

πŸ’… ARGUMENTS πŸ’…

  • parent β€” the parent dentry, aka where the files/directories for events are gonna live 🏠
  • tr β€” the trace array that's associated with these events πŸ‘‘

🫢 DESCRIPTION 🫢

so when a new instance gets created, it lowkey needs to set up its own events directory, plus all the other files that go with events. this function handles that, and it also creates the event hierarchy inside the parent/events directory 🌈

returns 0 on success. periodt πŸ’―

⚠️ ngl this one's serious: it must be called with event_mutex held. no cap, don't skip that πŸ”’

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./kernel/trace/trace_events.c, plus all these icons πŸ‘‘:


and that's the whole vibe bestie πŸ’– this cutie lives in ./kernel/trace, it's the October 2026 edition, and the page is literally called event_trace_add_tracer(9) β€” slay, go read the source, mwah πŸ§šπŸ’œ

πŸ“¦ where this page comes from