ARM: shmobile: Add DT bindings for Renesas memory controllers
[linux/fpc-iii.git] / tools / perf / util / unwind.h
blob12790cf94618eddb9cdcec8607792f57e75a73c8
1 #ifndef __UNWIND_H
2 #define __UNWIND_H
4 #include <linux/types.h>
5 #include "event.h"
6 #include "symbol.h"
7 #include "thread.h"
9 struct unwind_entry {
10 struct map *map;
11 struct symbol *sym;
12 u64 ip;
15 typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry, void *arg);
17 #ifdef HAVE_DWARF_UNWIND_SUPPORT
18 int unwind__get_entries(unwind_entry_cb_t cb, void *arg,
19 struct thread *thread,
20 struct perf_sample *data, int max_stack);
21 /* libunwind specific */
22 #ifdef HAVE_LIBUNWIND_SUPPORT
23 int libunwind__arch_reg_id(int regnum);
24 int unwind__prepare_access(struct thread *thread);
25 void unwind__flush_access(struct thread *thread);
26 void unwind__finish_access(struct thread *thread);
27 #else
28 static inline int unwind__prepare_access(struct thread *thread __maybe_unused)
30 return 0;
33 static inline void unwind__flush_access(struct thread *thread __maybe_unused) {}
34 static inline void unwind__finish_access(struct thread *thread __maybe_unused) {}
35 #endif
36 #else
37 static inline int
38 unwind__get_entries(unwind_entry_cb_t cb __maybe_unused,
39 void *arg __maybe_unused,
40 struct thread *thread __maybe_unused,
41 struct perf_sample *data __maybe_unused,
42 int max_stack __maybe_unused)
44 return 0;
47 static inline int unwind__prepare_access(struct thread *thread __maybe_unused)
49 return 0;
52 static inline void unwind__flush_access(struct thread *thread __maybe_unused) {}
53 static inline void unwind__finish_access(struct thread *thread __maybe_unused) {}
54 #endif /* HAVE_DWARF_UNWIND_SUPPORT */
55 #endif /* __UNWIND_H */