lkml.org 
[lkml]   [2021]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] perf annotate: Add error log in symbol__annotate()
Em Mon, Jul 26, 2021 at 04:19:26PM +0100, James Clark escreveu:
>
>
> On 26/07/2021 13:38, Li Huafei wrote:
> > When users use the perf annotate feature on unsupported machines, error
> > logs should be printed for user feedback.
> >
> > Signed-off-by: Li Huafei <lihuafei1@huawei.com>
> > ---
> > tools/perf/util/annotate.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > 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;
> >
>
> This one is missing the v2 in the summary so it doesn't work with tools like b4,
> but I applied it manually and it works.
>
> Reviewed-by: James Clark <james.clark@arm.com>

Thanks, applied.

- Arnaldo

\
 
 \ /
  Last update: 2021-07-27 17:55    [W:0.035 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site