• Steven Rostedt (Google)'s avatar
    tracing: Allow creating instances with specified system events · d2356997
    Steven Rostedt (Google) authored
    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.
    
    Link: https://lore.kernel.org/linux-trace-kernel/20231213093701.03fddec0@gandalf.local.home
    
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Cc: Sean Paul <seanpaul@chromium.org>
    Cc: Arun Easi   <aeasi@marvell.com>
    Cc: Daniel Wagner <dwagner@suse.de>
    Tested-by: default avatarDmytro Maluka <dmaluka@chromium.org>
    Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
    d2356997
trace_boot.c 15.7 KB