From 8bd508b001629a5d836987d9a0702a6bfc4fc705 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Thu, 19 Nov 2015 14:01:19 +0100 Subject: perf callchain: Add order support for libdw DWARF unwinder As reported by Milian, currently for DWARF unwind (both libdw and libunwind) we display callchain in callee order only. Adding the support to follow callchain order setup to libdw DWARF unwinder, so we could get following output for report: $ perf record --call-graph dwarf ls ... $ perf report --no-children --stdio 21.12% ls libc-2.21.so [.] __strcoll_l | ---__strcoll_l mpsort_with_tmp mpsort_with_tmp mpsort_with_tmp sort_files main __libc_start_main _start $ perf report --stdio --no-children -g caller 21.12% ls libc-2.21.so [.] __strcoll_l | ---_start __libc_start_main main sort_files mpsort_with_tmp mpsort_with_tmp mpsort_with_tmp __strcoll_l Reported-and-Tested-by: Milian Wolff Signed-off-by: Jiri Olsa Tested-by: Wang Nan Cc: David Ahern Cc: Jan Kratochvil Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/20151119130119.GA26617@krava.brq.redhat.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/unwind-libdw.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/perf/util/unwind-libdw.h') diff --git a/tools/perf/util/unwind-libdw.h b/tools/perf/util/unwind-libdw.h index 417a1426f3ad..58328669ed16 100644 --- a/tools/perf/util/unwind-libdw.h +++ b/tools/perf/util/unwind-libdw.h @@ -16,6 +16,8 @@ struct unwind_info { unwind_entry_cb_t cb; void *arg; int max_stack; + int idx; + struct unwind_entry entries[]; }; #endif /* __PERF_UNWIND_LIBDW_H */ -- cgit v1.2.3-59-g8ed1b