path: root/tools/perf/builtin-top.c
diff options
authorNamhyung Kim <>2015-10-22 16:45:46 +0900
committerArnaldo Carvalho de Melo <>2015-10-22 15:40:11 -0300
commit792aeafa8ed08e5e18fb66ab93b470f78e619f75 (patch)
tree5f0915238c4d7fc2a639aae06a4e070eadcccd91 /tools/perf/builtin-top.c
parenta2c10d39af49b00514f7cc7b750757fcc2174f0c (diff)
perf tools: Defaults to 'caller' callchain order only if --children is enabled
The caller callchain order is useful with --children option since it can show 'overview' style output, but other commands which don't use --children feature like 'perf script' or even 'perf report/top' without --children are better to keep callee order. Signed-off-by: Namhyung Kim <> Acked-by: Brendan Gregg <> Acked-by: Frederic Weisbecker <> Acked-by: Ingo Molnar <> Cc: Adrian Hunter <> Cc: Borislav Petkov <> Cc: Chandler Carruth <> Cc: David Ahern <> Cc: Jiri Olsa <> Cc: Peter Zijlstra <> Cc: Stephane Eranian <> Cc: Wang Nan <> Link: Signed-off-by: Arnaldo Carvalho de Melo <>
Diffstat (limited to 'tools/perf/builtin-top.c')
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 1de381d3f29f..af849b1d7389 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1304,6 +1304,9 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
+ if (symbol_conf.cumulate_callchain && !callchain_param.order_set)
+ callchain_param.order = ORDER_CALLER;
symbol_conf.priv_size = sizeof(struct annotation);
symbol_conf.try_vmlinux_path = (symbol_conf.vmlinux_name == NULL);