Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752317AbaKER5Q (ORCPT ); Wed, 5 Nov 2014 12:57:16 -0500 Received: from mga03.intel.com ([134.134.136.65]:8093 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751288AbaKER5P (ORCPT ); Wed, 5 Nov 2014 12:57:15 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,321,1413270000"; d="scan'208";a="632073905" Date: Wed, 5 Nov 2014 09:57:03 -0800 From: Andi Kleen To: Stephane Eranian Cc: Peter Zijlstra , Kan Liang , LKML , "mingo@redhat.com" , Paul Mackerras , Arnaldo Carvalho de Melo , Jiri Olsa Subject: Re: [PATCH V7 13/17] perf, x86: enable LBR callstack when recording callchain Message-ID: <20141105175703.GQ3274@tassilo.jf.intel.com> References: <1415156173-10035-1-git-send-email-kan.liang@intel.com> <1415156173-10035-14-git-send-email-kan.liang@intel.com> <20141105092145.GP10501@worktop.programming.kicks-ass.net> <20141105104359.GP3337@twins.programming.kicks-ass.net> <20141105124926.GS3337@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > LBR callstack fails for leaf function optimization. Where the callee does > not return to its caller but instead to the caller's caller. That is the one > case I know about. There are others I believe. No it should work fine for this case. You just don't see the tail call, but the call stack does not get out of sync, so future calls work fine. It's the same as with frame pointers or even dwarf. Typical cases that throw it off are throwing exceptions or user space context switching. One somewhat common case that used to throw it off was the call 1f ; 1: pop %ebx older 32bit binaries used to do to get the PIC offset. That has been fixed in newer compilers by using an out of line function (and also Broadwell has a workaround for this) -Andi -- ak@linux.intel.com -- Speaking for myself only -- 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/