Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf top: Allow passing a kallsyms file

This basically replicates what was done for 'perf report' in:

b226a5a72901 ("perf report: Allow user to specify path to kallsyms file")

This should help with resolving eBPF symbols, that are in kallsyms but,
of course, not in vmlinux.

Reported-by: Ivan Babrou <ibobrik@gmail.com>
Tested-by: Ivan Babrou <ibobrik@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: David Ahern <dsahern@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: https://lkml.kernel.org/n/tip-x52mx1ybq8128rtg9hjrj5qk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+5
+3
tools/perf/Documentation/perf-top.txt
··· 70 70 --ignore-vmlinux:: 71 71 Ignore vmlinux files. 72 72 73 + --kallsyms=<file>:: 74 + kallsyms pathname 75 + 73 76 -m <pages>:: 74 77 --mmap-pages=<pages>:: 75 78 Number of mmap data pages (must be a power of two) or size
+2
tools/perf/builtin-top.c
··· 1289 1289 "file", "vmlinux pathname"), 1290 1290 OPT_BOOLEAN(0, "ignore-vmlinux", &symbol_conf.ignore_vmlinux, 1291 1291 "don't load vmlinux even if found"), 1292 + OPT_STRING(0, "kallsyms", &symbol_conf.kallsyms_name, 1293 + "file", "kallsyms pathname"), 1292 1294 OPT_BOOLEAN('K', "hide_kernel_symbols", &top.hide_kernel_symbols, 1293 1295 "hide kernel symbols"), 1294 1296 OPT_CALLBACK('m', "mmap-pages", &opts->mmap_pages, "pages",