[lkml]   [2018]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 15/75] perf top: Allow passing a kallsyms file
From: Arnaldo Carvalho de Melo <>

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 <>
Tested-by: Ivan Babrou <>
Cc: Adrian Hunter <>
Cc: Alexei Starovoitov <>
Cc: Daniel Borkmann <>
Cc: David Ahern <>
Cc: David S. Miller <>
Cc: Jiri Olsa <>
Cc: Namhyung Kim <>
Cc: Wang Nan <>
Signed-off-by: Arnaldo Carvalho de Melo <>
tools/perf/Documentation/perf-top.txt | 3 +++
tools/perf/builtin-top.c | 2 ++
2 files changed, 5 insertions(+)

diff --git a/tools/perf/Documentation/perf-top.txt b/tools/perf/Documentation/perf-top.txt
index 808b664343c9..44d89fb9c788 100644
--- a/tools/perf/Documentation/perf-top.txt
+++ b/tools/perf/Documentation/perf-top.txt
@@ -70,6 +70,9 @@ Default is to monitor all CPUS.
Ignore vmlinux files.

+ kallsyms pathname
-m <pages>::
Number of mmap data pages (must be a power of two) or size
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index aa0c73e57924..1252d1759064 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -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",
 \ /
  Last update: 2018-12-06 22:27    [W:0.027 / U:8.400 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site