projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cff1720
)
perf top: Fix top.call-graph config option reading
author
Yisheng Xie
<
[email protected]
>
Mon, 12 Mar 2018 11:25:56 +0000
(19:25 +0800)
committer
Arnaldo Carvalho de Melo
<
[email protected]
>
Fri, 16 Mar 2018 16:56:04 +0000
(13:56 -0300)
When trying to add the "call-graph" variable for top into the
.perfconfig file, like:
[top]
call-graph = fp
I that perf_top_config() do not parse this variable.
Fix it by calling perf_default_config() when the top.call-graph variable
is set.
Signed-off-by: Yisheng Xie <
[email protected]
>
Tested-by: Arnaldo Carvalho de Melo <
[email protected]
>
Cc: Alexander Shishkin <
[email protected]
>
Cc: Jiri Olsa <
[email protected]
>
Cc: Namhyung Kim <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Wang Nan <
[email protected]
>
Fixes: b8cbb349061e ("perf config: Bring perf_default_config to the very beginning at main()")
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <
[email protected]
>
tools/perf/builtin-top.c
patch
|
blob
|
history
diff --git
a/tools/perf/builtin-top.c
b/tools/perf/builtin-top.c
index 0a26b56afcc5d974e64be252c2afe8d07eb27e01..113c298ed38ba12c62e401c91c8c72296fbb9f60 100644
(file)
--- a/
tools/perf/builtin-top.c
+++ b/
tools/perf/builtin-top.c
@@
-1223,8
+1223,10
@@
parse_callchain_opt(const struct option *opt, const char *arg, int unset)
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;