|
6 | 6 | #include <linux/compiler.h> |
7 | 7 | #include <linux/list.h> |
8 | 8 | #include <linux/rbtree.h> |
9 | | -#include <pthread.h> |
10 | 9 | #include <stdio.h> |
11 | 10 | #include <string.h> |
12 | 11 | #include <stdbool.h> |
13 | 12 | #include <linux/types.h> |
14 | | -#include "rwsem.h" |
15 | 13 |
|
16 | 14 | struct dso; |
17 | 15 | struct ip_callchain; |
@@ -48,38 +46,7 @@ struct map { |
48 | 46 | refcount_t refcnt; |
49 | 47 | }; |
50 | 48 |
|
51 | | -#define KMAP_NAME_LEN 256 |
52 | | - |
53 | | -struct kmap { |
54 | | - struct ref_reloc_sym *ref_reloc_sym; |
55 | | - struct map_groups *kmaps; |
56 | | - char name[KMAP_NAME_LEN]; |
57 | | -}; |
58 | | - |
59 | | -struct maps { |
60 | | - struct rb_root entries; |
61 | | - struct rb_root names; |
62 | | - struct rw_semaphore lock; |
63 | | -}; |
64 | | - |
65 | | -struct map_groups { |
66 | | - struct maps maps; |
67 | | - struct machine *machine; |
68 | | - refcount_t refcnt; |
69 | | -}; |
70 | | - |
71 | | -struct map_groups *map_groups__new(struct machine *machine); |
72 | | -void map_groups__delete(struct map_groups *mg); |
73 | | -bool map_groups__empty(struct map_groups *mg); |
74 | | - |
75 | | -static inline struct map_groups *map_groups__get(struct map_groups *mg) |
76 | | -{ |
77 | | - if (mg) |
78 | | - refcount_inc(&mg->refcnt); |
79 | | - return mg; |
80 | | -} |
81 | | - |
82 | | -void map_groups__put(struct map_groups *mg); |
| 49 | +struct kmap; |
83 | 50 |
|
84 | 51 | struct kmap *__map__kmap(struct map *map); |
85 | 52 | struct kmap *map__kmap(struct map *map); |
@@ -187,61 +154,9 @@ void map__fixup_end(struct map *map); |
187 | 154 |
|
188 | 155 | void map__reloc_vmlinux(struct map *map); |
189 | 156 |
|
190 | | -void maps__insert(struct maps *maps, struct map *map); |
191 | | -void maps__remove(struct maps *maps, struct map *map); |
192 | | -struct map *maps__find(struct maps *maps, u64 addr); |
193 | | -struct map *maps__first(struct maps *maps); |
194 | | -struct map *map__next(struct map *map); |
195 | | -struct symbol *maps__find_symbol_by_name(struct maps *maps, const char *name, |
196 | | - struct map **mapp); |
197 | | -void map_groups__init(struct map_groups *mg, struct machine *machine); |
198 | | -void map_groups__exit(struct map_groups *mg); |
199 | | -int map_groups__clone(struct thread *thread, |
200 | | - struct map_groups *parent); |
201 | | -size_t map_groups__fprintf(struct map_groups *mg, FILE *fp); |
202 | | - |
203 | 157 | int map__set_kallsyms_ref_reloc_sym(struct map *map, const char *symbol_name, |
204 | 158 | u64 addr); |
205 | 159 |
|
206 | | -static inline void map_groups__insert(struct map_groups *mg, struct map *map) |
207 | | -{ |
208 | | - maps__insert(&mg->maps, map); |
209 | | - map->groups = mg; |
210 | | -} |
211 | | - |
212 | | -static inline void map_groups__remove(struct map_groups *mg, struct map *map) |
213 | | -{ |
214 | | - maps__remove(&mg->maps, map); |
215 | | -} |
216 | | - |
217 | | -static inline struct map *map_groups__find(struct map_groups *mg, u64 addr) |
218 | | -{ |
219 | | - return maps__find(&mg->maps, addr); |
220 | | -} |
221 | | - |
222 | | -struct map *map_groups__first(struct map_groups *mg); |
223 | | - |
224 | | -static inline struct map *map_groups__next(struct map *map) |
225 | | -{ |
226 | | - return map__next(map); |
227 | | -} |
228 | | - |
229 | | -struct symbol *map_groups__find_symbol(struct map_groups *mg, |
230 | | - u64 addr, struct map **mapp); |
231 | | - |
232 | | -struct symbol *map_groups__find_symbol_by_name(struct map_groups *mg, |
233 | | - const char *name, |
234 | | - struct map **mapp); |
235 | | - |
236 | | -struct addr_map_symbol; |
237 | | - |
238 | | -int map_groups__find_ams(struct addr_map_symbol *ams); |
239 | | - |
240 | | -int map_groups__fixup_overlappings(struct map_groups *mg, struct map *map, |
241 | | - FILE *fp); |
242 | | - |
243 | | -struct map *map_groups__find_by_name(struct map_groups *mg, const char *name); |
244 | | - |
245 | 160 | bool __map__is_kernel(const struct map *map); |
246 | 161 | bool __map__is_extra_kernel_map(const struct map *map); |
247 | 162 |
|
|
0 commit comments