[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-edee44be59190bf22d5c6e521f3852b7ff16862f@git.kernel.org>
Date: Tue, 20 Dec 2016 11:30:10 -0800
From: tip-bot for Ravi Bangoria <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: paulus@...ba.org, alexander.shishkin@...ux.intel.com,
linux-kernel@...r.kernel.org, peterz@...radead.org,
tglx@...utronix.de, ravi.bangoria@...ux.vnet.ibm.com,
hpa@...or.com, benh@...nel.crashing.org, mhiramat@...nel.org,
npiggin@...il.com, acme@...hat.com, mpe@...erman.id.au,
anton@...ba.org, chris.ryder@....com, mingo@...nel.org
Subject: [tip:perf/urgent] perf annotate: Don't throw error for zero length
symbols
Commit-ID: edee44be59190bf22d5c6e521f3852b7ff16862f
Gitweb: http://git.kernel.org/tip/edee44be59190bf22d5c6e521f3852b7ff16862f
Author: Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>
AuthorDate: Tue, 22 Nov 2016 14:10:50 +0530
Committer: Arnaldo Carvalho de Melo <acme@...hat.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@...ba.org>
Link: https://lkml.org/lkml/2016/10/8/189
Signed-off-by: Ravi Bangoria <ravi.bangoria@...ux.vnet.ibm.com>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Chris Riyder <chris.ryder@....com>
Cc: linuxppc-dev@...ts.ozlabs.org
Cc: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: Nicholas Piggin <npiggin@...il.com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: stable@...nel.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@...hat.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;
Powered by blists - more mailing lists