[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220602082559.795189e1@rorschach.local.home>
Date: Thu, 2 Jun 2022 08:25:59 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: sunliming <sunliming@...inos.cn>
Cc: mingo@...nel.org, linux-kernel@...r.kernel.org,
kelulanainsley@...il.com
Subject: Re: [PATCH] tracing: Simplify conditional compilation code in
tracing_set_tracer()
On Thu, 2 Jun 2022 10:24:04 +0800
sunliming <sunliming@...inos.cn> wrote:
> Two conditional compilation directives "#ifdef CONFIG_TRACER_SNAPSHOT"
> are used consecutively, and no other code in between. Simplify conditional
> the compilation code and only use one "#ifdef CONFIG_TRACER_SNAPSHOT".
I think you mean CONFIG_TRACER_MAX_TRACE here.
-- Steve
>
> Signed-off-by: sunliming <sunliming@...inos.cn>
> ---
> kernel/trace/trace.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> index f400800bc910..dc959e339512 100644
> --- a/kernel/trace/trace.c
> +++ b/kernel/trace/trace.c
> @@ -6430,9 +6430,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)
Powered by blists - more mailing lists