From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932565AbbJMPko (ORCPT ); Tue, 13 Oct 2015 11:40:44 -0400 Received: from mga01.intel.com ([192.55.52.88]:45821 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932537AbbJMPkl (ORCPT ); Tue, 13 Oct 2015 11:40:41 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,678,1437462000"; d="scan'208";a="579882552" Date: Tue, 13 Oct 2015 08:40:26 -0700 From: Andi Kleen To: Ingo Molnar Cc: Stephane Eranian , linux-kernel@vger.kernel.org, acme@redhat.com, peterz@infradead.org, mingo@elte.hu, jolsa@redhat.com, namhyung@kernel.org, khandual@linux.vnet.ibm.com Subject: Re: [PATCH 2/4] perf/x86: add support for PERF_SAMPLE_BRANCH_CALL Message-ID: <20151013154026.GB7750@tassilo.jf.intel.com> References: <1444720151-10275-1-git-send-email-eranian@google.com> <1444720151-10275-3-git-send-email-eranian@google.com> <20151013134004.GA8843@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151013134004.GA8843@gmail.com> 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 > I'm wondering how frequent zero-length calls are. If they still occur in typical > user-space, would it make sense to also have a separate branch sampling type for > zero length calls? Apparently not too old icc compiled 32bit PIC binaries still contain it. For gcc it was fixed for much longer. But I'm not sure it's that interesting to sample by itself. > push the current IP on the stack: > > call next_addr > next_addr: > pop %reg > > which can take over 10 cycles on certain microarchitectures (and it unbalances > whatever call stack tracking/caching the CPU does as well). > > So it might make sense to analyze them separately. I guess that's the reason why > Intel added a separate flag for them in the PMU. X86_BR_ZERO_CALL is only a software filter. There's no direct support for it in the Intel hardware. It was added to make the LBR call stack more reliable, which otherwise gets messed up by the zero length calls. -Andi -- ak@linux.intel.com -- Speaking for myself only