diff options
Diffstat (limited to 'tools/perf/util/map.h')
-rw-r--r-- | tools/perf/util/map.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h index a887f2c9dfbb..4886ca280536 100644 --- a/tools/perf/util/map.h +++ b/tools/perf/util/map.h | |||
@@ -36,6 +36,9 @@ struct map { | |||
36 | bool erange_warned; | 36 | bool erange_warned; |
37 | u32 priv; | 37 | u32 priv; |
38 | u64 pgoff; | 38 | u64 pgoff; |
39 | u32 maj, min; /* only valid for MMAP2 record */ | ||
40 | u64 ino; /* only valid for MMAP2 record */ | ||
41 | u64 ino_generation;/* only valid for MMAP2 record */ | ||
39 | 42 | ||
40 | /* ip -> dso rip */ | 43 | /* ip -> dso rip */ |
41 | u64 (*map_ip)(struct map *, u64); | 44 | u64 (*map_ip)(struct map *, u64); |
@@ -88,8 +91,9 @@ typedef int (*symbol_filter_t)(struct map *map, struct symbol *sym); | |||
88 | void map__init(struct map *map, enum map_type type, | 91 | void map__init(struct map *map, enum map_type type, |
89 | u64 start, u64 end, u64 pgoff, struct dso *dso); | 92 | u64 start, u64 end, u64 pgoff, struct dso *dso); |
90 | struct map *map__new(struct list_head *dsos__list, u64 start, u64 len, | 93 | struct map *map__new(struct list_head *dsos__list, u64 start, u64 len, |
91 | u64 pgoff, u32 pid, char *filename, | 94 | u64 pgoff, u32 pid, u32 d_maj, u32 d_min, u64 ino, |
92 | enum map_type type); | 95 | u64 ino_gen, |
96 | char *filename, enum map_type type); | ||
93 | struct map *map__new2(u64 start, struct dso *dso, enum map_type type); | 97 | struct map *map__new2(u64 start, struct dso *dso, enum map_type type); |
94 | void map__delete(struct map *map); | 98 | void map__delete(struct map *map); |
95 | struct map *map__clone(struct map *map); | 99 | struct map *map__clone(struct map *map); |
@@ -112,6 +116,8 @@ size_t __map_groups__fprintf_maps(struct map_groups *mg, | |||
112 | void maps__insert(struct rb_root *maps, struct map *map); | 116 | void maps__insert(struct rb_root *maps, struct map *map); |
113 | void maps__remove(struct rb_root *maps, struct map *map); | 117 | void maps__remove(struct rb_root *maps, struct map *map); |
114 | struct map *maps__find(struct rb_root *maps, u64 addr); | 118 | struct map *maps__find(struct rb_root *maps, u64 addr); |
119 | struct map *maps__first(struct rb_root *maps); | ||
120 | struct map *maps__next(struct map *map); | ||
115 | void map_groups__init(struct map_groups *mg); | 121 | void map_groups__init(struct map_groups *mg); |
116 | void map_groups__exit(struct map_groups *mg); | 122 | void map_groups__exit(struct map_groups *mg); |
117 | int map_groups__clone(struct map_groups *mg, | 123 | int map_groups__clone(struct map_groups *mg, |
@@ -139,6 +145,17 @@ static inline struct map *map_groups__find(struct map_groups *mg, | |||
139 | return maps__find(&mg->maps[type], addr); | 145 | return maps__find(&mg->maps[type], addr); |
140 | } | 146 | } |
141 | 147 | ||
148 | static inline struct map *map_groups__first(struct map_groups *mg, | ||
149 | enum map_type type) | ||
150 | { | ||
151 | return maps__first(&mg->maps[type]); | ||
152 | } | ||
153 | |||
154 | static inline struct map *map_groups__next(struct map *map) | ||
155 | { | ||
156 | return maps__next(map); | ||
157 | } | ||
158 | |||
142 | struct symbol *map_groups__find_symbol(struct map_groups *mg, | 159 | struct symbol *map_groups__find_symbol(struct map_groups *mg, |
143 | enum map_type type, u64 addr, | 160 | enum map_type type, u64 addr, |
144 | struct map **mapp, | 161 | struct map **mapp, |