diff options
| author | James Clark <[email protected]> | 2021-10-18 13:48:43 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2021-11-07 15:27:38 +0000 |
| commit | b3a018fc31fea05ffd034952b4b6e9e1eb0812bc (patch) | |
| tree | db80271a8b1d9190e1abfb1c7f3874a4af19a560 /tools/perf/builtin-inject.c | |
| parent | perf tools: Check vmlinux/kallsyms arguments in all tools (diff) | |
| download | kernel-b3a018fc31fea05ffd034952b4b6e9e1eb0812bc.tar.gz kernel-b3a018fc31fea05ffd034952b4b6e9e1eb0812bc.zip | |
perf inject: Add vmlinux and ignore-vmlinux arguments
Other perf tools allow specifying the path to vmlinux. 'perf inject'
didn't have this argument which made some auxtrace workflows difficult.
Also add --ignore-vmlinux for consistency with other tools.
Suggested-by: Denis Nikitin <[email protected]>
Signed-off-by: James Clark <[email protected]>
Tested-by: Denis Nikitin <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Namhyung Kim <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ Added the perf-inject man page entries for these options, as noted by Denis ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-inject.c')
| -rw-r--r-- | tools/perf/builtin-inject.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index ac6c570029e3..bc5259db5fd9 100644 --- a/tools/perf/builtin-inject.c +++ b/tools/perf/builtin-inject.c @@ -940,6 +940,10 @@ int cmd_inject(int argc, const char **argv) #endif OPT_INCR('v', "verbose", &verbose, "be more verbose (show build ids, etc)"), + OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name, + "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('f', "force", &data.force, "don't complain, do it"), @@ -974,6 +978,9 @@ int cmd_inject(int argc, const char **argv) return -1; } + if (symbol__validate_sym_arguments()) + return -1; + if (inject.in_place_update) { if (!strcmp(inject.input_name, "-")) { pr_err("Input file name required for in-place updating\n"); |
