From: Dmytro Maluka <dmaluka@chromium.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux Trace Kernel <linux-trace-kernel@vger.kernel.org>,
Masami Hiramatsu <mhiramat@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Sean Paul <seanpaul@chromium.org>, Arun Easi <aeasi@marvell.com>,
Daniel Wagner <dwagner@suse.de>
Subject: Re: [RFC][PATCH] tracing: Allow creating instances with specified system events
Date: Tue, 28 Nov 2023 14:14:29 +0100 [thread overview]
Message-ID: <ZWXntcHNflkbrxd7@google.com> (raw)
In-Reply-To: <20231127174108.3c331c9c@gandalf.local.home>
On Mon, Nov 27, 2023 at 05:41:08PM -0500, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)" <rostedt@goodmis.org>
>
> A trace instance may only need to enable specific events. As the eventfs
> directory of an instance currently creates all events which adds overhead,
> allow internal instances to be created with just the events in systems
> that they care about. This currently only deals with systems and not
> individual events, but this should bring down the overhead of creating
> instances for specific use cases quite bit.
>
> The qla2xxx instance could just enable the systems it cares about, but that
> should be a separate patch.
>
> Note that kprobes and synthetic events created after the creation of these
> instances, will be added to these instances, but those that are created
> before the creation of the instance will not be included.
This limitation will cause (unrelated) events created by modules that
are insmoded after creating the instance to be also added to the
instance. Why not filter those as well?
Besides that, the change looks nice to me.
> Note, this may also be useful for creating instances in the eventfs, but
> I'm not sure how to do this there. I could add a deliminator:
>
> mkdir /sys/kernel/tracing/instances/foo::sched,timer
>
> But if a tool already uses "::" as a deliminator, then this will break it.
> I could just have it work if all the events after the deliminator exist.
>
> Thoughts?
>
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
> drivers/scsi/qla2xxx/qla_os.c | 2 +-
> include/linux/trace.h | 4 ++--
> kernel/trace/trace.c | 22 ++++++++++++--------
> kernel/trace/trace.h | 3 ++-
> kernel/trace/trace_boot.c | 2 +-
> kernel/trace/trace_events.c | 31 ++++++++++++++++++++++++++---
> samples/ftrace/sample-trace-array.c | 2 +-
> 7 files changed, 49 insertions(+), 17 deletions(-)
next prev parent reply other threads:[~2023-11-28 13:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 22:41 [RFC][PATCH] tracing: Allow creating instances with specified system events Steven Rostedt
2023-11-27 22:50 ` Steven Rostedt
2023-11-28 8:49 ` Daniel Wagner
2023-11-28 13:14 ` Dmytro Maluka [this message]
2023-11-28 14:20 ` Steven Rostedt
2023-11-28 14:54 ` Steven Rostedt
2023-11-28 15:17 ` Masami Hiramatsu
2023-11-28 15:35 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZWXntcHNflkbrxd7@google.com \
--to=dmaluka@chromium.org \
--cc=aeasi@marvell.com \
--cc=dwagner@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=seanpaul@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox