perf top: Allow passing a kallsyms file
authorArnaldo Carvalho de Melo <[email protected]>
Tue, 27 Nov 2018 13:31:03 +0000 (10:31 -0300)
committerArnaldo Carvalho de Melo <[email protected]>
Mon, 17 Dec 2018 17:54:40 +0000 (14:54 -0300)
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 <[email protected]>
Tested-by: Ivan Babrou <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Alexei Starovoitov <[email protected]>
Cc: Daniel Borkmann <[email protected]>
Cc: David Ahern <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Wang Nan <[email protected]>
Link: https://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/Documentation/perf-top.txt
tools/perf/builtin-top.c

index 808b664343c9f5faa9a07d5327945926d844c7cb..44d89fb9c788e45e162f67ddd4aee70c5562b17a 100644 (file)
@@ -70,6 +70,9 @@ Default is to monitor all CPUS.
 --ignore-vmlinux::
        Ignore vmlinux files.
 
+--kallsyms=<file>::
+       kallsyms pathname
+
 -m <pages>::
 --mmap-pages=<pages>::
        Number of mmap data pages (must be a power of two) or size
index aa0c73e5792404355c5e8c2de048ff8e5da18e39..1252d1759064e43eaafc43b813488aaf5b9c6cb3 100644 (file)
@@ -1289,6 +1289,8 @@ int cmd_top(int argc, const char **argv)
                   "file", "vmlinux pathname"),
        OPT_BOOLEAN(0, "ignore-vmlinux", &symbol_conf.ignore_vmlinux,
                    "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,
                    "hide kernel symbols"),
        OPT_CALLBACK('m', "mmap-pages", &opts->mmap_pages, "pages",