diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-11-04 10:14:05 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-11-12 08:20:53 -0300 |
commit | 9d355b381b35be1ac4e77600d6b9b27c674c5d5f (patch) | |
tree | 1ed88276ceb00e7e320b8892846ae72f6af32599 /tools/perf/util/annotate.c | |
parent | f2baa060cd766f4e585339423891e0063179d702 (diff) | |
download | lwn-9d355b381b35be1ac4e77600d6b9b27c674c5d5f.tar.gz lwn-9d355b381b35be1ac4e77600d6b9b27c674c5d5f.zip |
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/annotate.c')
-rw-r--r-- | tools/perf/util/annotate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index bee0fee122f8..ecc024495f56 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -271,7 +271,7 @@ static int call__parse(struct arch *arch, struct ins_operands *ops, struct map_s find_target: target.addr = map__objdump_2mem(map, ops->target.addr); - if (map_groups__find_ams(&target) == 0 && + if (map_groups__find_ams(map->groups, &target) == 0 && map__rip_2objdump(target.map, map->map_ip(target.map, target.addr)) == ops->target.addr) ops->target.sym = target.sym; @@ -391,7 +391,7 @@ static int jump__parse(struct arch *arch, struct ins_operands *ops, struct map_s * Actual navigation will come next, with further understanding of how * the symbol searching and disassembly should be done. */ - if (map_groups__find_ams(&target) == 0 && + if (map_groups__find_ams(map->groups, &target) == 0 && map__rip_2objdump(target.map, map->map_ip(target.map, target.addr)) == ops->target.addr) ops->target.sym = target.sym; @@ -1544,7 +1544,7 @@ static int symbol__parse_objdump_line(struct symbol *sym, .addr = dl->ops.target.addr, }; - if (!map_groups__find_ams(&target) && + if (!map_groups__find_ams(map->groups, &target) && target.sym->start == target.al_addr) dl->ops.target.sym = target.sym; } |