Commit 45608ae
committed
tracing: Avoid adding tracer option before update_tracer_options
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2155737
commit ef9188b
Author: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Date: Tue Apr 26 20:24:06 2022 +0800
tracing: Avoid adding tracer option before update_tracer_options
To prepare for support asynchronous tracer_init_tracefs initcall,
avoid calling create_trace_option_files before __update_tracer_options.
Otherwise, create_trace_option_files will show warning because
some tracers in trace_types list are already in tr->topts.
For example, hwlat_tracer call register_tracer in late_initcall,
and global_trace.dir is already created in tracing_init_dentry,
hwlat_tracer will be put into tr->topts.
Then if the __update_tracer_options is executed after hwlat_tracer
registered, create_trace_option_files find that hwlat_tracer is
already in tr->topts.
Link: https://lkml.kernel.org/r/20220426122407.17042-2-mark-pk.tsai@mediatek.com
Link: https://lore.kernel.org/lkml/20220322133339.GA32582@xsang-OptiPlex-9020/
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>1 parent a70d62a commit 45608ae
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6315 | 6315 | | |
6316 | 6316 | | |
6317 | 6317 | | |
| 6318 | + | |
| 6319 | + | |
6318 | 6320 | | |
6319 | 6321 | | |
6320 | 6322 | | |
6321 | 6323 | | |
6322 | 6324 | | |
6323 | 6325 | | |
| 6326 | + | |
| 6327 | + | |
| 6328 | + | |
| 6329 | + | |
6324 | 6330 | | |
6325 | 6331 | | |
6326 | 6332 | | |
| |||
9144 | 9150 | | |
9145 | 9151 | | |
9146 | 9152 | | |
| 9153 | + | |
9147 | 9154 | | |
9148 | 9155 | | |
9149 | 9156 | | |
| |||
0 commit comments