ftrace_regex_open(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ftrace_regex_open(9) β€” Kernel API Manual ✨

okay so this is the Kernel API Manual page for ftrace_regex_open(9), and it's giving "tiny setup function with main character energy" πŸŽ€ bestie, let's get into it.

🌸 NAME 🌸

ftrace_regex_open β€” initialize function tracer filter files. πŸ’–

✨ SYNOPSIS ✨

int ftrace_regex_open (struct trace_array *tr , struct ftrace_ops *ops ,
int flag , struct inode *inode , struct file *file );

πŸŽ€ ARGUMENTS πŸŽ€

  • tr β€” the trace_array that holds the ftrace_ops [optional]. 🫢
  • ops β€” the ftrace_ops that hold the hash filters [optional]. 🌸
  • flag β€” the type of filter to process. πŸ”₯
  • inode β€” the inode, usually passed in to your open routine. πŸŽ€
  • file β€” the file, usually passed in to your open routine. πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so ftrace_regex_open initializes the filter files for ops. Depending on flag, it may process the filter hash or the notrace hash of ops. πŸ¦‹

With this called from the open routine, you can use ftrace_filter_write for the write routine if flag has FTRACE_ITER_FILTER set, or ftrace_notrace_write if flag has FTRACE_ITER_NOTRACE set. tracing_lseek should be used as the lseek routine, and release must call ftrace_regex_release. πŸ’…

Note, bestie: if tr is not NULL, its reference has to be taken before ops may be referenced. If ops is NULL and tr is not, then tr->ops is used. If tr is NULL and ops is not, then ops->private is used for tr. If both tr and ops are NULL, then the global_ops is to be used, and tr will be the global_ops.private pointer. 🫢

⭐ RETURN ⭐

0 on success or a negative errno value on failure. That's the whole contract, no cap. ✨

🌈 SEE ALSO 🌈

Kernel file: ./kernel/trace/ftrace.c. Here's the whole cross-reference lineup, fr fr:


made with πŸ’– from source/version ./kernel/trace, dated October 2026, for page ftrace_regex_open(9). πŸŽ€

πŸ“¦ where this page comes from