linux_dsm_epyc7002/tools/perf/util
Masami Hiramatsu 1efde27542 perf probe: Do not depend on dwfl_module_addrsym()
Do not depend on dwfl_module_addrsym() because it can fail on user-space
shared libraries.

Actually, same bug was fixed by commit 664fee3dc3 ("perf probe: Do not
use dwfl_module_addrsym if dwarf_diename finds symbol name"), but commit
07d3698578 ("perf probe: Fix wrong address verification) reverted to
get actual symbol address from symtab.

This fixes it again by getting symbol address from DIE, and only if the
DIE has only address range, it uses dwfl_module_addrsym().

Fixes: 07d3698578 ("perf probe: Fix wrong address verification)
Reported-by: Alexandre Ghiti <alex@ghiti.fr>
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Tested-by: Alexandre Ghiti <alex@ghiti.fr>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sasha Levin <sashal@kernel.org>
Link: http://lore.kernel.org/lkml/158281812176.476.14164573830975116234.stgit@devnote2
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2020-03-09 10:43:53 -03:00
..
c++ perf clang: Fix build with Clang 9 2020-01-14 12:02:19 -03:00
cs-etm-decoder
include perf bench: Update the copies of x86's mem{cpy,set}_64.S 2019-12-02 11:40:57 -03:00
intel-pt-decoder
libunwind
scripting-engines perf addr_location: Rename al->mg to al->maps 2019-11-26 11:07:46 -03:00
affinity.c perf affinity: Add infrastructure to save/restore affinity 2019-11-28 08:08:38 -03:00
affinity.h perf affinity: Add infrastructure to save/restore affinity 2019-11-28 08:08:38 -03:00
annotate.c perf annotate: Fix segfault with source toggle 2020-02-27 11:47:23 -03:00
annotate.h perf annotate: Simplify disasm_line allocation and freeing code 2020-02-27 11:07:13 -03:00
archinsn.h
arm-spe-pkt-decoder.c
arm-spe-pkt-decoder.h
arm-spe.c
arm-spe.h
auxtrace.c perf auxtrace: Add auxtrace_record__read_finish() 2020-02-18 10:13:29 -03:00
auxtrace.h perf auxtrace: Add auxtrace_record__read_finish() 2020-02-18 10:13:29 -03:00
block-info.c perf diff: Fix undefined string comparision spotted by clang's -Wstring-compare 2020-03-06 08:30:29 -03:00
block-info.h perf report: Jump to symbol source view from total cycles view 2019-11-19 19:37:04 -03:00
block-range.c
block-range.h
bpf_map.c
bpf_map.h
bpf-event.c perf maps: Merge 'struct maps' with 'struct map_groups' 2019-11-26 11:07:46 -03:00
bpf-event.h
bpf-loader.c
bpf-loader.h
bpf-prologue.c
bpf-prologue.h
branch.c
branch.h
Build perf affinity: Add infrastructure to save/restore affinity 2019-11-28 08:08:38 -03:00
build-id.c
build-id.h
cache.h
cacheline.c
cacheline.h
call-path.c
call-path.h
callchain.c perf map_symbol: Rename ms->mg to ms->maps 2019-11-26 11:07:46 -03:00
callchain.h perf callchain: Use 'struct map_symbol' in 'struct callchain_cursor_node' 2019-11-12 08:20:53 -03:00
cap.c
cap.h
cgroup.c
cgroup.h
cloexec.c
cloexec.h
color_config.c
color.c
color.h
comm.c
comm.h
compress.h
config.c perf config: Introduce perf_config_u8() 2020-02-27 10:44:54 -03:00
config.h perf config: Introduce perf_config_u8() 2020-02-27 10:44:54 -03:00
copyfile.c perf tools: Fix mode setting in copyfile_mode_ns() 2019-10-15 12:05:18 -03:00
copyfile.h
counts.c
counts.h
cpu-set-sched.h
cpumap.c perf stat: Add --per-node agregation support 2019-11-06 15:49:39 -03:00
cpumap.h perf evsel: Add iterator to iterate over events ordered by CPU 2019-11-29 12:20:45 -03:00
cputopo.c
cputopo.h
cs-etm.c perf maps: Merge 'struct maps' with 'struct map_groups' 2019-11-26 11:07:46 -03:00
cs-etm.h
data-convert-bt.c
data-convert-bt.h
data-convert.h
data.c perf record: Put a copy of kcore into the perf.data directory 2019-11-06 15:43:05 -03:00
data.h perf record: Put a copy of kcore into the perf.data directory 2019-11-06 15:43:05 -03:00
db-export.c perf addr_location: Rename al->mg to al->maps 2019-11-26 11:07:46 -03:00
db-export.h
debug.c perf tool: Provide an option to print perf_event_open args and return value 2019-11-12 08:32:27 -03:00
debug.h perf tool: Provide an option to print perf_event_open args and return value 2019-11-12 08:32:27 -03:00
demangle-java.c
demangle-java.h
demangle-rust.c
demangle-rust.h
dso.c perf dso: Move dso_id from 'struct map' to 'struct dso' 2019-11-19 19:12:26 -03:00
dso.h perf dso: Move dso_id from 'struct map' to 'struct dso' 2019-11-19 19:12:26 -03:00
dsos.c perf dso: Move dso_id from 'struct map' to 'struct dso' 2019-11-19 19:12:26 -03:00
dsos.h perf dso: Move dso_id from 'struct map' to 'struct dso' 2019-11-19 19:12:26 -03:00
dump-insn.c
dump-insn.h
dwarf-aux.c perf probe: Show correct statement line number by perf probe -l 2019-11-18 18:56:27 -03:00
dwarf-aux.h perf probe: Fix to show function entry line as probe-able 2019-11-06 15:43:06 -03:00
dwarf-regs.c
env.c perf env: Do not return pointers to local variables 2020-03-02 11:23:03 -03:00
env.h perf env: Add perf_env__numa_node() 2019-11-06 15:49:39 -03:00
event.c perf maps: Rename 'mg' variables to 'maps' 2019-11-26 11:07:46 -03:00
event.h perf tools: Add kernel AUX area sampling definitions 2019-11-21 10:54:20 -03:00
events_stats.h
evlist.c perf stat: Use affinity for enabling/disabling events 2019-11-29 12:20:45 -03:00
evlist.h perf stat: Use affinity for opening events 2019-11-29 12:20:45 -03:00
evsel_config.h perf parse: Copy string to perf_evsel_config_term 2020-01-30 11:55:02 +01:00
evsel_fprintf.c perf callchain: Use 'struct map_symbol' in 'struct callchain_cursor_node' 2019-11-12 08:20:53 -03:00
evsel_fprintf.h
evsel.c perf parse: Copy string to perf_evsel_config_term 2020-01-30 11:55:02 +01:00
evsel.h perf evsel: Add functions to enable/disable for a specific CPU 2019-11-29 12:20:45 -03:00
evswitch.c
evswitch.h
expr.h
expr.y perf tools: Use %define api.pure full instead of %pure-parser 2020-01-14 12:02:19 -03:00
find-map.c
fncache.c perf pmu: Use file system cache to optimize sysfs access 2019-11-28 08:08:38 -03:00
fncache.h perf pmu: Use file system cache to optimize sysfs access 2019-11-28 08:08:38 -03:00
genelf_debug.c
genelf.c perf jit: Move test functionality in to a test 2019-11-29 12:20:45 -03:00
genelf.h
generate-cmdlist.sh
get_current_dir_name.c
get_current_dir_name.h
group.h
header.c perf header: Use last modification time for timestamp 2020-01-15 10:17:20 -03:00
header.h perf data: Move perf_dir_version into data.h 2019-11-06 15:43:05 -03:00
help-unknown-cmd.c
help-unknown-cmd.h
hist.c perf map_symbol: Rename ms->mg to ms->maps 2019-11-26 11:07:46 -03:00
hist.h perf hists: Fix variable name's inconsistency in hists__for_each() macro 2019-12-20 18:58:13 -03:00
intel-bts.c
intel-bts.h
intel-pt.c perf maps: Merge 'struct maps' with 'struct map_groups' 2019-11-26 11:07:46 -03:00
intel-pt.h
intlist.c
intlist.h
jit.h
jitdump.c
jitdump.h
kvm-stat.h
levenshtein.c
levenshtein.h
llvm-utils.c perf llvm: Fix script used to obtain kernel make directives to work with new kbuild 2020-02-14 10:06:00 -03:00
llvm-utils.h
lzma.c
machine.c perf maps: Move kmap::kmaps setup to maps__insert() 2020-02-11 16:41:49 -03:00
machine.h perf maps: Rename map_groups.h to maps.h 2019-11-26 11:07:46 -03:00
map_symbol.h perf map_symbol: Rename ms->mg to ms->maps 2019-11-26 11:07:46 -03:00
map.c perf map: Fix off by one in strncpy() size argument 2020-03-09 09:34:45 -03:00
map.h perf maps: Merge 'struct maps' with 'struct map_groups' 2019-11-26 11:07:46 -03:00
maps.h perf maps: Rename map_groups.h to maps.h 2019-11-26 11:07:46 -03:00
mem2node.c
mem2node.h
mem-events.c pref tools: Make 'struct addr_map_symbol' contain 'struct map_symbol' 2019-11-12 08:20:53 -03:00
mem-events.h
memswap.c
memswap.h
metricgroup.c perf metricgroup: Fix printing event names of metric group with multiple events 2019-12-11 12:28:14 -03:00
metricgroup.h
mmap.c perf record: Adapt affinity to machines with #CPUs > 1K 2020-01-06 11:46:09 -03:00
mmap.h perf record: Adapt affinity to machines with #CPUs > 1K 2020-01-06 11:46:09 -03:00
namespaces.c
namespaces.h
ordered-events.c
ordered-events.h
parse-branch-options.c
parse-branch-options.h
parse-events.c perf parse-events: Fix reading of invalid memory in event parsing 2020-03-09 10:29:45 -03:00
parse-events.h perf record: Add aux-sample-size config term 2019-11-22 10:48:13 -03:00
parse-events.l perf record: Add aux-sample-size config term 2019-11-22 10:48:13 -03:00
parse-events.y perf tools: Use %define api.pure full instead of %pure-parser 2020-01-14 12:02:19 -03:00
parse-regs-options.c perf tools: Avoid 'sample_reg_masks' being const + weak 2019-10-10 09:29:33 -03:00
parse-regs-options.h
path.c
path.h
perf_event_attr_fprintf.c perf tools: Add kernel AUX area sampling definitions 2019-11-21 10:54:20 -03:00
perf_regs.c perf tools: Avoid 'sample_reg_masks' being const + weak 2019-10-10 09:29:33 -03:00
perf_regs.h perf regs: Make perf_reg_name() return "unknown" instead of NULL 2019-11-28 08:08:38 -03:00
perf-hooks-list.h
perf-hooks.c
perf-hooks.h
PERF-VERSION-GEN
pmu.c perf pmu: Use file system cache to optimize sysfs access 2019-11-28 08:08:38 -03:00
pmu.h perf pmu: When using default config, record which bits of config were changed by the user 2019-11-22 10:48:13 -03:00
pmu.l
pmu.y
print_binary.c
print_binary.h
probe-event.c perf maps: Rename map_groups.h to maps.h 2019-11-26 11:07:46 -03:00
probe-event.h perf probe: Trace a magic number if variable is not found 2019-11-18 19:09:23 -03:00
probe-file.c perf probe: Fix to delete multiple probe event 2020-03-09 10:41:14 -03:00
probe-file.h perf probe: Support DW_AT_const_value constant value 2019-11-18 19:08:02 -03:00
probe-finder.c perf probe: Do not depend on dwfl_module_addrsym() 2020-03-09 10:43:53 -03:00
probe-finder.h perf probe: Trace a magic number if variable is not found 2019-11-18 19:09:23 -03:00
pstack.c
pstack.h
python-ext-sources perf affinity: Add infrastructure to save/restore affinity 2019-11-28 08:08:38 -03:00
python.c perf tool: Provide an option to print perf_event_open args and return value 2019-11-12 08:32:27 -03:00
rb_resort.h
rblist.c
rblist.h
record.c perf record: Add a function to test for kernel support for AUX area sampling 2019-11-22 10:43:24 -03:00
record.h perf auxtrace: Add support for AUX area sample recording 2019-11-22 10:48:13 -03:00
rlimit.c
rlimit.h
rwsem.c
rwsem.h
s390-cpumcf-kernel.h
s390-cpumsf-kernel.h
s390-cpumsf.c
s390-cpumsf.h
s390-sample-raw.c
sample-raw.c
sample-raw.h
session.c perf session: Add facility to peek at all events 2019-11-22 10:48:13 -03:00
session.h perf session: Add facility to peek at all events 2019-11-22 10:48:13 -03:00
setns.c
setup.py perf python: Fix clang detection when using CC=clang-version 2020-03-09 09:58:57 -03:00
smt.c
smt.h
sort.c perf report/top: Improve toggle callchain menu option 2020-01-06 11:46:10 -03:00
sort.h perf report/top: Improve toggle callchain menu option 2020-01-06 11:46:10 -03:00
spark.c perf diff: Report noisy for cycles diff 2019-10-11 10:57:00 -03:00
spark.h perf diff: Report noisy for cycles diff 2019-10-11 10:57:00 -03:00
srccode.c perf pmu: Use file system cache to optimize sysfs access 2019-11-28 08:08:38 -03:00
srccode.h
srcline.c perf: Make perf able to build with latest libbfd 2020-01-30 11:55:26 +01:00
srcline.h
stat-display.c perf stat: Add --per-node agregation support 2019-11-06 15:49:39 -03:00
stat-shadow.c perf stat: Don't report a null stalled cycles per insn metric 2020-02-10 16:30:09 -03:00
stat.c perf stat: Use affinity for opening events 2019-11-29 12:20:45 -03:00
stat.h perf stat: Use affinity for opening events 2019-11-29 12:20:45 -03:00
strbuf.c
strbuf.h
strfilter.c
strfilter.h
string2.h perf string: Export asprintf__tp_filter_pids() 2019-10-15 13:03:57 -03:00
string.c
strlist.c
strlist.h
svghelper.c
svghelper.h
symbol_conf.h perf report: Sort by sampled cycles percent per block for stdio 2019-11-07 10:14:48 -03:00
symbol_fprintf.c
symbol-elf.c perf map: Set kmap->kmaps backpointer for main kernel map chunks 2019-12-20 18:55:40 -03:00
symbol-minimal.c
symbol.c perf symbols: Don't try to find a vmlinux file when looking for kernel modules 2020-03-03 16:20:01 -03:00
symbol.h perf maps: Rename 'mg' variables to 'maps' 2019-11-26 11:07:46 -03:00
symsrc.h
synthetic-events.c perf maps: Merge 'struct maps' with 'struct map_groups' 2019-11-26 11:07:46 -03:00
synthetic-events.h
syscalltbl.c
syscalltbl.h
target.c
target.h
term.c
term.h
thread_map.c
thread_map.h
thread-stack.c perf thread: Rename thread->mg to thread->maps 2019-11-26 11:07:46 -03:00
thread-stack.h
thread.c perf thread: Rename thread->mg to thread->maps 2019-11-26 11:07:46 -03:00
thread.h perf thread: Rename thread->mg to thread->maps 2019-11-26 11:07:46 -03:00
time-utils.c perf script: Fix --reltime with --time 2019-10-15 08:36:22 -03:00
time-utils.h perf script: Fix --reltime with --time 2019-10-15 08:36:22 -03:00
tool.h
top.c
top.h
trace-event-info.c
trace-event-parse.c perf tools: Remove unused trace_find_next_event() 2019-11-05 08:39:27 -03:00
trace-event-read.c
trace-event-scripting.c
trace-event.c
trace-event.h perf tools: Remove unused trace_find_next_event() 2019-11-05 08:39:27 -03:00
trigger.h
tsc.c
tsc.h
units.c
units.h
unwind-libdw.c perf map_symbol: Rename ms->mg to ms->maps 2019-11-26 11:07:46 -03:00
unwind-libdw.h
unwind-libunwind-local.c perf maps: Rename 'mg' variables to 'maps' 2019-11-26 11:07:46 -03:00
unwind-libunwind.c perf maps: Rename 'mg' variables to 'maps' 2019-11-26 11:07:46 -03:00
unwind.h perf maps: Merge 'struct maps' with 'struct map_groups' 2019-11-26 11:07:46 -03:00
usage.c
util.c perf record: Put a copy of kcore into the perf.data directory 2019-11-06 15:43:05 -03:00
util.h
values.c
values.h
vdso.c perf thread: Rename thread->mg to thread->maps 2019-11-26 11:07:46 -03:00
vdso.h
xyarray.c
zlib.c
zstd.c