diff options
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 8b488f4dd8e8..84752c8e28b5 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -5539,16 +5539,20 @@ static const struct file_operations ftrace_pid_fops = { void ftrace_init_tracefs(struct trace_array *tr, struct dentry *d_tracer) { - /* Only the top level directory has the dyn_tracefs and profile */ - if (tr->flags & TRACE_ARRAY_FL_GLOBAL) { - ftrace_init_dyn_tracefs(d_tracer); - ftrace_profile_tracefs(d_tracer); - } - trace_create_file("set_ftrace_pid", 0644, d_tracer, tr, &ftrace_pid_fops); } +void __init ftrace_init_tracefs_toplevel(struct trace_array *tr, + struct dentry *d_tracer) +{ + /* Only the top level directory has the dyn_tracefs and profile */ + WARN_ON(!(tr->flags & TRACE_ARRAY_FL_GLOBAL)); + + ftrace_init_dyn_tracefs(d_tracer); + ftrace_profile_tracefs(d_tracer); +} + /** * ftrace_kill - kill ftrace * |