Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf callchain: Switch default to 'graph,0.5,caller'

Which is the most common default found in other similar tools.

Requested-by: Ingo Molnar <mingo@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Chandler Carruth <chandlerc@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://www.youtube.com/watch?v=nXaxk27zwlk
Link: http://lkml.kernel.org/n/tip-v8lq36aispvdwgxdmt9p9jd9@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+5 -5
+1 -1
tools/perf/Documentation/perf-report.txt
··· 192 192 when available. Usually more convenient to use --branch-history 193 193 for this. 194 194 195 - Default: fractal,0.5,callee,function. 195 + Default: graph,0.5,caller 196 196 197 197 --children:: 198 198 Accumulate callchain of children to parent entry so that then can
+2 -2
tools/perf/builtin-report.c
··· 633 633 bool has_br_stack = false; 634 634 int branch_mode = -1; 635 635 bool branch_call_mode = false; 636 - char callchain_default_opt[] = "fractal,0.5,callee"; 636 + char callchain_default_opt[] = "graph,0.5,caller"; 637 637 const char * const report_usage[] = { 638 638 "perf report [<options>]", 639 639 NULL ··· 701 701 "Only display entries with parent-match"), 702 702 OPT_CALLBACK_DEFAULT('g', "call-graph", &report, "output_type,min_percent[,print_limit],call_order[,branch]", 703 703 "Display callchains using output_type (graph, flat, fractal, or none) , min percent threshold, optional print limit, callchain order, key (function or address), add branches. " 704 - "Default: fractal,0.5,callee,function", &report_parse_callchain_opt, callchain_default_opt), 704 + "Default: graph,0.5,caller", &report_parse_callchain_opt, callchain_default_opt), 705 705 OPT_BOOLEAN(0, "children", &symbol_conf.cumulate_callchain, 706 706 "Accumulate callchains of children and show total overhead as well"), 707 707 OPT_INTEGER(0, "max-stack", &report.max_stack,
+2 -2
tools/perf/util/util.c
··· 17 17 #include "callchain.h" 18 18 19 19 struct callchain_param callchain_param = { 20 - .mode = CHAIN_GRAPH_REL, 20 + .mode = CHAIN_GRAPH_ABS, 21 21 .min_percent = 0.5, 22 - .order = ORDER_CALLEE, 22 + .order = ORDER_CALLER, 23 23 .key = CCKEY_FUNCTION 24 24 }; 25 25