event_triggers_call(9)
π event_triggers_call π
ok so real talk, this one is a Kernel API Manual page, bestie β we're in the deep kernel lore today. it lives in event_triggers_call(9), and it's all about firing off the trigger functions that are chillin' next to a trace event. let's get into it π«Ά
β¨ NAME β¨
event_triggers_call β the one that calls the triggers associated with a trace event. literally its whole job. slay π
πΈ SYNOPSIS πΈ
enum event_trigger_type event_triggers_call (struct trace_event_file
*file , struct trace_buffer *buffer , void *rec , struct
ring_buffer_event *event );
π ARGUMENTS π
fileβ thetrace_event_filethat's tied to the event. this is the bestie that knows which event we're talking about πbufferβ the ring buffer the event is being written to. that's where the magic lands β¨recβ the trace entry for the event, and it'sNULLfor an unconditional invocation. so,NULL= "just do it, no questions" π¦eventβ the event meta data sitting inside the ring buffer. the receipts, basically π
π DESCRIPTION π
okay so here's the vibe. for each trigger that's associated with an event, we invoke the trigger function that got registered with the associated trigger command. that's the whole loop. no cap π
now, if rec is non-NULL, that's a whole signal: it means the trigger needs further processing and shouldn't be unconditionally invoked. like, it's got β¨conditionsβ¨. and if rec is non-NULL and the trigger has a filter associated with it, then rec gets checked against that filter β and if the record matches, the trigger gets invoked. main character energy only π
and if the trigger is a 'post_trigger' β meaning it shouldn't be invoked in any case until the current event is written β then the trigger function isn't invoked at all. instead, the bit associated with the deferred trigger gets set in the return value. so it's not a no, it's a "not yet, babe" β
it returns an enum event_trigger_type value containing a set bit for any trigger that should be deferred, or ETT_NONE if there's nothing to defer. π¦
also important: this gets called from tracepoint handlers, with rcu_read_lock_sched held. so keep that in mind, iykyk π
π₯ RETURN π₯
an enum event_trigger_type value containing a set bit for any trigger that should be deferred, and ETT_NONE if nothing to defer. periodt πβ¨
π SEE ALSO π
the kernel file it lives in, for the curious besties:
./kernel/trace/trace_events_trigger.c
and the whole friend group π«Ά:
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)register_trigger(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)
π aww that's the whole page!! this one came from the ./kernel/trace source, version vibes dated October 2026, all dressed up in the Kernel API Manual. go read a trace event for me, bestie πΈπ§π
π¦ 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