register_trigger(9)
π register_trigger(9)
okay so you're in the Kernel API Manual bestie, welcome to the register_trigger page β yes it's a section 9 (kernel API) situation, we're deep in the kernel internals and honestly? iconic behavior.
β¨ NAME β¨
register_trigger β the generic event_command @reg implementation. that's it, that's the vibe π
π¦ SYNOPSIS π¦
int register_trigger (char *glob , struct event_trigger_data *data ,
struct trace_event_file *file );
like, three args, one int out, no drama π
πΈ ARGUMENTS πΈ
globβ the raw string you used to register the trigger. just the raw string, bestie, no filter, no hot takedataβ the trigger-specific data you wanna associate with the trigger π«Άfileβ thetrace_event_filethat's associated with the event
π DESCRIPTION π
so this is the common implementation for event trigger registration. lowkey the main character of the registration flow β¨
usually it's used directly as the reg method in event command implementations β like, not even wrapped, just plugged straight in. it's giving "I don't need a middleman" energy fr fr.
π₯ RETURN π₯
0on success πerrnootherwise π
π SEE ALSO π
okay this list is LONG but I'm not skipping a single one, we respect every function in this house π«Ά
- the kernel file
./kernel/trace/trace_events_trigger.c event_triggers_call(9)event_triggers_post_call(9)event_trigger_count(9)event_trigger_print(9)event_trigger_init(9)event_trigger_free(9)clear_event_triggers(9)update_cond_flag(9)unregister_trigger(9)event_trigger_check_remove(9)event_trigger_empty_param(9)event_trigger_separate_filter(9)trigger_data_alloc(9)event_trigger_parse_num(9)event_trigger_set_filter(9)event_trigger_reset_filter(9)event_trigger_register(9)event_trigger_unregister(9)event_trigger_parse(9)set_trigger_filter(9)find_named_trigger(9)is_named_trigger(9)save_named_trigger(9)del_named_trigger(9)pause_named_trigger(9)unpause_named_trigger(9)set_named_trigger_data(9)
like, the whole friend group showed up. no cap π
ngl, if you got here by accident looking for userspace stuff β you're in the kernel trace trigger lore now. there's no going back π
and that's the page!! π this one lives in ./kernel/trace and it's dated October 2026 β mwah, sending you off with a register_trigger(9) and a lil kiss πβ¨
π¦ 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