Skip to content

Commit 1b3aae9

Browse files
committed
perf top: Allow passing a kallsyms file
This basically replicates what was done for 'perf report' in: b226a5a ("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>
1 parent 1970289 commit 1b3aae9

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

tools/perf/Documentation/perf-top.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ Default is to monitor all CPUS.
7070
--ignore-vmlinux::
7171
Ignore vmlinux files.
7272

73+
--kallsyms=<file>::
74+
kallsyms pathname
75+
7376
-m <pages>::
7477
--mmap-pages=<pages>::
7578
Number of mmap data pages (must be a power of two) or size

tools/perf/builtin-top.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,8 @@ int cmd_top(int argc, const char **argv)
12891289
"file", "vmlinux pathname"),
12901290
OPT_BOOLEAN(0, "ignore-vmlinux", &symbol_conf.ignore_vmlinux,
12911291
"don't load vmlinux even if found"),
1292+
OPT_STRING(0, "kallsyms", &symbol_conf.kallsyms_name,
1293+
"file", "kallsyms pathname"),
12921294
OPT_BOOLEAN('K', "hide_kernel_symbols", &top.hide_kernel_symbols,
12931295
"hide kernel symbols"),
12941296
OPT_CALLBACK('m', "mmap-pages", &opts->mmap_pages, "pages",

0 commit comments

Comments
 (0)