diff options
Diffstat (limited to 'tools/perf/util/map.h')
-rw-r--r-- | tools/perf/util/map.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h index f39134512829..78575796d5f3 100644 --- a/tools/perf/util/map.h +++ b/tools/perf/util/map.h | |||
@@ -29,7 +29,8 @@ struct map { | |||
29 | }; | 29 | }; |
30 | u64 start; | 30 | u64 start; |
31 | u64 end; | 31 | u64 end; |
32 | enum map_type type; | 32 | u8 /* enum map_type */ type; |
33 | bool referenced; | ||
33 | u32 priv; | 34 | u32 priv; |
34 | u64 pgoff; | 35 | u64 pgoff; |
35 | 36 | ||
@@ -106,7 +107,7 @@ void map__init(struct map *self, enum map_type type, | |||
106 | u64 start, u64 end, u64 pgoff, struct dso *dso); | 107 | u64 start, u64 end, u64 pgoff, struct dso *dso); |
107 | struct map *map__new(struct list_head *dsos__list, u64 start, u64 len, | 108 | struct map *map__new(struct list_head *dsos__list, u64 start, u64 len, |
108 | u64 pgoff, u32 pid, char *filename, | 109 | u64 pgoff, u32 pid, char *filename, |
109 | enum map_type type, char *cwd, int cwdlen); | 110 | enum map_type type); |
110 | void map__delete(struct map *self); | 111 | void map__delete(struct map *self); |
111 | struct map *map__clone(struct map *self); | 112 | struct map *map__clone(struct map *self); |
112 | int map__overlap(struct map *l, struct map *r); | 113 | int map__overlap(struct map *l, struct map *r); |
@@ -125,8 +126,10 @@ void map__reloc_vmlinux(struct map *self); | |||
125 | size_t __map_groups__fprintf_maps(struct map_groups *self, | 126 | size_t __map_groups__fprintf_maps(struct map_groups *self, |
126 | enum map_type type, int verbose, FILE *fp); | 127 | enum map_type type, int verbose, FILE *fp); |
127 | void maps__insert(struct rb_root *maps, struct map *map); | 128 | void maps__insert(struct rb_root *maps, struct map *map); |
129 | void maps__remove(struct rb_root *self, struct map *map); | ||
128 | struct map *maps__find(struct rb_root *maps, u64 addr); | 130 | struct map *maps__find(struct rb_root *maps, u64 addr); |
129 | void map_groups__init(struct map_groups *self); | 131 | void map_groups__init(struct map_groups *self); |
132 | void map_groups__exit(struct map_groups *self); | ||
130 | int map_groups__clone(struct map_groups *self, | 133 | int map_groups__clone(struct map_groups *self, |
131 | struct map_groups *parent, enum map_type type); | 134 | struct map_groups *parent, enum map_type type); |
132 | size_t map_groups__fprintf(struct map_groups *self, int verbose, FILE *fp); | 135 | size_t map_groups__fprintf(struct map_groups *self, int verbose, FILE *fp); |
@@ -142,6 +145,8 @@ struct machine *machines__find(struct rb_root *self, pid_t pid); | |||
142 | struct machine *machines__findnew(struct rb_root *self, pid_t pid); | 145 | struct machine *machines__findnew(struct rb_root *self, pid_t pid); |
143 | char *machine__mmap_name(struct machine *self, char *bf, size_t size); | 146 | char *machine__mmap_name(struct machine *self, char *bf, size_t size); |
144 | int machine__init(struct machine *self, const char *root_dir, pid_t pid); | 147 | int machine__init(struct machine *self, const char *root_dir, pid_t pid); |
148 | void machine__exit(struct machine *self); | ||
149 | void machine__delete(struct machine *self); | ||
145 | 150 | ||
146 | /* | 151 | /* |
147 | * Default guest kernel is defined by parameter --guestkallsyms | 152 | * Default guest kernel is defined by parameter --guestkallsyms |
@@ -163,6 +168,11 @@ static inline void map_groups__insert(struct map_groups *self, struct map *map) | |||
163 | map->groups = self; | 168 | map->groups = self; |
164 | } | 169 | } |
165 | 170 | ||
171 | static inline void map_groups__remove(struct map_groups *self, struct map *map) | ||
172 | { | ||
173 | maps__remove(&self->maps[map->type], map); | ||
174 | } | ||
175 | |||
166 | static inline struct map *map_groups__find(struct map_groups *self, | 176 | static inline struct map *map_groups__find(struct map_groups *self, |
167 | enum map_type type, u64 addr) | 177 | enum map_type type, u64 addr) |
168 | { | 178 | { |