aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/annotate.c
diff options
context:
space:
mode:
authorLi Huafei <[email protected]>2021-07-26 12:38:54 +0000
committerArnaldo Carvalho de Melo <[email protected]>2021-08-02 12:56:18 +0000
commitc4db54be9bc00f9f6883de798de99744b30ed461 (patch)
treebab865ca455987f388da403369fee444ced9b84f /tools/perf/util/annotate.c
parentperf env: Normalize aarch64.* and arm64.* to arm64 in normalize_arch() (diff)
downloadkernel-c4db54be9bc00f9f6883de798de99744b30ed461.tar.gz
kernel-c4db54be9bc00f9f6883de798de99744b30ed461.zip
perf annotate: Add error log in symbol__annotate()
When users use 'perf annotate' on unsupported machines, error logs should be printed for user feedback. Signed-off-by: Li Huafei <[email protected]> Reviewed-by: James Clark <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Dengcheng Zhu <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Jin Yao <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Martin Liška <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Riccardo Mancini <[email protected]> Cc: Zhang Jinhao <[email protected]> Link: http://lore.kernel.org/lkml/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/annotate.c')
-rw-r--r--tools/perf/util/annotate.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index aa04a3655236..cb280de3369f 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -2192,8 +2192,10 @@ int symbol__annotate(struct map_symbol *ms, struct evsel *evsel,
return errno;
args.arch = arch = arch__find(arch_name);
- if (arch == NULL)
+ if (arch == NULL) {
+ pr_err("%s: unsupported arch %s\n", __func__, arch_name);
return ENOTSUP;
+ }
if (parch)
*parch = arch;