linux/samples/ftrace
Steven Rostedt (Google) d23569979c tracing: Allow creating instances with specified system events
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: Dmytro Maluka <dmaluka@chromium.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2023-12-18 23:14:16 -05:00
..
ftrace-direct-modify.c samples: ftrace: Replace bti assembly with hint for older compiler 2023-08-21 22:03:58 -04:00
ftrace-direct-multi-modify.c samples: ftrace: Replace bti assembly with hint for older compiler 2023-08-21 22:03:58 -04:00
ftrace-direct-multi.c samples: ftrace: Replace bti assembly with hint for older compiler 2023-08-21 22:03:58 -04:00
ftrace-direct-too.c samples: ftrace: Replace bti assembly with hint for older compiler 2023-08-21 22:03:58 -04:00
ftrace-direct.c samples: ftrace: Replace bti assembly with hint for older compiler 2023-08-21 22:03:58 -04:00
ftrace-ops.c samples: ftrace: Make some global variables static 2023-02-07 12:48:00 -05:00
Makefile ftrace: Add sample with custom ops 2023-01-25 10:31:23 -05:00
sample-trace-array.c tracing: Allow creating instances with specified system events 2023-12-18 23:14:16 -05:00
sample-trace-array.h tracing: Sample module to demonstrate kernel access to Ftrace instances. 2019-11-22 19:41:08 -05:00