From 7cc72553ac03ec20afe2dec91dce4624ccd379b8 Mon Sep 17 00:00:00 2001 From: James Clark Date: Mon, 18 Oct 2021 14:48:42 +0100 Subject: 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 Cc: Alexander Shishkin Cc: Denis Nikitin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Link: https://lore.kernel.org/r/20211018134844.2627174-3-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-top.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/perf/builtin-top.c') diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c index 020c4f110c10..1fc390f136dd 100644 --- a/tools/perf/builtin-top.c +++ b/tools/perf/builtin-top.c @@ -1618,6 +1618,10 @@ int cmd_top(int argc, const char **argv) if (argc) usage_with_options(top_usage, options); + status = symbol__validate_sym_arguments(); + if (status) + goto out_delete_evlist; + if (annotate_check_args(&top.annotation_opts) < 0) goto out_delete_evlist; -- cgit v1.2.3-59-g8ed1b