synth_event_add_field_str(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 the dynevent_cmd struct 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 πŸ”₯

  • 0 if 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:


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