Re: [PATCH 3/3] tracing: Rename trace_synth() to synth_event_trace2()

From: Steven Rostedt
Date: Mon Mar 24 2025 - 10:30:57 EST


On Mon, 24 Mar 2025 15:29:45 +0900
Masami Hiramatsu (Google) <mhiramat@xxxxxxxxxx> wrote:

> Yeah, because those are mainly for the tests, and we are expecting that if
> any modules wants to emit its events, it will define new trace-events and
> use it instead of synthetic events. The synthetic events are for
> programming via tracefs, not reporting from the kernel modules.
> It is confusing if any synthetic events are reported without any origin of
> real trace event. (so, it is an intermadiate event type.) IOW, We expect
> that synthetic event is reported by other events via event trigger.
> The current APIs are just for testing.
>
> Hmm, I should hide those by CONFIG_SYNTH_EVENT_TESTS.

Perhaps we should remove synth_event_trace() from the include/linux header
file, and move it to kernel/trace/trace.h? That way it is only used for
internal purposes, and not exposed to modules. You could wrap the export
with a #ifdef CONFIG_SYNTH_EVENT_TESTS.

-- Steve