提交 8f55155a 编写于 作者: L Li Huafei 提交者: Zheng Zengkai

perf annotate: Add error log in symbol__annotate()

maillist inclusion
category: bugfix
bugzilla: 175624 https://gitee.com/openeuler/kernel/issues/I4DDEL

Reference: https://lkml.org/lkml/2021/7/26/406

--------------------------------

When users use the perf annotate feature on unsupported machines, error
logs should be printed for user feedback.
Signed-off-by: NLi Huafei <lihuafei1@huawei.com>
Reviewed-by: NJames Clark <james.clark@arm.com>
Signed-off-by: NLi Huafei <lihuafei1@huawei.com>
Reviewed-by: NKuohai Xu <xukuohai@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 30b65315
......@@ -2178,8 +2178,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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册