summaryrefslogtreecommitdiff
path: root/tools/perf/util/maps.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/maps.c')
-rw-r--r--tools/perf/util/maps.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/perf/util/maps.c b/tools/perf/util/maps.c
index 024a6c9f72c4..5b898a0e97b2 100644
--- a/tools/perf/util/maps.c
+++ b/tools/perf/util/maps.c
@@ -663,6 +663,17 @@ out_unlock:
return map;
}
+struct map *maps__find_next_entry(struct maps *maps, struct map *map)
+{
+ struct map_rb_node *rb_node = maps__find_node(maps, map);
+ struct map_rb_node *next = map_rb_node__next(rb_node);
+
+ if (next)
+ return next->map;
+
+ return NULL;
+}
+
void maps__fixup_end(struct maps *maps)
{
struct map_rb_node *prev = NULL, *curr;