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.h21
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);
88void map__init(struct map *map, enum map_type type, 91void 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);
90struct map *map__new(struct list_head *dsos__list, u64 start, u64 len, 93struct 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);
93struct map *map__new2(u64 start, struct dso *dso, enum map_type type); 97struct map *map__new2(u64 start, struct dso *dso, enum map_type type);
94void map__delete(struct map *map); 98void map__delete(struct map *map);
95struct map *map__clone(struct map *map); 99struct map *map__clone(struct map *map);
@@ -112,6 +116,8 @@ size_t __map_groups__fprintf_maps(struct map_groups *mg,
112void maps__insert(struct rb_root *maps, struct map *map); 116void maps__insert(struct rb_root *maps, struct map *map);
113void maps__remove(struct rb_root *maps, struct map *map); 117void maps__remove(struct rb_root *maps, struct map *map);
114struct map *maps__find(struct rb_root *maps, u64 addr); 118struct map *maps__find(struct rb_root *maps, u64 addr);
119struct map *maps__first(struct rb_root *maps);
120struct map *maps__next(struct map *map);
115void map_groups__init(struct map_groups *mg); 121void map_groups__init(struct map_groups *mg);
116void map_groups__exit(struct map_groups *mg); 122void map_groups__exit(struct map_groups *mg);
117int map_groups__clone(struct map_groups *mg, 123int 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
148static 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
154static inline struct map *map_groups__next(struct map *map)
155{
156 return maps__next(map);
157}
158
142struct symbol *map_groups__find_symbol(struct map_groups *mg, 159struct 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,