Jiri Olsa | 71ad0f5 | 2012-08-07 15:20:46 +0200 | [diff] [blame] | 1 | #ifndef __UNWIND_H |
| 2 | #define __UNWIND_H |
| 3 | |
| 4 | #include "types.h" |
| 5 | #include "event.h" |
| 6 | #include "symbol.h" |
| 7 | |
| 8 | struct unwind_entry { |
| 9 | struct map *map; |
| 10 | struct symbol *sym; |
| 11 | u64 ip; |
| 12 | }; |
| 13 | |
| 14 | typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry, void *arg); |
| 15 | |
Ingo Molnar | 89fe808 | 2013-09-30 12:07:11 +0200 | [diff] [blame] | 16 | #ifdef HAVE_LIBUNWIND_SUPPORT |
Jiri Olsa | 71ad0f5 | 2012-08-07 15:20:46 +0200 | [diff] [blame] | 17 | int unwind__get_entries(unwind_entry_cb_t cb, void *arg, |
| 18 | struct machine *machine, |
| 19 | struct thread *thread, |
| 20 | u64 sample_uregs, |
Arnaldo Carvalho de Melo | 37676af | 2013-11-13 17:40:36 -0300 | [diff] [blame] | 21 | struct perf_sample *data, int max_stack); |
Jiri Olsa | 71ad0f5 | 2012-08-07 15:20:46 +0200 | [diff] [blame] | 22 | int unwind__arch_reg_id(int regnum); |
| 23 | #else |
| 24 | static inline int |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 25 | unwind__get_entries(unwind_entry_cb_t cb __maybe_unused, |
| 26 | void *arg __maybe_unused, |
| 27 | struct machine *machine __maybe_unused, |
| 28 | struct thread *thread __maybe_unused, |
| 29 | u64 sample_uregs __maybe_unused, |
Arnaldo Carvalho de Melo | 37676af | 2013-11-13 17:40:36 -0300 | [diff] [blame] | 30 | struct perf_sample *data __maybe_unused, |
| 31 | int max_stack __maybe_unused) |
Jiri Olsa | 71ad0f5 | 2012-08-07 15:20:46 +0200 | [diff] [blame] | 32 | { |
| 33 | return 0; |
| 34 | } |
Ingo Molnar | 89fe808 | 2013-09-30 12:07:11 +0200 | [diff] [blame] | 35 | #endif /* HAVE_LIBUNWIND_SUPPORT */ |
Jiri Olsa | 71ad0f5 | 2012-08-07 15:20:46 +0200 | [diff] [blame] | 36 | #endif /* __UNWIND_H */ |