tracing: Consolidate trace() functions

Move the checking, buffer reserve and buffer commit code in
synth_event_trace_start/end() into inline functions
__synth_event_trace_start/end() so they can also be used by
synth_event_trace() and synth_event_trace_array(), and then have all
those functions use them.

Also, change synth_event_trace_state.enabled to disabled so it only
needs to be set if the event is disabled, which is not normally the


Signed-off-by: Tom Zanussi <>
Signed-off-by: Steven Rostedt (VMware) <>
2 files changed