aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-script.c
diff options
context:
space:
mode:
authorJames Clark <[email protected]>2021-10-18 13:48:42 +0000
committerArnaldo Carvalho de Melo <[email protected]>2021-11-07 15:27:38 +0000
commit7cc72553ac03ec20afe2dec91dce4624ccd379b8 (patch)
treef7c13bdc5b3c28b3ace30dff497b83958ca096b8 /tools/perf/builtin-script.c
parentperf tools: Refactor out kernel symbol argument sanity checking (diff)
downloadkernel-7cc72553ac03ec20afe2dec91dce4624ccd379b8.tar.gz
kernel-7cc72553ac03ec20afe2dec91dce4624ccd379b8.zip
perf tools: Check vmlinux/kallsyms arguments in all tools
Only perf report checked the validity of these arguments so apply the same check to all tools that read them for consistency. Signed-off-by: James Clark <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Denis Nikitin <[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] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-script.c')
-rw-r--r--tools/perf/builtin-script.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index f3d07cfab550..9434367af166 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -3846,6 +3846,9 @@ int cmd_script(int argc, const char **argv)
data.path = input_name;
data.force = symbol_conf.force;
+ if (symbol__validate_sym_arguments())
+ return -1;
+
if (argc > 1 && !strncmp(argv[0], "rec", strlen("rec"))) {
rec_script_path = get_script_path(argv[1], RECORD_SUFFIX);
if (!rec_script_path)