synth_event_trace_start(9)
β¨ 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β thetrace_event_filerepresenting 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 eithersynth_event_add_next_valorsynth_event_add_valbut 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 π
- Kernel file:
./kernel/trace/trace_events_synth.c synth_event_add_field(9)synth_event_add_field_str(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_add_next_val(9)synth_event_add_val(9)synth_event_trace_end(9)
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
- 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