All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: James Clark <james.clark@arm.com>
Cc: Li Huafei <lihuafei1@huawei.com>,
	jolsa@kernel.org, peterz@infradead.org, mark.rutland@arm.com,
	mingo@redhat.com, alexander.shishkin@linux.intel.com,
	namhyung@kernel.org, mliska@suse.cz, irogers@google.com,
	dzhu@wavecomp.com, rickyman7@gmail.com, yao.jin@linux.intel.com,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	zhangjinhao2@huawei.com
Subject: Re: [PATCH 2/2] perf annotate: Add error log in symbol__annotate()
Date: Tue, 27 Jul 2021 12:55:26 -0300	[thread overview]
Message-ID: <YQAsbprd0sl7gya4@kernel.org> (raw)
In-Reply-To: <7106d95c-2a97-cd8b-b361-7f498a1b0a5f@arm.com>

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

  reply	other threads:[~2021-07-27 15:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26 12:38 [PATCH v2 1/2] perf env: Normalize aarch64.* and arm64.* to arm64 in normalize_arch() Li Huafei
2021-07-26 12:38 ` [PATCH 2/2] perf annotate: Add error log in symbol__annotate() Li Huafei
2021-07-26 15:19   ` James Clark
2021-07-27 15:55     ` Arnaldo Carvalho de Melo [this message]
2021-07-26 15:18 ` [PATCH v2 1/2] perf env: Normalize aarch64.* and arm64.* to arm64 in normalize_arch() James Clark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YQAsbprd0sl7gya4@kernel.org \
    --to=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dzhu@wavecomp.com \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=lihuafei1@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=mliska@suse.cz \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rickyman7@gmail.com \
    --cc=yao.jin@linux.intel.com \
    --cc=zhangjinhao2@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.