![Jiri Olsa](/assets/img/avatar_default.png)
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 <milian.wolff@kdab.com> Signed-off-by: Jiri Olsa <jolsa@kernel.org> Tested-by: Wang Nan <wangnan0@huawei.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jan Kratochvil <jkratoch@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20151119130119.GA26617@krava.brq.redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
24 lines
501 B
C
24 lines
501 B
C
#ifndef __PERF_UNWIND_LIBDW_H
|
|
#define __PERF_UNWIND_LIBDW_H
|
|
|
|
#include <elfutils/libdwfl.h>
|
|
#include "event.h"
|
|
#include "thread.h"
|
|
#include "unwind.h"
|
|
|
|
bool libdw__arch_set_initial_registers(Dwfl_Thread *thread, void *arg);
|
|
|
|
struct unwind_info {
|
|
Dwfl *dwfl;
|
|
struct perf_sample *sample;
|
|
struct machine *machine;
|
|
struct thread *thread;
|
|
unwind_entry_cb_t cb;
|
|
void *arg;
|
|
int max_stack;
|
|
int idx;
|
|
struct unwind_entry entries[];
|
|
};
|
|
|
|
#endif /* __PERF_UNWIND_LIBDW_H */
|