linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] perf TUI: Don't throw error for zero length symbols
       [not found] ` <1479804050-5028-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com>
@ 2016-12-16 10:38   ` Ravi Bangoria
  2016-12-16 20:27     ` Anton Blanchard
  0 siblings, 1 reply; 3+ messages in thread
From: Ravi Bangoria @ 2016-12-16 10:38 UTC (permalink / raw)
  To: acme
  Cc: anton, peterz, mingo, alexander.shishkin, chris.ryder, mhiramat,
	linux-kernel, mpe, benh, paulus, npiggin, linuxppc-dev,
	Ravi Bangoria

Hi Arnaldo,

Can you please pick this up if it looks good?

-Ravi

On Tuesday 22 November 2016 02:10 PM, Ravi Bangoria wrote:
> perf report (with TUI) exits with error when it finds a sample of zero
> length symbol(i.e. addr == sym->start == sym->end). Actually these are
> valid samples. Don't exit TUI and show report with such symbols.
>
> Link: https://lkml.org/lkml/2016/10/8/189
>
> Reported-by: Anton Blanchard <anton@samba.org>
> Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
> ---
>  tools/perf/util/annotate.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
> index aeb5a44..430d039 100644
> --- a/tools/perf/util/annotate.c
> +++ b/tools/perf/util/annotate.c
> @@ -593,7 +593,8 @@ static int __symbol__inc_addr_samples(struct symbol *sym, struct map *map,
>
>  	pr_debug3("%s: addr=%#" PRIx64 "\n", __func__, map->unmap_ip(map, addr));
>
> -	if (addr < sym->start || addr >= sym->end) {
> +	if ((addr < sym->start || addr >= sym->end) &&
> +	    (addr != sym->end || sym->start != sym->end)) {
>  		pr_debug("%s(%d): ERANGE! sym->name=%s, start=%#" PRIx64 ", addr=%#" PRIx64 ", end=%#" PRIx64 "\n",
>  		       __func__, __LINE__, sym->name, sym->start, addr, sym->end);
>  		return -ERANGE;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf TUI: Don't throw error for zero length symbols
  2016-12-16 10:38   ` [PATCH] perf TUI: Don't throw error for zero length symbols Ravi Bangoria
@ 2016-12-16 20:27     ` Anton Blanchard
  2016-12-19 18:15       ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Anton Blanchard @ 2016-12-16 20:27 UTC (permalink / raw)
  To: Ravi Bangoria
  Cc: acme, chris.ryder, peterz, linux-kernel, npiggin,
	alexander.shishkin, mingo, paulus, mhiramat, linuxppc-dev,
	Michael Ellerman, Madhavan Srinivasan

Hi Ravi,

> > perf report (with TUI) exits with error when it finds a sample of
> > zero length symbol(i.e. addr == sym->start == sym->end). Actually
> > these are valid samples. Don't exit TUI and show report with such
> > symbols.
> >
> > Link: https://lkml.org/lkml/2016/10/8/189

You can add:

Tested-by: Anton Blanchard <anton@samba.org>

Also, since this issue makes perf report pretty much useless on
ppc64, can we mark it for stable@, at least to get it into 4.9 where
the ppc64 kernel changes that triggered this appeared?

Anton

> > Reported-by: Anton Blanchard <anton@samba.org>
> > Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
> > ---
> >  tools/perf/util/annotate.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
> > index aeb5a44..430d039 100644
> > --- a/tools/perf/util/annotate.c
> > +++ b/tools/perf/util/annotate.c
> > @@ -593,7 +593,8 @@ static int __symbol__inc_addr_samples(struct
> > symbol *sym, struct map *map,
> >
> >  	pr_debug3("%s: addr=%#" PRIx64 "\n", __func__,
> > map->unmap_ip(map, addr));
> >
> > -	if (addr < sym->start || addr >= sym->end) {
> > +	if ((addr < sym->start || addr >= sym->end) &&
> > +	    (addr != sym->end || sym->start != sym->end)) {
> >  		pr_debug("%s(%d): ERANGE! sym->name=%s, start=%#"
> > PRIx64 ", addr=%#" PRIx64 ", end=%#" PRIx64 "\n", __func__,
> > __LINE__, sym->name, sym->start, addr, sym->end); return -ERANGE;  
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] perf TUI: Don't throw error for zero length symbols
  2016-12-16 20:27     ` Anton Blanchard
@ 2016-12-19 18:15       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2016-12-19 18:15 UTC (permalink / raw)
  To: Anton Blanchard
  Cc: Ravi Bangoria, chris.ryder, peterz, linux-kernel, npiggin,
	alexander.shishkin, mingo, paulus, mhiramat, linuxppc-dev,
	Michael Ellerman, Madhavan Srinivasan

Em Sat, Dec 17, 2016 at 07:27:54AM +1100, Anton Blanchard escreveu:
> Hi Ravi,
> 
> > > perf report (with TUI) exits with error when it finds a sample of
> > > zero length symbol(i.e. addr == sym->start == sym->end). Actually
> > > these are valid samples. Don't exit TUI and show report with such
> > > symbols.
> > >
> > > Link: https://lkml.org/lkml/2016/10/8/189
> 
> You can add:
> 
> Tested-by: Anton Blanchard <anton@samba.org>
> 
> Also, since this issue makes perf report pretty much useless on
> ppc64, can we mark it for stable@, at least to get it into 4.9 where
> the ppc64 kernel changes that triggered this appeared?

Ok, added it, will be in the next pull req to Ingo.

- Arnaldo
 
> Anton
> 
> > > Reported-by: Anton Blanchard <anton@samba.org>
> > > Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
> > > ---
> > >  tools/perf/util/annotate.c | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
> > > index aeb5a44..430d039 100644
> > > --- a/tools/perf/util/annotate.c
> > > +++ b/tools/perf/util/annotate.c
> > > @@ -593,7 +593,8 @@ static int __symbol__inc_addr_samples(struct
> > > symbol *sym, struct map *map,
> > >
> > >  	pr_debug3("%s: addr=%#" PRIx64 "\n", __func__,
> > > map->unmap_ip(map, addr));
> > >
> > > -	if (addr < sym->start || addr >= sym->end) {
> > > +	if ((addr < sym->start || addr >= sym->end) &&
> > > +	    (addr != sym->end || sym->start != sym->end)) {
> > >  		pr_debug("%s(%d): ERANGE! sym->name=%s, start=%#"
> > > PRIx64 ", addr=%#" PRIx64 ", end=%#" PRIx64 "\n", __func__,
> > > __LINE__, sym->name, sym->start, addr, sym->end); return -ERANGE;  
> > 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-19 18:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20161121172818.161639c2@kryten>
     [not found] ` <1479804050-5028-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com>
2016-12-16 10:38   ` [PATCH] perf TUI: Don't throw error for zero length symbols Ravi Bangoria
2016-12-16 20:27     ` Anton Blanchard
2016-12-19 18:15       ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).