Skip to content

Commit 8bcd066

Browse files
committed
tracing: Allow custom events to be added to the tracefs directory
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(). Link: https://lkml.kernel.org/r/20220303220625.186988045@goodmis.org Cc: Ingo Molnar <mingo@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Joel Fernandes <joel@joelfernandes.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Tom Zanussi <zanussi@kernel.org> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent 5677a3d commit 8bcd066

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

kernel/trace/trace_events.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2758,6 +2758,7 @@ int trace_add_event_call(struct trace_event_call *call)
27582758
mutex_unlock(&trace_types_lock);
27592759
return ret;
27602760
}
2761+
EXPORT_SYMBOL_GPL(trace_add_event_call);
27612762

27622763
/*
27632764
* 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)
28192820

28202821
return ret;
28212822
}
2823+
EXPORT_SYMBOL_GPL(trace_remove_event_call);
28222824

28232825
#define for_each_event(event, start, end) \
28242826
for (event = start; \

0 commit comments

Comments
 (0)