summaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-01-14 18:33:33 +0100
committerSteven Rostedt <rostedt@goodmis.org>2014-02-20 18:13:11 +0100
commitf1b21c9a40704dfdf7b8423c7d2969ea31c9857d (patch)
tree6dcba7a8b72290fb91f855b950fcf4338f1711b2 /kernel/trace
parenttracing: Set up infrastructure to allow tracers for instances (diff)
downloadlinux-f1b21c9a40704dfdf7b8423c7d2969ea31c9857d.tar.xz
linux-f1b21c9a40704dfdf7b8423c7d2969ea31c9857d.zip
tracing: Only let top level have option files
Currently, only the top level instance can have tracing options. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 944cd021aabf..da9543cdbe7a 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3968,9 +3968,11 @@ static int tracing_set_tracer(struct trace_array *tr, const char *buf)
free_snapshot(tr);
}
#endif
- destroy_trace_option_files(topts);
-
- topts = create_trace_option_files(tr, t);
+ /* Currently, only the top instance has options */
+ if (tr->flags & TRACE_ARRAY_FL_GLOBAL) {
+ destroy_trace_option_files(topts);
+ topts = create_trace_option_files(tr, t);
+ }
#ifdef CONFIG_TRACER_MAX_TRACE
if (t->use_max_tr && !had_max_tr) {