[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180312140601.GC4882@kernel.org>
Date: Mon, 12 Mar 2018 11:06:01 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Yisheng Xie <xieyisheng1@...wei.com>
Cc: jolsa@...hat.com, namhyung@...nel.org,
alexander.shishkin@...ux.intel.com, mingo@...hat.com,
peterz@...radead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] perf record: Avoid duplicate call of
perf_default_config()
Em Mon, Mar 12, 2018 at 07:25:57PM +0800, Yisheng Xie escreveu:
> We have brought perf_default_config to the very beginning at main(), so
> it no need to call perf_default_config() once more for most of config in
> perf-record but only for record.call-graph.
Thanks, applied.
> Signed-off-by: Yisheng Xie <xieyisheng1@...wei.com>
> ---
> tools/perf/builtin-record.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index a217623..811cfc1 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -1260,10 +1260,12 @@ static int perf_record_config(const char *var, const char *value, void *cb)
> return -1;
> return 0;
> }
> - if (!strcmp(var, "record.call-graph"))
> - var = "call-graph.record-mode"; /* fall-through */
> + if (!strcmp(var, "record.call-graph")) {
> + var = "call-graph.record-mode";
> + return perf_default_config(var, value, cb);
> + }
>
> - return perf_default_config(var, value, cb);
> + return 0;
> }
>
> struct clockid_map {
> --
> 1.7.12.4
Powered by blists - more mailing lists