STRUCT DYN_EVENT_OPERATIONS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to struct dyn_event_operations(9) from the Kernel API Manual β€” this is the page that explains the methods every type of dynamic event has to bring to the function πŸ’….

πŸ¦‹ NAME πŸ¦‹

struct dyn_event_operations β€” methods for each type of dynamic events. ✨

✨ SYNOPSIS ✨

It’s giving struct, and here’s the exact shape, no cap:

struct dyn_event_operations {
    struct list_head        list;
    int (*create)(const char *raw_command);
    int (*show)(struct seq_file *m, struct dyn_event *ev);
    bool (*is_busy)(struct dyn_event *ev);
    int (*free)(struct dyn_event *ev);
    bool (*match)(const char *system, const char *event, int argc, const
char **argv, struct dyn_event *ev);
 };

πŸŽ€ Members πŸŽ€

The struct also has a list member β€” it’s right there in the synopsis above. The member-by-member deets below are for the method pointers, aka the main characters:

  • create β€” parse-and-create method. This is invoked when a user passes an event definition to the dynamic_events interface. It must not destruct the arguments, and it returns -ECANCELED if the given arguments doesn’t match its command prefix. 🫢
  • show β€” the showing method. This is invoked when a user reads the event definitions via the dynamic_events interface. πŸ‘€
  • is_busy β€” checks whether the given event is busy so that it cannot be deleted. Returns true if it is busy, otherwise false. πŸ’€
  • free β€” deletes the given event. Returns 0 if success, otherwise error. 🧚
  • match β€” checks whether the given event and system name match this event. The argc and argv are used for exact match. Returns true if it matches, otherwise false. ⭐

🌸 Description 🌸

These methods must be set for each type, since there is no default method β€” no vibes-based fallback, bestie. 😭

Before using this for dyn_event_init, it must be registered by dyn_event_register. Periodt.

Except for create, these methods are called under holding event_mutex β€” so keep that lock situation in mind, iykyk.

🌈 SEE ALSO 🌈

  • Kernel file ./kernel/trace/trace_dynevent.h
  • struct dyn_event(9)

Source/version ./kernel/trace, dated October 2026, and page struct dyn_event_operations(9) β€” byeee, go slay those dynamic events πŸ’–βœ¨

πŸ“¦ where this page comes from