public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Ravi Bangoria <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: paulus@samba.org, alexander.shishkin@linux.intel.com,
	linux-kernel@vger.kernel.org, peterz@infradead.org,
	tglx@linutronix.de, ravi.bangoria@linux.vnet.ibm.com,
	hpa@zytor.com, benh@kernel.crashing.org, mhiramat@kernel.org,
	npiggin@gmail.com, acme@redhat.com, mpe@ellerman.id.au,
	anton@samba.org, chris.ryder@arm.com, mingo@kernel.org
Subject: [tip:perf/urgent] perf annotate: Don't throw error for zero length symbols
Date: Tue, 20 Dec 2016 11:30:10 -0800	[thread overview]
Message-ID: <tip-edee44be59190bf22d5c6e521f3852b7ff16862f@git.kernel.org> (raw)
In-Reply-To: <1479804050-5028-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com>

Commit-ID:  edee44be59190bf22d5c6e521f3852b7ff16862f
Gitweb:     http://git.kernel.org/tip/edee44be59190bf22d5c6e521f3852b7ff16862f
Author:     Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
AuthorDate: Tue, 22 Nov 2016 14:10:50 +0530
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 20 Dec 2016 12:00:32 -0300

perf annotate: Don't throw error for zero length symbols

'perf report --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.

Reported-and-Tested-by: Anton Blanchard <anton@samba.org>
Link: https://lkml.org/lkml/2016/10/8/189
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Chris Riyder <chris.ryder@arm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@kernel.org # v4.9+
Link: http://lkml.kernel.org/r/1479804050-5028-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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 c81a395..06cc04e 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -647,7 +647,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;

      parent reply	other threads:[~2016-12-20 20:31 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
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-bot for Ravi Bangoria [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=tip-edee44be59190bf22d5c6e521f3852b7ff16862f@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=anton@samba.org \
    --cc=benh@kernel.crashing.org \
    --cc=chris.ryder@arm.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=ravi.bangoria@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    /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