perf top: Allow passing a kallsyms file

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

   b226a5a7 ("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: default avatarIvan Babrou <ibobrik@gmail.com>
Tested-by: default avatarIvan 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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 19702894
...@@ -70,6 +70,9 @@ Default is to monitor all CPUS. ...@@ -70,6 +70,9 @@ Default is to monitor all CPUS.
--ignore-vmlinux:: --ignore-vmlinux::
Ignore vmlinux files. Ignore vmlinux files.
--kallsyms=<file>::
kallsyms pathname
-m <pages>:: -m <pages>::
--mmap-pages=<pages>:: --mmap-pages=<pages>::
Number of mmap data pages (must be a power of two) or size Number of mmap data pages (must be a power of two) or size
......
...@@ -1289,6 +1289,8 @@ int cmd_top(int argc, const char **argv) ...@@ -1289,6 +1289,8 @@ int cmd_top(int argc, const char **argv)
"file", "vmlinux pathname"), "file", "vmlinux pathname"),
OPT_BOOLEAN(0, "ignore-vmlinux", &symbol_conf.ignore_vmlinux, OPT_BOOLEAN(0, "ignore-vmlinux", &symbol_conf.ignore_vmlinux,
"don't load vmlinux even if found"), "don't load vmlinux even if found"),
OPT_STRING(0, "kallsyms", &symbol_conf.kallsyms_name,
"file", "kallsyms pathname"),
OPT_BOOLEAN('K', "hide_kernel_symbols", &top.hide_kernel_symbols, OPT_BOOLEAN('K', "hide_kernel_symbols", &top.hide_kernel_symbols,
"hide kernel symbols"), "hide kernel symbols"),
OPT_CALLBACK('m', "mmap-pages", &opts->mmap_pages, "pages", OPT_CALLBACK('m', "mmap-pages", &opts->mmap_pages, "pages",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment