synth_event_trace_start(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

synth_event_trace_start β€” start piecewise synthetic event trace. This is from the Kernel API Manual, and we're doing kernel tracing field-by-field, no cap. πŸ¦‹

πŸŽ€ SYNOPSIS πŸŽ€

int synth_event_trace_start (struct trace_event_file *file , struct synth_event_trace_state *trace_state );

πŸ“‹ ARGUMENTS πŸ“‹

  • file β€” the trace_event_file representing the synthetic event. That's the synthetic event you're working with, bestie. πŸ’–
  • trace_state β€” a pointer to object tracking the piecewise trace state. It's literally keeping track of the current trace state. ✨

πŸ’… DESCRIPTION πŸ’…

Okay so this function starts the trace of a synthetic event field-by-field rather than all at once. It's giving controlled, piecewise energy, and we love that. πŸ’…

This function 'opens' an event trace, which means space is reserved for the event in the trace buffer. After that, the event's individual field values can be set through either synth_event_add_next_val or synth_event_add_val. Slay. ✨

A pointer to a trace_state object is passed in, and that object will keep track of the current event trace state until the event trace is closed (and the event finally traced) using synth_event_trace_end. 🫢

⚠️ Note: synth_event_trace_end must be called after all values have been added for each event trace, regardless of whether adding all field values succeeded or not. Like, even if it got messy, you still gotta close it out. 😭
⚠️ Note also: for a given event trace, all fields must be added using either synth_event_add_next_val or synth_event_add_val but not both together or interleaved. Pick a lane and stay in it, periodt. πŸ’…

πŸ”₯ RETURN πŸ”₯

0 on success, err otherwise. That's the return, and it ate. πŸ‘‘

🌈 SEE ALSO 🌈


Catch you later, bestie β€” this iconic page came from ./kernel/trace, version/date October 2026, and it's the synth_event_trace_start(9) page from the Kernel API Manual. πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from