aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/probe-finder.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2020-09-18 17:01:30 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-09-18 09:19:03 -0300
commitac7a75d1fbe072fc5535311ecc080f10645aeba1 (patch)
tree56c2c532e62a72980bd7ae20bec0a199907f234f /tools/perf/util/probe-finder.c
parentperf intel-pt: Fix "context_switch event has no tid" error (diff)
downloadlinux-dev-ac7a75d1fbe072fc5535311ecc080f10645aeba1.tar.xz
linux-dev-ac7a75d1fbe072fc5535311ecc080f10645aeba1.zip
perf probe: Fix to adjust symbol address with correct reloc_sym address
'perf probe' uses ref_reloc_sym to adjust symbol offset address from debuginfo address or ref_reloc_sym based address, but that is misusing reloc_sym->addr and reloc_sym->unrelocated_addr. If map is not relocated (map->reloc == 0), we can use reloc_sym->addr as unrelocated address instead of reloc_sym->unrelocated_addr. This usually does not happen. If we have a non-stripped ELF binary, we will use it for map and debuginfo, if not, we use only kallsyms without debuginfo. Thus, the map is always relocated (ELF and DWARF binary) or not relocated (kallsyms). However, if we allow the combination of debuginfo and kallsyms based map (like using debuginfod), we have to check the map->reloc and choose the collect address of reloc_sym. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Reviewed-by: Frank Ch. Eigler <fche@redhat.com> Cc: Aaron Merey <amerey@redhat.com> Cc: Daniel Thompson <daniel.thompson@linaro.org> Link: http://lore.kernel.org/lkml/160041609047.912668.14314639291419159274.stgit@devnote2 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-finder.c')
0 files changed, 0 insertions, 0 deletions