hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/tools/perf/util/unwind.h
....@@ -4,24 +4,23 @@
44
55 #include <linux/compiler.h>
66 #include <linux/types.h>
7
+#include "util/map_symbol.h"
78
8
-struct map;
9
+struct maps;
910 struct perf_sample;
10
-struct symbol;
1111 struct thread;
1212
1313 struct unwind_entry {
14
- struct map *map;
15
- struct symbol *sym;
16
- u64 ip;
14
+ struct map_symbol ms;
15
+ u64 ip;
1716 };
1817
1918 typedef int (*unwind_entry_cb_t)(struct unwind_entry *entry, void *arg);
2019
2120 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);
2524 int (*get_entries)(unwind_entry_cb_t cb, void *arg,
2625 struct thread *thread,
2726 struct perf_sample *data, int max_stack);
....@@ -46,20 +45,19 @@
4645 #endif
4746
4847 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);
5351 #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,
5553 struct map *map __maybe_unused,
5654 bool *initialized __maybe_unused)
5755 {
5856 return 0;
5957 }
6058
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) {}
6361 #endif
6462 #else
6563 static inline int
....@@ -72,14 +70,14 @@
7270 return 0;
7371 }
7472
75
-static inline int unwind__prepare_access(struct thread *thread __maybe_unused,
73
+static inline int unwind__prepare_access(struct maps *maps __maybe_unused,
7674 struct map *map __maybe_unused,
7775 bool *initialized __maybe_unused)
7876 {
7977 return 0;
8078 }
8179
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) {}
8482 #endif /* HAVE_DWARF_UNWIND_SUPPORT */
8583 #endif /* __UNWIND_H */