diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-05-09 09:48:41 -0400 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-05-29 08:28:46 -0400 |
commit | 5d948c86bb332cd143f4b2dc21d949baf38e29aa (patch) | |
tree | d99d43af95c69174ca509ece28718e0d2cd03ed3 | |
parent | af3dcb53bd77ce83c50e5579db148461aca179e1 (diff) | |
download | op-kernel-dev-5d948c86bb332cd143f4b2dc21d949baf38e29aa.zip op-kernel-dev-5d948c86bb332cd143f4b2dc21d949baf38e29aa.tar.gz |
tracing: Do not show filter file for ftrace internal events
The filter file in the ftrace internal events, like in
/sys/kernel/tracing/events/ftrace/function/filter is not attached to any
functionality. Do not create them as they are meaningless.
In the future, if an ftrace internal event gets filter functionality, then
it will need to create it directly.
Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r-- | kernel/trace/trace_events.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 5b64790..14ff4ff 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -2007,16 +2007,18 @@ event_create_dir(struct dentry *parent, struct trace_event_file *file) return -1; } } - trace_create_file("filter", 0644, file->dir, file, - &ftrace_event_filter_fops); /* * Only event directories that can be enabled should have - * triggers. + * triggers or filters. */ - if (!(call->flags & TRACE_EVENT_FL_IGNORE_ENABLE)) + if (!(call->flags & TRACE_EVENT_FL_IGNORE_ENABLE)) { + trace_create_file("filter", 0644, file->dir, file, + &ftrace_event_filter_fops); + trace_create_file("trigger", 0644, file->dir, file, &event_trigger_fops); + } #ifdef CONFIG_HIST_TRIGGERS trace_create_file("hist", 0444, file->dir, file, |