Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756131AbcLSSPb (ORCPT ); Mon, 19 Dec 2016 13:15:31 -0500 Received: from mail.kernel.org ([198.145.29.136]:47844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754930AbcLSSPa (ORCPT ); Mon, 19 Dec 2016 13:15:30 -0500 Date: Mon, 19 Dec 2016 15:15:17 -0300 From: Arnaldo Carvalho de Melo To: Anton Blanchard Cc: Ravi Bangoria , chris.ryder@arm.com, peterz@infradead.org, linux-kernel@vger.kernel.org, npiggin@gmail.com, alexander.shishkin@linux.intel.com, mingo@redhat.com, paulus@samba.org, mhiramat@kernel.org, linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Madhavan Srinivasan Subject: Re: [PATCH] perf TUI: Don't throw error for zero length symbols Message-ID: <20161219181517.GA551@kernel.org> References: <20161121172818.161639c2@kryten> <1479804050-5028-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com> <5853C42B.9050402@linux.vnet.ibm.com> <20161217072754.32e6f492@kryten> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161217072754.32e6f492@kryten> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1712 Lines: 47 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 > > 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 > > > Signed-off-by: Ravi Bangoria > > > --- > > > 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; > >