All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
To: anton@samba.org, acme@kernel.org
Cc: peterz@infradead.org, mingo@redhat.com,
	alexander.shishkin@linux.intel.com, chris.ryder@arm.com,
	mhiramat@kernel.org, linux-kernel@vger.kernel.org,
	mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org,
	npiggin@gmail.com, linuxppc-dev@lists.ozlabs.orgp
Subject: Re: [PATCH] perf TUI: Don't throw error for zero length symbols
Date: Tue, 22 Nov 2016 14:26:14 +0530	[thread overview]
Message-ID: <5834082E.20903@linux.vnet.ibm.com> (raw)
In-Reply-To: <5834069D.2020200@linux.vnet.ibm.com>



On Tuesday 22 November 2016 02:19 PM, Ravi Bangoria wrote:
> Hi Anton,
>
> 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
> This will solve 2nd issue.
>
> 3rd doesn't sound simple to fix.

Sorry, I mean 1st doesn't sound ...

>  I tried to fix it by replacing pr_debug to
> pr_err when addr is out of symbol address range. But error message will
> get overwritten every time when subsequent pr_err gets executed.
>
> Arnaldo, any suggestions?
>
> -Ravi
>
>> 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;

  reply	other threads:[~2016-11-22  8:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-09  1:12 perf TUI fails with "failed to process type: 64" Anton Blanchard
2016-10-10  5:02 ` Michael Ellerman
2016-10-10  5:59   ` Nicholas Piggin
2016-10-10 10:18   ` Anton Blanchard
2016-10-10 10:39     ` Michael Ellerman
2016-11-21  6:28 ` Anton Blanchard
2016-11-22  8:40   ` [PATCH] perf TUI: Don't throw error for zero length symbols Ravi Bangoria
2016-11-22  8:49     ` Ravi Bangoria
2016-11-22  8:56       ` Ravi Bangoria [this message]
2016-12-16 10:38     ` Ravi Bangoria
2016-12-16 20:27       ` Anton Blanchard
2016-12-19 18:15         ` Arnaldo Carvalho de Melo
2016-12-20 19:30     ` [tip:perf/urgent] perf annotate: " tip-bot for Ravi Bangoria

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=5834082E.20903@linux.vnet.ibm.com \
    --to=ravi.bangoria@linux.vnet.ibm.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=chris.ryder@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.orgp \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    /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.