ftrace_set_notrace(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’– β€” ftrace_set_notrace(9) from the Kernel API Manual

okay so bestie, welcome to the ftrace_set_notrace(9) page from the Kernel API Manual. this is literally how to set a function to not trace in ftrace β€” that’s the NAME, that’s the whole assignment. πŸ’…


πŸ”₯ SYNOPSIS πŸ”₯

the signature is giving:

int ftrace_set_notrace (struct ftrace_ops *ops , unsigned char *buf , int len , int reset );

πŸŽ€ ARGUMENTS πŸŽ€

  • ops β€” the ops to set the notrace filter with. main character of this call, tbh.
  • buf β€” the string that holds the function notrace text. yes, that exact string.
  • len β€” the length of the string. no cap.
  • reset β€” non-zero to reset all filters before applying this filter. that non-zero detail is doing work here.

πŸ¦‹ DESCRIPTION πŸ¦‹

Notrace Filters denote which functions should not be enabled when tracing is enabled. they’re the β€œdo not trace these” list, okay? πŸ™ˆ

if buf is NULL and reset is set, all functions will be enabled for tracing. that’s the reset-all-the-notrace-vibes situation, bestie.

πŸ’€ technical caveat time, and please don’t skip it: this can allocate memory which must be freed before ops can be freed, either by removing each filtered addr or by using ftrace_free_filter(ops). like, the cleanup is not optional. the ops does not get to be freed until that memory is handled. periodt.

🌈 SEE ALSO 🌈

Kernel file ./kernel/trace/ftrace.c β€” start there, iykyk.

xoxo, your Kernel API Manual bestie β€” source ./kernel/trace, October 2026, all about ftrace_set_notrace(9) 🫢✨

πŸ“¦ where this page comes from