| .. | .. |
|---|
| 4 | 4 | |
|---|
| 5 | 5 | #include <linux/compiler.h> |
|---|
| 6 | 6 | #include <linux/types.h> |
|---|
| 7 | +#include "util/map_symbol.h" |
|---|
| 7 | 8 | |
|---|
| 8 | | -struct map; |
|---|
| 9 | +struct maps; |
|---|
| 9 | 10 | struct perf_sample; |
|---|
| 10 | | -struct symbol; |
|---|
| 11 | 11 | struct thread; |
|---|
| 12 | 12 | |
|---|
| 13 | 13 | struct unwind_entry { |
|---|
| 14 | | - struct map *map; |
|---|
| 15 | | - struct symbol *sym; |
|---|
| 16 | | - u64 ip; |
|---|
| 14 | + struct map_symbol ms; |
|---|
| 15 | + u64 ip; |
|---|
| 17 | 16 | }; |
|---|
| 18 | 17 | |
|---|
| 19 | 18 | typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry, void *arg); |
|---|
| 20 | 19 | |
|---|
| 21 | 20 | struct unwind_libunwind_ops { |
|---|
| 22 | | - int (*prepare_access)(struct thread *thread); |
|---|
| 23 | | - void (*flush_access)(struct thread *thread); |
|---|
| 24 | | - void (*finish_access)(struct thread *thread); |
|---|
| 21 | + int (*prepare_access)(struct maps *maps); |
|---|
| 22 | + void (*flush_access)(struct maps *maps); |
|---|
| 23 | + void (*finish_access)(struct maps *maps); |
|---|
| 25 | 24 | int (*get_entries)(unwind_entry_cb_t cb, void *arg, |
|---|
| 26 | 25 | struct thread *thread, |
|---|
| 27 | 26 | struct perf_sample *data, int max_stack); |
|---|
| .. | .. |
|---|
| 46 | 45 | #endif |
|---|
| 47 | 46 | |
|---|
| 48 | 47 | int LIBUNWIND__ARCH_REG_ID(int regnum); |
|---|
| 49 | | -int unwind__prepare_access(struct thread *thread, struct map *map, |
|---|
| 50 | | - bool *initialized); |
|---|
| 51 | | -void unwind__flush_access(struct thread *thread); |
|---|
| 52 | | -void unwind__finish_access(struct thread *thread); |
|---|
| 48 | +int unwind__prepare_access(struct maps *maps, struct map *map, bool *initialized); |
|---|
| 49 | +void unwind__flush_access(struct maps *maps); |
|---|
| 50 | +void unwind__finish_access(struct maps *maps); |
|---|
| 53 | 51 | #else |
|---|
| 54 | | -static inline int unwind__prepare_access(struct thread *thread __maybe_unused, |
|---|
| 52 | +static inline int unwind__prepare_access(struct maps *maps __maybe_unused, |
|---|
| 55 | 53 | struct map *map __maybe_unused, |
|---|
| 56 | 54 | bool *initialized __maybe_unused) |
|---|
| 57 | 55 | { |
|---|
| 58 | 56 | return 0; |
|---|
| 59 | 57 | } |
|---|
| 60 | 58 | |
|---|
| 61 | | -static inline void unwind__flush_access(struct thread *thread __maybe_unused) {} |
|---|
| 62 | | -static inline void unwind__finish_access(struct thread *thread __maybe_unused) {} |
|---|
| 59 | +static inline void unwind__flush_access(struct maps *maps __maybe_unused) {} |
|---|
| 60 | +static inline void unwind__finish_access(struct maps *maps __maybe_unused) {} |
|---|
| 63 | 61 | #endif |
|---|
| 64 | 62 | #else |
|---|
| 65 | 63 | static inline int |
|---|
| .. | .. |
|---|
| 72 | 70 | return 0; |
|---|
| 73 | 71 | } |
|---|
| 74 | 72 | |
|---|
| 75 | | -static inline int unwind__prepare_access(struct thread *thread __maybe_unused, |
|---|
| 73 | +static inline int unwind__prepare_access(struct maps *maps __maybe_unused, |
|---|
| 76 | 74 | struct map *map __maybe_unused, |
|---|
| 77 | 75 | bool *initialized __maybe_unused) |
|---|
| 78 | 76 | { |
|---|
| 79 | 77 | return 0; |
|---|
| 80 | 78 | } |
|---|
| 81 | 79 | |
|---|
| 82 | | -static inline void unwind__flush_access(struct thread *thread __maybe_unused) {} |
|---|
| 83 | | -static inline void unwind__finish_access(struct thread *thread __maybe_unused) {} |
|---|
| 80 | +static inline void unwind__flush_access(struct maps *maps __maybe_unused) {} |
|---|
| 81 | +static inline void unwind__finish_access(struct maps *maps __maybe_unused) {} |
|---|
| 84 | 82 | #endif /* HAVE_DWARF_UNWIND_SUPPORT */ |
|---|
| 85 | 83 | #endif /* __UNWIND_H */ |
|---|