Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tracing: Show the tracer options in boot-time created instance

Since tracer_init_tracefs_work_func() only updates the tracer options
for the global_trace, the instances created by the kernel cmdline
do not have those options.

Fix to update tracer options for those boot-time created instances
to show those options.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: https://patch.msgid.link/176354112555.2356172.3989277078358802353.stgit@mhiramat.tok.corp.google.com
Fixes: 428add559b69 ("tracing: Have tracer option be instance specific")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

authored by

Masami Hiramatsu (Google) and committed by
Steven Rostedt (Google)
23c0e9cc 7a6735cc

+6 -3
+6 -3
kernel/trace/trace.c
··· 10228 10228 return ret; 10229 10229 } 10230 10230 10231 - static __init void update_tracer_options(struct trace_array *tr) 10231 + static __init void update_tracer_options(void) 10232 10232 { 10233 + struct trace_array *tr; 10234 + 10233 10235 guard(mutex)(&trace_types_lock); 10234 10236 tracer_options_updated = true; 10235 - __update_tracer_options(tr); 10237 + list_for_each_entry(tr, &ftrace_trace_arrays, list) 10238 + __update_tracer_options(tr); 10236 10239 } 10237 10240 10238 10241 /* Must have trace_types_lock held */ ··· 10937 10934 10938 10935 create_trace_instances(NULL); 10939 10936 10940 - update_tracer_options(&global_trace); 10937 + update_tracer_options(); 10941 10938 } 10942 10939 10943 10940 static __init int tracer_init_tracefs(void)