ftrace_regex_open(9)
π 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β thetrace_arraythat holds theftrace_ops[optional]. π«Άopsβ theftrace_opsthat hold the hash filters [optional]. πΈflagβ the type of filter to process. π₯inodeβ the inode, usually passed in to youropenroutine. πfileβ the file, usually passed in to youropenroutine. π
π¦ 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: iftris notNULL, its reference has to be taken beforeopsmay be referenced. IfopsisNULLandtris not, thentr->opsis used. IftrisNULLandopsis not, thenops->privateis used fortr. If bothtrandopsareNULL, then theglobal_opsis to be used, andtrwill be theglobal_ops.privatepointer. π«Ά
β 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:
ftrace_lookup_ip(9)ftrace_free_filter(9)ftrace_hash_move(9)ftrace_location_range(9)ftrace_location(9)ftrace_text_reserved(9)ftrace_bug(9)ftrace_update_record(9)ftrace_test_record(9)ftrace_get_addr_new(9)ftrace_get_addr_curr(9)ftrace_rec_iter_start(9)ftrace_rec_iter_next(9)ftrace_rec_iter_record(9)ftrace_run_stop_machine(9)arch_ftrace_update_code(9)ftrace_startup_subops(9)ftrace_shutdown_subops(9)allocate_ftrace_func_mapper(9)ftrace_func_mapper_find_ip(9)ftrace_func_mapper_add_ip(9)ftrace_func_mapper_remove_ip(9)free_ftrace_func_mapper(9)register_ftrace_direct(9)unregister_ftrace_direct(9)modify_ftrace_direct_nolock(9)modify_ftrace_direct(9)hash_add(9)update_ftrace_direct_add(9)hash_sub(9)update_ftrace_direct_del(9)update_ftrace_direct_mod(9)ftrace_set_filter_ip(9)ftrace_set_filter_ips(9)ftrace_ops_set_global_filter(9)ftrace_set_filter(9)ftrace_set_notrace(9)ftrace_set_global_filter(9)ftrace_set_global_notrace(9)ftrace_ops_get_func(9)ftrace_kill(9)ftrace_is_dead(9)register_ftrace_function(9)unregister_ftrace_function(9)ftrace_lookup_symbols(9)
made with π from source/version ./kernel/trace, dated October 2026, for page ftrace_regex_open(9). π
π¦ 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