__kprobe_event_add_fields(9)
π
__kprobe_event_add_fields(9) π
okay so bestie, this is a page from the Kernel API Manual (section 9), and it's all about the function __kprobe_event_add_fields β¨ β no cap, it's the helper that adds probe fields to a kprobe command from an arg list. Let's get into it π«Ά
πΈ NAME πΈ
__kprobe_event_add_fields β add probe fields to a kprobe command from arg list π
π SYNOPSIS π
int __kprobe_event_add_fields (struct dynevent_cmd *cmd , ... );
π¦ ARGUMENTS π¦
cmdβ a pointer to thedynevent_cmdstruct representing the new event. literally the main character of this call π...β Variable number of arg (pairs), one pair for each field. yes bestie, pairs β one per field π
π NOTE π
okay so listen π β users normally won't want to call this function directly. Instead, use the kprobe_event_add_fields wrapper, because it automatically adds a NULL to the end of the arg list. easy peasy, no extra manual NULL-ing πΈ
but if you do use this function directly, make sure the last arg in the variable arg list is NULL. not optional, bestie β fr fr π
This function adds probe fields to an existing kprobe command using a variable list of args. Fields are added in the same order they're listed. so the order you write them? that's the order you get. iconic π
π RETURN π
0 if successful, error otherwise. that's it, that's the whole vibe check β
π SEE ALSO π
- Kernel file
./kernel/trace/trace_kprobe.cβ go look atfor_each_trace_kprobe(9),kprobe_event_cmd_init(9),__kprobe_event_gen_cmd_start(9), andkprobe_event_delete(9)π¦
mwah π β this cutie comes from ./kernel/trace, dated October 2026, and it's all about __kprobe_event_add_fields(9). slay π
π¦ 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