diff options
Diffstat (limited to 'tools/perf/util/map.h')
-rw-r--r-- | tools/perf/util/map.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h index 72f0b6ab5ea5..de048399d776 100644 --- a/tools/perf/util/map.h +++ b/tools/perf/util/map.h | |||
@@ -14,6 +14,8 @@ enum map_type { | |||
14 | #define MAP__NR_TYPES (MAP__VARIABLE + 1) | 14 | #define MAP__NR_TYPES (MAP__VARIABLE + 1) |
15 | 15 | ||
16 | struct dso; | 16 | struct dso; |
17 | struct ref_reloc_sym; | ||
18 | struct map_groups; | ||
17 | 19 | ||
18 | struct map { | 20 | struct map { |
19 | union { | 21 | union { |
@@ -29,6 +31,16 @@ struct map { | |||
29 | struct dso *dso; | 31 | struct dso *dso; |
30 | }; | 32 | }; |
31 | 33 | ||
34 | struct kmap { | ||
35 | struct ref_reloc_sym *ref_reloc_sym; | ||
36 | struct map_groups *kmaps; | ||
37 | }; | ||
38 | |||
39 | static inline struct kmap *map__kmap(struct map *self) | ||
40 | { | ||
41 | return (struct kmap *)(self + 1); | ||
42 | } | ||
43 | |||
32 | static inline u64 map__map_ip(struct map *map, u64 ip) | 44 | static inline u64 map__map_ip(struct map *map, u64 ip) |
33 | { | 45 | { |
34 | return ip - map->start + map->pgoff; | 46 | return ip - map->start + map->pgoff; |
@@ -58,16 +70,14 @@ struct map *map__clone(struct map *self); | |||
58 | int map__overlap(struct map *l, struct map *r); | 70 | int map__overlap(struct map *l, struct map *r); |
59 | size_t map__fprintf(struct map *self, FILE *fp); | 71 | size_t map__fprintf(struct map *self, FILE *fp); |
60 | 72 | ||
61 | struct perf_session; | 73 | int map__load(struct map *self, symbol_filter_t filter); |
62 | 74 | struct symbol *map__find_symbol(struct map *self, | |
63 | int map__load(struct map *self, struct perf_session *session, | ||
64 | symbol_filter_t filter); | ||
65 | struct symbol *map__find_symbol(struct map *self, struct perf_session *session, | ||
66 | u64 addr, symbol_filter_t filter); | 75 | u64 addr, symbol_filter_t filter); |
67 | struct symbol *map__find_symbol_by_name(struct map *self, const char *name, | 76 | struct symbol *map__find_symbol_by_name(struct map *self, const char *name, |
68 | struct perf_session *session, | ||
69 | symbol_filter_t filter); | 77 | symbol_filter_t filter); |
70 | void map__fixup_start(struct map *self); | 78 | void map__fixup_start(struct map *self); |
71 | void map__fixup_end(struct map *self); | 79 | void map__fixup_end(struct map *self); |
72 | 80 | ||
81 | void map__reloc_vmlinux(struct map *self); | ||
82 | |||
73 | #endif /* __PERF_MAP_H */ | 83 | #endif /* __PERF_MAP_H */ |