diff options
Diffstat (limited to 'tools/perf/util/map.h')
-rw-r--r-- | tools/perf/util/map.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/util/map.h b/tools/perf/util/map.h index 257e513205ce..f00f058afb3b 100644 --- a/tools/perf/util/map.h +++ b/tools/perf/util/map.h | |||
@@ -90,6 +90,16 @@ u64 map__objdump_2mem(struct map *map, u64 ip); | |||
90 | 90 | ||
91 | struct symbol; | 91 | struct symbol; |
92 | 92 | ||
93 | /* map__for_each_symbol - iterate over the symbols in the given map | ||
94 | * | ||
95 | * @map: the 'struct map *' in which symbols itereated | ||
96 | * @pos: the 'struct symbol *' to use as a loop cursor | ||
97 | * @n: the 'struct rb_node *' to use as a temporary storage | ||
98 | * Note: caller must ensure map->dso is not NULL (map is loaded). | ||
99 | */ | ||
100 | #define map__for_each_symbol(map, pos, n) \ | ||
101 | dso__for_each_symbol(map->dso, pos, n, map->type) | ||
102 | |||
93 | typedef int (*symbol_filter_t)(struct map *map, struct symbol *sym); | 103 | typedef int (*symbol_filter_t)(struct map *map, struct symbol *sym); |
94 | 104 | ||
95 | void map__init(struct map *map, enum map_type type, | 105 | void map__init(struct map *map, enum map_type type, |