Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752147AbdFPRIx (ORCPT ); Fri, 16 Jun 2017 13:08:53 -0400 Received: from mail-io0-f178.google.com ([209.85.223.178]:35686 "EHLO mail-io0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750987AbdFPRIw (ORCPT ); Fri, 16 Jun 2017 13:08:52 -0400 MIME-Version: 1.0 In-Reply-To: <20170616160630.GE4789@tassilo.jf.intel.com> References: <1497534989-29231-1-git-send-email-eranian@google.com> <20170615151018.GA4789@tassilo.jf.intel.com> <20170615172320.GB4789@tassilo.jf.intel.com> <20170615200205.GC4789@tassilo.jf.intel.com> <20170615231816.GD4789@tassilo.jf.intel.com> <20170616160630.GE4789@tassilo.jf.intel.com> From: Stephane Eranian Date: Fri, 16 Jun 2017 10:08:50 -0700 Message-ID: Subject: Re: [PATCH 0/5] perf: add support for capturing skid IP To: Andi Kleen Cc: LKML , Arnaldo Carvalho de Melo , Peter Zijlstra , "mingo@elte.hu" , "Liang, Kan" , Jiri Olsa Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1191 Lines: 26 On Fri, Jun 16, 2017 at 9:06 AM, Andi Kleen wrote: > On Thu, Jun 15, 2017 at 11:52:07PM -0700, Stephane Eranian wrote: >> Andi, >> >> On Thu, Jun 15, 2017 at 4:18 PM, Andi Kleen wrote: >> >> Looking at this approach, the user interface is straightforward, >> >> implementation in the x86 code is a bit more hairy because of the way >> >> the branch_stack is captured, via the cpuc->lbr_entries. If you assume >> >> that SKID_IP cannot be used with any other branch stack mode, then it >> >> is easy. It becomes messy if you don't. >> > >> > That should be fine. After all if you have real LBRs you don't need >> > the skid IP. >> > >> Yes, you still do. This is not the same thing. LBR captures only taken branches. >> I care about taken AND non-taken branches and I don't want to sample on a >> non-taken event, assuming it is available. > > Ok that's a reasonable argument for reporting it separately, like > in your original patch. > Yeah, I think it is easier and more portable, especially on hardware with a PEBS-like mechanism but no branch buffer (like LBR). FYI, I did do a test implementation yesterday to evaluate the difficulty. > -Andi