projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20bc6d2
)
tracing: Simplify conditional compilation code in tracing_set_tracer()
author
sunliming
<sunliming@kylinos.cn>
Thu, 2 Jun 2022 14:06:13 +0000
(22:06 +0800)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sat, 29 Oct 2022 08:12:58 +0000
(10:12 +0200)
[ Upstream commit
f4b0d318097e45cbac5e14976f8bb56aa2cef504
]
Two conditional compilation directives "#ifdef CONFIG_TRACER_MAX_TRACE"
are used consecutively, and no other code in between. Simplify conditional
the compilation code and only use one "#ifdef CONFIG_TRACER_MAX_TRACE".
Link:
https://lkml.kernel.org/r/20220602140613.545069-1-sunliming@kylinos.cn
Signed-off-by: sunliming <sunliming@kylinos.cn>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Stable-dep-of:
a541a9559bb0
("tracing: Do not free snapshot if tracer is on cmdline")
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/trace/trace.c
patch
|
blob
|
history
diff --git
a/kernel/trace/trace.c
b/kernel/trace/trace.c
index 0dc17fd96102c2172598b8d0f1e1762a7c09617b..21795777587b41caae9c58b0cbba777d332732c5 100644
(file)
--- a/
kernel/trace/trace.c
+++ b/
kernel/trace/trace.c
@@
-6416,9
+6416,7
@@
int tracing_set_tracer(struct trace_array *tr, const char *buf)
synchronize_rcu();
free_snapshot(tr);
}
-#endif
-#ifdef CONFIG_TRACER_MAX_TRACE
if (t->use_max_tr && !had_max_tr) {
ret = tracing_alloc_snapshot_instance(tr);
if (ret < 0)