synth_event_add_field_str(9)
πΈ synth_event_add_field_str β Kernel API Manual β¨
okay bestie, so this whole page is about synth_event_add_field_str, and it lives in the Kernel API Manual (yes, the whole manual is a vibe). Let me break it down for you π
π NAME π
synth_event_add_field_str β adds a shiny new field to a synthetic event cmd. that's literally it, that's the whole job π«Ά
β¨ SYNOPSIS β¨
int synth_event_add_field_str (struct dynevent_cmd *cmd , const char
*type_name );
look at her go π a whole int, two args, no notes.
π¦ ARGUMENTS π¦
cmdβ a pointer to thedynevent_cmdstruct that represents your brand new event. this is the main character of the operation fr.type_nameβ the type and the name of the new field you're adding, all smooshed together as one single string. like, both of them. in one string. iykyk π
π DESCRIPTION π
so you're adding a new field to a synthetic event cmd object β and you're doing it as a single string, hence the _str at the end of her name, she's iconic like that π
the type_name string is expected to be in the form 'type name', and the system will append a ';' onto it for you. cute, right? π
π¨ heads up bestie: there is no sanity checking happening here. zero. none. what you pass in is just assumed to already be well-formed. so if you hand her a cursed string, that's on you, not her. be careful π
field ordering? it's in the exact same order that the fields were added. no reshuffling, no alphabetising, no surprises π
if you wanna know what types are actually available, go check out synth_field_size β she's got the full roster β
and ooh, one more thing: if field_name contains [n], the field gets treated as an array. noted π
π₯ RETURN π₯
0if it worked β slay, we love a success β¨- error otherwise β not slay, but at least you know π
π SEE ALSO π
the kernel file, obviously β ./kernel/trace/trace_events_synth.c π§
and the whole friend group of related functions:
synth_event_add_field(9)synth_event_add_fields(9)__synth_event_gen_cmd_start(9)synth_event_gen_cmd_array_start(9)synth_event_create(9)synth_event_delete(9)synth_event_cmd_init(9)synth_event_trace(9)synth_event_trace_array(9)synth_event_trace_start(9)synth_event_add_next_val(9)synth_event_add_val(9)synth_event_trace_end(9)
okay that's the whole page, and the lore is: this gem lives in ./kernel/trace, dated October 2026, and it's filed under synth_event_add_field_str(9). go forth and add your fields, bestie β mwah πππΈ
π¦ 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