diff options
Diffstat (limited to 'tools/perf/util/unwind.h')
-rw-r--r-- | tools/perf/util/unwind.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/tools/perf/util/unwind.h b/tools/perf/util/unwind.h new file mode 100644 index 000000000000..919bd6ad8501 --- /dev/null +++ b/tools/perf/util/unwind.h | |||
@@ -0,0 +1,34 @@ | |||
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 | |||
16 | #ifndef NO_LIBUNWIND_SUPPORT | ||
17 | int unwind__get_entries(unwind_entry_cb_t cb, void *arg, | ||
18 | struct machine *machine, | ||
19 | struct thread *thread, | ||
20 | u64 sample_uregs, | ||
21 | struct perf_sample *data); | ||
22 | int unwind__arch_reg_id(int regnum); | ||
23 | #else | ||
24 | static inline int | ||
25 | unwind__get_entries(unwind_entry_cb_t cb __used, void *arg __used, | ||
26 | struct machine *machine __used, | ||
27 | struct thread *thread __used, | ||
28 | u64 sample_uregs __used, | ||
29 | struct perf_sample *data __used) | ||
30 | { | ||
31 | return 0; | ||
32 | } | ||
33 | #endif /* NO_LIBUNWIND_SUPPORT */ | ||
34 | #endif /* __UNWIND_H */ | ||