[lkml]   [2022]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[for-next][PATCH 04/12] tracing: Allow custom events to be added to the tracefs directory
From: "Steven Rostedt (Google)" <>

Allow custom events to be added to the events directory in the tracefs
file system. For example, a module could be installed that attaches to an
event and wants to be enabled and disabled via the tracefs file system. It
would use trace_add_event_call() to add the event to the tracefs
directory, and trace_remove_event_call() to remove it.

Make both those functions EXPORT_SYMBOL_GPL().


Cc: Ingo Molnar <>
Cc: Andrew Morton <>
Cc: Joel Fernandes <>
Cc: Peter Zijlstra <>
Cc: Masami Hiramatsu <>
Cc: Tom Zanussi <>
Signed-off-by: Steven Rostedt (Google) <>
kernel/trace/trace_events.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
index 3147614c1812..38afd66d80e3 100644
--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -2758,6 +2758,7 @@ int trace_add_event_call(struct trace_event_call *call)
return ret;

* Must be called under locking of trace_types_lock, event_mutex and
@@ -2819,6 +2820,7 @@ int trace_remove_event_call(struct trace_event_call *call)

return ret;

#define for_each_event(event, start, end) \
for (event = start; \
 \ /
  Last update: 2022-03-13 00:27    [W:0.043 / U:0.988 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site