From: Namhyung Kim Date: Wed, 15 Jun 2022 16:32:17 +0000 (-0700) Subject: perf lock: Allow to use different kernel symbols X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=309e133dfe2651eedd572b62af2215b94532b712;p=linux.git perf lock: Allow to use different kernel symbols Add --vmlinux and --kallsyms options to support data file from different kernels. Signed-off-by: Namhyung Kim Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Peter Zijlstra Cc: Waiman Long Cc: Will Deacon Link: https://lore.kernel.org/r/20220615163222.1275500-3-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/Documentation/perf-lock.txt b/tools/perf/Documentation/perf-lock.txt index 656b537b2fba0..4b8568f0c53b9 100644 --- a/tools/perf/Documentation/perf-lock.txt +++ b/tools/perf/Documentation/perf-lock.txt @@ -46,6 +46,13 @@ COMMON OPTIONS --force:: Don't complain, do it. +--vmlinux=:: + vmlinux pathname + +--kallsyms=:: + kallsyms pathname + + REPORT OPTIONS -------------- diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c index 57e396323d057..118a036a81fba 100644 --- a/tools/perf/builtin-lock.c +++ b/tools/perf/builtin-lock.c @@ -1162,6 +1162,10 @@ int cmd_lock(int argc, const char **argv) OPT_INCR('v', "verbose", &verbose, "be more verbose (show symbol address, etc)"), OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace, "dump raw trace in ASCII"), OPT_BOOLEAN('f', "force", &force, "don't complain, do it"), + OPT_STRING(0, "vmlinux", &symbol_conf.vmlinux_name, + "file", "vmlinux pathname"), + OPT_STRING(0, "kallsyms", &symbol_conf.kallsyms_name, + "file", "kallsyms pathname"), OPT_END() };