[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201002161703.3961a96e84314fe31157f308@kernel.org>
Date: Fri, 2 Oct 2020 16:17:03 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Tom Zanussi <zanussi@...nel.org>
Cc: rostedt@...dmis.org, axelrasmussen@...gle.com, mhiramat@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/3] tracing: Add support for dynamic strings to
synthetic events
Hi Tom,
On Wed, 30 Sep 2020 13:40:52 -0500
Tom Zanussi <zanussi@...nel.org> wrote:
> Currently, sythetic events only support static string fields such as:
>
> # echo 'test_latency u64 lat; char somename[32]' > /sys/kernel/debug/tracing/synthetic_events
>
> Which is fine, but wastes a lot of space in the event.
>
> It also prevents the most commonly-defined strings in the existing
> trace events e.g. those defined using __string(), from being passed to
> synthetic events via the trace() action.
>
> With this change, synthetic events with dynamic fields can be defined:
>
> # echo 'test_latency u64 lat; char somename[]' > /sys/kernel/debug/tracing/synthetic_events
Could you add a testcase (and update existing one) of ftracetest
for this new feature too?
>
> And the trace() action can be used to generate events using either
> dynamic or static strings:
>
> # echo 'hist:keys=name:lat=common_timestamp.usecs-$ts0:onmatch(sys.event).test_latency($lat,name)' > /sys/kernel/debug/tracing/events
>
> The synthetic event dynamic strings are implemented in the same way as
> the existing __data_loc strings and appear as such in the format file.
>
> Signed-off-by: Tom Zanussi <zanussi@...nel.org>
> ---
> Documentation/trace/events.rst | 15 +-
> Documentation/trace/histogram.rst | 18 +++
> kernel/trace/synth_event_gen_test.c | 18 ++-
> kernel/trace/trace_events_hist.c | 9 ++
> kernel/trace/trace_events_synth.c | 239 ++++++++++++++++++++++++----
> kernel/trace/trace_synth.h | 4 +
And you might also need to update tracefs/README so that user
can check whether the kernel supports dynamic string or not.
Thank you,
--
Masami Hiramatsu <mhiramat@...nel.org>
Powered by blists - more mailing lists