aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/map.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/map.h')
-rw-r--r--tools/perf/util/map.h22
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
16struct dso; 16struct dso;
17struct ref_reloc_sym;
18struct map_groups;
17 19
18struct map { 20struct map {
19 union { 21 union {
@@ -29,6 +31,16 @@ struct map {
29 struct dso *dso; 31 struct dso *dso;
30}; 32};
31 33
34struct kmap {
35 struct ref_reloc_sym *ref_reloc_sym;
36 struct map_groups *kmaps;
37};
38
39static inline struct kmap *map__kmap(struct map *self)
40{
41 return (struct kmap *)(self + 1);
42}
43
32static inline u64 map__map_ip(struct map *map, u64 ip) 44static 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);
58int map__overlap(struct map *l, struct map *r); 70int map__overlap(struct map *l, struct map *r);
59size_t map__fprintf(struct map *self, FILE *fp); 71size_t map__fprintf(struct map *self, FILE *fp);
60 72
61struct perf_session; 73int map__load(struct map *self, symbol_filter_t filter);
62 74struct symbol *map__find_symbol(struct map *self,
63int map__load(struct map *self, struct perf_session *session,
64 symbol_filter_t filter);
65struct 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);
67struct symbol *map__find_symbol_by_name(struct map *self, const char *name, 76struct 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);
70void map__fixup_start(struct map *self); 78void map__fixup_start(struct map *self);
71void map__fixup_end(struct map *self); 79void map__fixup_end(struct map *self);
72 80
81void map__reloc_vmlinux(struct map *self);
82
73#endif /* __PERF_MAP_H */ 83#endif /* __PERF_MAP_H */