diff options
Diffstat (limited to 'tools/perf/util/map.c')
-rw-r--r-- | tools/perf/util/map.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index 49e353eaa337..d0899df77baa 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -572,6 +572,7 @@ void map_groups__init(struct map_groups *mg, struct machine *machine) { maps__init(&mg->maps); mg->machine = machine; + mg->last_search_by_name = NULL; refcount_set(&mg->refcnt, 1); } @@ -580,6 +581,14 @@ void map_groups__insert(struct map_groups *mg, struct map *map) maps__insert(&mg->maps, map); } +void map_groups__remove(struct map_groups *mg, struct map *map) +{ + if (mg->last_search_by_name == map) + mg->last_search_by_name = NULL; + + maps__remove(&mg->maps, map); +} + static void __maps__purge(struct maps *maps) { struct map *pos, *next; |