Re: [PATCH] tracing: Allow creating instances with specified system events

From: Steven Rostedt
Date: Tue Dec 05 2023 - 13:28:27 EST


On Tue, 5 Dec 2023 19:13:09 +0100
Dmytro Maluka <dmaluka@xxxxxxxxxxxx> wrote:

> On Tue, Nov 28, 2023 at 12:21:17PM -0500, Steven Rostedt wrote:
> > From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx>
> >
> > 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 trace_array_get_by_name() now has another parameter "systems". This
> > parameter is a const string pointer of a comma/space separated list of
> > event systems that should be created by the trace_array. (Note if the
> > trace_array already exists, this parameter is ignored).
> >
> > The list of systems is saved and if a module is loaded, its events will
> > not be added unless the system for those events also match the systems
> > string.
> >
> > Note that all dynamic events are still added as they are created by the
> > user.
> >
> > Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
> > ---
>
> Tested-by: Dmytro Maluka <dmaluka@xxxxxxxxxxxx>

Thanks, but I have a v2 of this patch on my local repository, as after
discussing with Masami, I decided not to allow dynamic events unless they
are specified.

I'll send the v2 out later today.

-- Steve