trigger_data_alloc(9)
π trigger_data_alloc(9) β Kernel API Manual π
okay so bestie, welcome to the Kernel API Manual entry for trigger_data_alloc(9) β manual name folded in, cute little header moment, we move π
. This page is literally about allocating and initializing an event_trigger_data for a trigger.
πΈ NAME πΈ
trigger_data_alloc β allocate and init event_trigger_data for a trigger.
β¨ SYNOPSIS β¨
the signature, no cap:
struct event_trigger_data * trigger_data_alloc (struct event_command
*cmd_ops , char *cmd , char *param , void *private_data );
π ARGUMENTS π
cmd_opsβ theevent_commandoperations for the trigger.cmdβ thecmdstring.paramβ theparamstring.private_dataβ user data to associate with the event trigger.
π¦ DESCRIPTION π¦
so what it does: it allocates an event_trigger_data instance and initializes it β¨. The cmd_ops defines how the trigger will operate.
If param is set, and cmd_ops->trigger_ops->count_func is non-NULL, then data->count is set to param, and before the trigger is executed, the cmd_ops->trigger_ops->count_func is called. If that function returns false, the cmd_ops->trigger_ops->trigger function will not be called. important caveat energy: that's the actual behavior, don't skip the check π.
private_data can also be passed in and associated with the event_trigger_data.
Use trigger_data_free to free an event_trigger_data object. free your stuff, bestie π«Ά.
π RETURN π
On success, the trigger_data object; otherwise NULL π. That's the whole vibe.
π SEE ALSO π
Kernel file ./kernel/trace/trace_events_trigger.c β the source, iykyk. And peep these too:
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)register_trigger(9)unregister_trigger(9)event_trigger_check_remove(9)event_trigger_empty_param(9)event_trigger_separate_filter(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)
byeee π β source/version ./kernel/trace, date October 2026 π
π¦ 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