summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorYisheng Xie <xieyisheng1@huawei.com>2018-03-12 19:25:57 +0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-03-16 13:55:58 -0300
commitcff17205d6bd363703034510a84d66044aff176e (patch)
treef90fd62489b60ed3fb057632e359596d59e8c1d7 /tools/perf/builtin-record.c
parent3d20c6246690219881786de10d2dda93f616d0ac (diff)
downloadtalos-op-linux-cff17205d6bd363703034510a84d66044aff176e.tar.gz
talos-op-linux-cff17205d6bd363703034510a84d66044aff176e.zip
perf record: Avoid duplicate call of perf_default_config()
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. Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1520853957-36106-2-git-send-email-xieyisheng1@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index b81494587120..d33103291b02 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1279,10 +1279,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 {
OpenPOWER on IntegriCloud