From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968231AbdD0IRW (ORCPT ); Thu, 27 Apr 2017 04:17:22 -0400 Received: from mga02.intel.com ([134.134.136.20]:43512 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754215AbdD0IRR (ORCPT ); Thu, 27 Apr 2017 04:17:17 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,257,1488873600"; d="scan'208";a="961662139" Subject: Re: [PATCH] perf/x86/intel/pt: Allow disabling branch tracing To: Andi Kleen , Alexander Shishkin References: <87inosaoi1.fsf@ashishki-desk.ger.corp.intel.com> <20170206144140.14402-1-alexander.shishkin@linux.intel.com> <87efzbjopq.fsf@firstfloor.org> <87mvdz8fue.fsf@ashishki-desk.ger.corp.intel.com> <20170206171921.GG26852@two.firstfloor.org> Cc: Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, vince@deater.net, eranian@google.com, Arnaldo Carvalho de Melo , Borislav Petkov , Thomas Gleixner From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: <2cb2bf69-49d2-cf82-ccf8-8069741fe691@intel.com> Date: Thu, 27 Apr 2017 11:11:30 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170206171921.GG26852@two.firstfloor.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/02/17 19:19, Andi Kleen wrote: > On Mon, Feb 06, 2017 at 06:05:29PM +0200, Alexander Shishkin wrote: >> Andi Kleen writes: >> >>> Alexander Shishkin writes: >>> >>>> Now that Intel PT supports more types of trace content than just branch >>>> tracing, it may be useful to allow the user to disable branch tracing >>>> when it is not needed. >>>> >>>> The special case is BDW, where not setting BranchEn is not supported. >>>> >>>> This is slightly trickier than necessary, because up to this moment >>>> the driver has been setting BranchEn automatically and the userspace >>>> assumes as much. Instead of reversing the semantics of BranchEn, we >>>> introduce a 'passthrough' bit, which will forego the default and allow >>>> the user to set BranchEn to their heart's content. >>> >>> cpu/passthrough=1,branchen=1/ seems far uglier/more complicanted to me >>> than the original cpu/nobranch=1/ >> >> It's /passthrough=1,branch=0/ or simply /passthrough=1/. > > Ok, but still you have to list exactly to which flags passthrough > applies to, and it will only ever be branchen. It doesn't have to be that bad. For Intel PT, perf tools already provides default config which the user must override. So, when 'passthrough' is supported, the default config would include 'passthrough=1,branch=1'. So then the user would only have to put 'branch=0' when they want no branches.