aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-record.c
diff options
context:
space:
mode:
authorJames Clark <james.clark@arm.com>2021-10-18 14:48:42 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2021-11-07 12:27:38 -0300
commit7cc72553ac03ec20afe2dec91dce4624ccd379b8 (patch)
treef7c13bdc5b3c28b3ace30dff497b83958ca096b8 /tools/perf/builtin-record.c
parentperf tools: Refactor out kernel symbol argument sanity checking (diff)
downloadlinux-dev-7cc72553ac03ec20afe2dec91dce4624ccd379b8.tar.xz
linux-dev-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 <james.clark@arm.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Denis Nikitin <denik@chromium.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20211018134844.2627174-3-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r--tools/perf/builtin-record.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 78185c982ebf..0338b813585a 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -2712,6 +2712,10 @@ int cmd_record(int argc, const char **argv)
if (quiet)
perf_quiet_option();
+ err = symbol__validate_sym_arguments();
+ if (err)
+ return err;
+
/* Make system wide (-a) the default target. */
if (!argc && target__none(&rec->opts.target))
rec->opts.target.system_wide = true;