diff options
author | Jiri Olsa <jolsa@redhat.com> | 2014-01-07 07:47:28 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-02-18 07:34:48 -0500 |
commit | 9ff125d132001c02d32a193a9423be0690526e11 (patch) | |
tree | 608fc071ded7d3b182df10641d2316ed0d9c5044 /tools/perf/util/unwind.h | |
parent | ea3da69df959dfa1c807586c061bfcc4ec7e5e17 (diff) |
perf callchain: Introduce HAVE_DWARF_UNWIND_SUPPORT macro
Introducing global macro HAVE_DWARF_UNWIND_SUPPORT to indicate we have
dwarf unwind support. Any library providing the dwarf post unwind
support will enable this macro.
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Jean Pihet <jean.pihet@linaro.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1389098853-14466-12-git-send-email-jolsa@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/unwind.h')
-rw-r--r-- | tools/perf/util/unwind.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/util/unwind.h b/tools/perf/util/unwind.h index 18f33b475c46..b031316f221a 100644 --- a/tools/perf/util/unwind.h +++ b/tools/perf/util/unwind.h | |||
@@ -13,12 +13,15 @@ struct unwind_entry { | |||
13 | 13 | ||
14 | typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry, void *arg); | 14 | typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry, void *arg); |
15 | 15 | ||
16 | #ifdef HAVE_LIBUNWIND_SUPPORT | 16 | #ifdef HAVE_DWARF_UNWIND_SUPPORT |
17 | int unwind__get_entries(unwind_entry_cb_t cb, void *arg, | 17 | int unwind__get_entries(unwind_entry_cb_t cb, void *arg, |
18 | struct machine *machine, | 18 | struct machine *machine, |
19 | struct thread *thread, | 19 | struct thread *thread, |
20 | struct perf_sample *data, int max_stack); | 20 | struct perf_sample *data, int max_stack); |
21 | /* libunwind specific */ | ||
22 | #ifdef HAVE_LIBUNWIND_SUPPORT | ||
21 | int libunwind__arch_reg_id(int regnum); | 23 | int libunwind__arch_reg_id(int regnum); |
24 | #endif | ||
22 | #else | 25 | #else |
23 | static inline int | 26 | static inline int |
24 | unwind__get_entries(unwind_entry_cb_t cb __maybe_unused, | 27 | unwind__get_entries(unwind_entry_cb_t cb __maybe_unused, |
@@ -30,5 +33,5 @@ unwind__get_entries(unwind_entry_cb_t cb __maybe_unused, | |||
30 | { | 33 | { |
31 | return 0; | 34 | return 0; |
32 | } | 35 | } |
33 | #endif /* HAVE_LIBUNWIND_SUPPORT */ | 36 | #endif /* HAVE_DWARF_UNWIND_SUPPORT */ |
34 | #endif /* __UNWIND_H */ | 37 | #endif /* __UNWIND_H */ |