[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1520853957-36106-1-git-send-email-xieyisheng1@huawei.com>
Date: Mon, 12 Mar 2018 19:25:56 +0800
From: Yisheng Xie <xieyisheng1@...wei.com>
To: <acme@...nel.org>
CC: <jolsa@...hat.com>, <namhyung@...nel.org>,
<alexander.shishkin@...ux.intel.com>, <mingo@...hat.com>,
<peterz@...radead.org>, <linux-kernel@...r.kernel.org>,
Yisheng Xie <xieyisheng1@...wei.com>
Subject: [PATCH 1/2] perf top: Fix top.call-graph works abnormal
When try to add call-graph for top into .perfconfig file, like:
[top]
call-graph = fp
find it cannot work for perf_top_config() do not parse this option.
Fix it by call perf_default_config() when config top.call-graph.
Fixes: b8cbb349061e (perf config: Bring perf_default_config to the very beginning at main())
Signed-off-by: Yisheng Xie <xieyisheng1@...wei.com>
---
tools/perf/builtin-top.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 35ac016..fd6e238 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1224,8 +1224,10 @@ static int __cmd_top(struct perf_top *top)
static int perf_top_config(const char *var, const char *value, void *cb __maybe_unused)
{
- if (!strcmp(var, "top.call-graph"))
- var = "call-graph.record-mode"; /* fall-through */
+ if (!strcmp(var, "top.call-graph")) {
+ var = "call-graph.record-mode";
+ return perf_default_config(var, value, cb);
+ }
if (!strcmp(var, "top.children")) {
symbol_conf.cumulate_callchain = perf_config_bool(var, value);
return 0;
--
1.7.12.4
Powered by blists - more mailing lists