trigger_data_alloc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” the event_command operations for the trigger.
  • cmd β€” the cmd string.
  • param β€” the param string.
  • 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:


byeee πŸ’‹ β€” source/version ./kernel/trace, date October 2026 πŸŽ€

πŸ“¦ where this page comes from