37676af15c
It was affecting only frame-pointer (fp) based callchain processing. Usage example: perf top --call-graph dwarf,1024 --max-stack 2 Works for any tool that does callchain resolving and provides a --max-stack option. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Waiman Long <Waiman.Long@hp.com> Link: http://lkml.kernel.org/n/tip-eu45v8s3tq9ruay8tpfyon79@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
37 lines
891 B
C
37 lines
891 B
C
#ifndef __UNWIND_H
|
|
#define __UNWIND_H
|
|
|
|
#include "types.h"
|
|
#include "event.h"
|
|
#include "symbol.h"
|
|
|
|
struct unwind_entry {
|
|
struct map *map;
|
|
struct symbol *sym;
|
|
u64 ip;
|
|
};
|
|
|
|
typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry, void *arg);
|
|
|
|
#ifdef HAVE_LIBUNWIND_SUPPORT
|
|
int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
|
|
struct machine *machine,
|
|
struct thread *thread,
|
|
u64 sample_uregs,
|
|
struct perf_sample *data, int max_stack);
|
|
int unwind__arch_reg_id(int regnum);
|
|
#else
|
|
static inline int
|
|
unwind__get_entries(unwind_entry_cb_t cb __maybe_unused,
|
|
void *arg __maybe_unused,
|
|
struct machine *machine __maybe_unused,
|
|
struct thread *thread __maybe_unused,
|
|
u64 sample_uregs __maybe_unused,
|
|
struct perf_sample *data __maybe_unused,
|
|
int max_stack __maybe_unused)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif /* HAVE_LIBUNWIND_SUPPORT */
|
|
#endif /* __UNWIND_H */
|