summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/map_groups.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/map_groups.h')
-rw-r--r--tools/perf/util/map_groups.h60
1 files changed, 23 insertions, 37 deletions
diff --git a/tools/perf/util/map_groups.h b/tools/perf/util/map_groups.h
index f6270243ac4b..8a45994d6a97 100644
--- a/tools/perf/util/map_groups.h
+++ b/tools/perf/util/map_groups.h
@@ -12,13 +12,9 @@
struct ref_reloc_sym;
struct machine;
struct map;
+struct maps;
struct thread;
-struct maps {
- struct rb_root entries;
- struct rw_semaphore lock;
-};
-
struct map *maps__find(struct maps *maps, u64 addr);
struct map *maps__first(struct maps *maps);
struct map *map__next(struct map *map);
@@ -29,8 +25,9 @@ struct map *map__next(struct map *map);
#define maps__for_each_entry_safe(maps, map, next) \
for (map = maps__first(maps), next = map__next(map); map; map = next, next = map__next(map))
-struct map_groups {
- struct maps maps;
+struct maps {
+ struct rb_root entries;
+ struct rw_semaphore lock;
struct machine *machine;
struct map *last_search_by_name;
struct map **maps_by_name;
@@ -47,55 +44,44 @@ struct map_groups {
struct kmap {
struct ref_reloc_sym *ref_reloc_sym;
- struct map_groups *kmaps;
+ struct maps *kmaps;
char name[KMAP_NAME_LEN];
};
-struct map_groups *map_groups__new(struct machine *machine);
-void map_groups__delete(struct map_groups *mg);
-bool map_groups__empty(struct map_groups *mg);
+struct maps *maps__new(struct machine *machine);
+void maps__delete(struct maps *mg);
+bool maps__empty(struct maps *mg);
-static inline struct map_groups *map_groups__get(struct map_groups *mg)
+static inline struct maps *maps__get(struct maps *mg)
{
if (mg)
refcount_inc(&mg->refcnt);
return mg;
}
-void map_groups__put(struct map_groups *mg);
-void map_groups__init(struct map_groups *mg, struct machine *machine);
-void map_groups__exit(struct map_groups *mg);
-int map_groups__clone(struct thread *thread, struct map_groups *parent);
-size_t map_groups__fprintf(struct map_groups *mg, FILE *fp);
-
-void map_groups__insert(struct map_groups *mg, struct map *map);
-
-void map_groups__remove(struct map_groups *mg, struct map *map);
-
-static inline struct map *map_groups__find(struct map_groups *mg, u64 addr)
-{
- return maps__find(&mg->maps, addr);
-}
+void maps__put(struct maps *mg);
+void maps__init(struct maps *mg, struct machine *machine);
+void maps__exit(struct maps *mg);
+int maps__clone(struct thread *thread, struct maps *parent);
+size_t maps__fprintf(struct maps *mg, FILE *fp);
-#define map_groups__for_each_entry(mg, map) \
- for (map = maps__first(&mg->maps); map; map = map__next(map))
+void maps__insert(struct maps *mg, struct map *map);
-#define map_groups__for_each_entry_safe(mg, map, next) \
- for (map = maps__first(&mg->maps), next = map__next(map); map; map = next, next = map__next(map))
+void maps__remove(struct maps *mg, struct map *map);
-struct symbol *map_groups__find_symbol(struct map_groups *mg, u64 addr, struct map **mapp);
-struct symbol *map_groups__find_symbol_by_name(struct map_groups *mg, const char *name, struct map **mapp);
+struct symbol *maps__find_symbol(struct maps *mg, u64 addr, struct map **mapp);
+struct symbol *maps__find_symbol_by_name(struct maps *mg, const char *name, struct map **mapp);
struct addr_map_symbol;
-int map_groups__find_ams(struct map_groups *mg, struct addr_map_symbol *ams);
+int maps__find_ams(struct maps *mg, struct addr_map_symbol *ams);
-int map_groups__fixup_overlappings(struct map_groups *mg, struct map *map, FILE *fp);
+int maps__fixup_overlappings(struct maps *mg, struct map *map, FILE *fp);
-struct map *map_groups__find_by_name(struct map_groups *mg, const char *name);
+struct map *maps__find_by_name(struct maps *mg, const char *name);
-int map_groups__merge_in(struct map_groups *kmaps, struct map *new_map);
+int maps__merge_in(struct maps *kmaps, struct map *new_map);
-void __map_groups__sort_by_name(struct map_groups *mg);
+void __maps__sort_by_name(struct maps *mg);
#endif // __PERF_MAP_GROUPS_H