Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932544AbbKRIZd (ORCPT ); Wed, 18 Nov 2015 03:25:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54236 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932465AbbKRIZ3 (ORCPT ); Wed, 18 Nov 2015 03:25:29 -0500 Date: Wed, 18 Nov 2015 09:25:25 +0100 From: Jiri Olsa To: Namhyung Kim Cc: "Wangnan (F)" , Jiri Olsa , Arnaldo Carvalho de Melo , lkml , David Ahern , Peter Zijlstra , Ingo Molnar , Milian Wolff Subject: Re: [PATCH 2/3] perf tools: Add callchain order support for libunwind DWARF unwinder Message-ID: <20151118082525.GC5416@krava.brq.redhat.com> References: <1447772739-18471-1-git-send-email-jolsa@kernel.org> <1447772739-18471-3-git-send-email-jolsa@kernel.org> <564BFAD4.8060909@huawei.com> <20151118054114.GQ7062@sejong> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151118054114.GQ7062@sejong> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1391 Lines: 41 On Wed, Nov 18, 2015 at 02:41:14PM +0900, Namhyung Kim wrote: SNIP > > I'm not sure whether we can regard this behavior changing as a bugfix? I > > think > > there may be some reason the original code explicitly avoid creating an '0' > > entry. > > I think callchain value being 0 is an error or marker for the end of > callchain. So it'd be better avoiding 0 entry. > > But unfortunately, we have many 0 entries (and broken callchain after > them) with fp recording on optimized binaries. I think we should omit > those callchains. > > Maybe something like this? > > > > diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c > index 5ef90be2a249..22642c5719ab 100644 > --- a/tools/perf/util/machine.c > +++ b/tools/perf/util/machine.c > @@ -1850,6 +1850,15 @@ static int thread__resolve_callchain_sample(struct thread *thread, > #endif > ip = chain->ips[j]; > > + /* callchain value inside zero page means it's broken, stop */ > + if (ip < 4096) { > + if (callchain_param.order == ORDER_CALLER) { > + callchain_cursor_reset(&callchain_cursor); hum, do we want to throw away whatever we have till now? jirka -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/