public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: "Jin, Yao" <yao.jin@linux.intel.com>
Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org,
	mingo@redhat.com, alexander.shishkin@linux.intel.com,
	Linux-kernel@vger.kernel.org, ak@linux.intel.com,
	kan.liang@intel.com, yao.jin@intel.com
Subject: Re: [PATCH v1 0/2] perf report: Support annotation of code without symbols
Date: Thu, 20 Feb 2020 15:51:24 +0100	[thread overview]
Message-ID: <20200220145124.GD586895@krava> (raw)
In-Reply-To: <1fc1c4f5-ca94-ebd7-fae0-28765070662f@linux.intel.com>

On Thu, Feb 20, 2020 at 10:42:11PM +0800, Jin, Yao wrote:
> 
> 
> On 2/20/2020 8:06 PM, Jiri Olsa wrote:
> > On Thu, Feb 20, 2020 at 08:03:18PM +0800, Jin, Yao wrote:
> > > 
> > > 
> > > On 2/20/2020 7:56 PM, Jiri Olsa wrote:
> > > > On Thu, Feb 20, 2020 at 08:59:00AM +0800, Jin Yao wrote:
> > > > > For perf report on stripped binaries it is currently impossible to do
> > > > > annotation. The annotation state is all tied to symbols, but there are
> > > > > either no symbols, or symbols are not covering all the code.
> > > > > 
> > > > > We should support the annotation functionality even without symbols.
> > > > > 
> > > > > The first patch uses al_addr to print because it's easy to dump
> > > > > the instructions from this address in binary for branch mode.
> > > > > 
> > > > > The second patch supports the annotation on stripped binary.
> > > > > 
> > > > > Jin Yao (2):
> > > > >     perf util: Print al_addr when symbol is not found
> > > > >     perf annotate: Support interactive annotation of code without symbols
> > > > 
> > > > looks good, but I'm getting crash when annotating unresolved kernel address:
> > > > 
> > > > jirka
> > > > 
> > > > 
> > > 
> > > Thanks for reporting the issue.
> > > 
> > > I guess you are trying the "0xffffffff81c00ae7", let me try to reproduce
> > > this issue.
> > 
> > yes, I also checked and it did not happen before
> > 
> > jirka
> > 
> 
> Hi Jiri,
> 
> Can you try this fix?
> 
> diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
> index ff5711899234..5144528b2931 100644
> --- a/tools/perf/ui/browsers/hists.c
> +++ b/tools/perf/ui/browsers/hists.c
> @@ -2497,7 +2497,7 @@ add_annotate_opt(struct hist_browser *browser,
>                  struct map_symbol *ms,
>                  u64 addr)
>  {
> -       if (ms->map->dso->annotate_warned)
> +       if (!ms->map || !ms->map->dso || ms->map->dso->annotate_warned)
>                 return 0;
> 
>         if (!ms->sym) {
> 
> It's tested OK at my side.

yep, the crash is gone

thanks,
jirka


      reply	other threads:[~2020-02-20 14:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20  0:59 [PATCH v1 0/2] perf report: Support annotation of code without symbols Jin Yao
2020-02-20  0:59 ` [PATCH v1 1/2] perf util: Print al_addr when symbol is not found Jin Yao
2020-02-20  0:59 ` [PATCH v1 2/2] perf annotate: Support interactive annotation of code without symbols Jin Yao
2020-02-20 11:56 ` [PATCH v1 0/2] perf report: Support " Jiri Olsa
2020-02-20 12:03   ` Jin, Yao
2020-02-20 12:06     ` Jiri Olsa
2020-02-20 13:50       ` Jin, Yao
2020-02-20 14:42       ` Jin, Yao
2020-02-20 14:51         ` Jiri Olsa [this message]

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=20200220145124.GD586895@krava \
    --to=jolsa@redhat.com \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@intel.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=yao.jin@intel.com \
    --cc=yao.jin@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox