public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation•org>
To: linux-kernel@vger•kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
	stable@vger•kernel.org,
	Ravi Bangoria <ravi.bangoria@linux•vnet.ibm.com>,
	Alexander Shishkin <alexander.shishkin@linux•intel.com>,
	Benjamin Herrenschmidt <benh@kernel•crashing.org>,
	Chris Riyder <chris.ryder@arm•com>,
	linuxppc-dev@lists•ozlabs.org,
	Masami Hiramatsu <mhiramat@kernel•org>,
	Michael Ellerman <mpe@ellerman•id.au>,
	Nicholas Piggin <npiggin@gmail•com>,
	Paul Mackerras <paulus@samba•org>,
	Peter Zijlstra <peterz@infradead•org>,
	Arnaldo Carvalho de Melo <acme@redhat•com>
Subject: [PATCH 4.9 005/116] perf annotate: Dont throw error for zero length symbols
Date: Fri,  6 Jan 2017 22:42:47 +0100	[thread overview]
Message-ID: <20170106213908.993514219@linuxfoundation.org> (raw)
In-Reply-To: <20170106213908.681421800@linuxfoundation.org>

4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Ravi Bangoria <ravi.bangoria@linux•vnet.ibm.com>

commit edee44be59190bf22d5c6e521f3852b7ff16862f upstream.

'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>
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation•org>

---
 tools/perf/util/annotate.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -593,7 +593,8 @@ static int __symbol__inc_addr_samples(st
 
 	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:[~2017-01-06 21:55 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20170106213908.681421800@linuxfoundation.org>]

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=20170106213908.993514219@linuxfoundation.org \
    --to=gregkh@linuxfoundation$(echo .)org \
    --cc=acme@redhat$(echo .)com \
    --cc=alexander.shishkin@linux$(echo .)intel.com \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=chris.ryder@arm$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mhiramat@kernel$(echo .)org \
    --cc=mpe@ellerman$(echo .)id.au \
    --cc=npiggin@gmail$(echo .)com \
    --cc=paulus@samba$(echo .)org \
    --cc=peterz@infradead$(echo .)org \
    --cc=ravi.bangoria@linux$(echo .)vnet.ibm.com \
    --cc=stable@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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