Skip to content

Commit 23c0e9c

Browse files
mhiramatrostedt
authored andcommitted
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: 428add5 ("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>
1 parent 7a6735c commit 23c0e9c

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

kernel/trace/trace.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10228,11 +10228,14 @@ static __init int __update_tracer_options(struct trace_array *tr)
1022810228
return ret;
1022910229
}
1023010230

10231-
static __init void update_tracer_options(struct trace_array *tr)
10231+
static __init void update_tracer_options(void)
1023210232
{
10233+
struct trace_array *tr;
10234+
1023310235
guard(mutex)(&trace_types_lock);
1023410236
tracer_options_updated = true;
10235-
__update_tracer_options(tr);
10237+
list_for_each_entry(tr, &ftrace_trace_arrays, list)
10238+
__update_tracer_options(tr);
1023610239
}
1023710240

1023810241
/* Must have trace_types_lock held */
@@ -10934,7 +10937,7 @@ static __init void tracer_init_tracefs_work_func(struct work_struct *work)
1093410937

1093510938
create_trace_instances(NULL);
1093610939

10937-
update_tracer_options(&global_trace);
10940+
update_tracer_options();
1093810941
}
1093910942

1094010943
static __init int tracer_init_tracefs(void)

0 commit comments

Comments
 (0)