summaryrefslogtreecommitdiff
path: root/tools/perf/util/map.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2019-11-04 10:14:05 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2019-11-12 08:20:53 -0300
commit9d355b381b35be1ac4e77600d6b9b27c674c5d5f (patch)
tree1ed88276ceb00e7e320b8892846ae72f6af32599 /tools/perf/util/map.c
parentf2baa060cd766f4e585339423891e0063179d702 (diff)
perf map_groups: Pass the object to map_groups__find_ams()
We were just passing a map to look for and reuse its map->groups member, but the idea is that this is going away, as a map can be in multiple rb_trees when being reused via a map_node, so do as all the other map_groups methods and pass as its first arg the object being operated on. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-nmi2pbggqloogwl6vxrvex5a@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/map.c')
-rw-r--r--tools/perf/util/map.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c
index a4d889c0fa88..db842568f4be 100644
--- a/tools/perf/util/map.c
+++ b/tools/perf/util/map.c
@@ -703,12 +703,12 @@ struct symbol *map_groups__find_symbol_by_name(struct map_groups *mg,
return maps__find_symbol_by_name(&mg->maps, name, mapp);
}
-int map_groups__find_ams(struct addr_map_symbol *ams)
+int map_groups__find_ams(struct map_groups *mg, struct addr_map_symbol *ams)
{
if (ams->addr < ams->map->start || ams->addr >= ams->map->end) {
- if (ams->map->groups == NULL)
+ if (mg == NULL)
return -1;
- ams->map = map_groups__find(ams->map->groups, ams->addr);
+ ams->map = map_groups__find(mg, ams->addr);
if (ams->map == NULL)
return -1;
}