From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755388AbbLKQBn (ORCPT ); Fri, 11 Dec 2015 11:01:43 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:56676 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754884AbbLKQBl (ORCPT ); Fri, 11 Dec 2015 11:01:41 -0500 Date: Fri, 11 Dec 2015 17:01:36 +0100 From: Peter Zijlstra To: Alexander Shishkin Cc: Ingo Molnar , linux-kernel@vger.kernel.org, vince@deater.net, eranian@google.com, Arnaldo Carvalho de Melo , Mathieu Poirier Subject: Re: [PATCH v0 3/5] perf: Introduce instruction trace filtering Message-ID: <20151211160136.GA6356@twins.programming.kicks-ass.net> References: <1449840998-29902-1-git-send-email-alexander.shishkin@linux.intel.com> <1449840998-29902-4-git-send-email-alexander.shishkin@linux.intel.com> <20151211150236.GU6356@twins.programming.kicks-ass.net> <87wpslatut.fsf@ashishki-desk.ger.corp.intel.com> <20151211153354.GY6356@twins.programming.kicks-ass.net> <87si39aswc.fsf@ashishki-desk.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87si39aswc.fsf@ashishki-desk.ger.corp.intel.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 11, 2015 at 05:48:03PM +0200, Alexander Shishkin wrote: > > We can always call the validation thing, we must not call the program > > thing !ACTIVE is a clear and simple rule. > > Ah, but pmu::itrace_filter_setup() does not touch the hardware, > pmu::start() does. The former keeps an array of, say, MSR values ready > for programming in event::hw and the latter actually writes the MSRs. So > the above example should not be a problem. > > So in a way validation and programming are split already. And PT, for > example, won't have it any other way, you can only program stuff into > the registers while tracing is disabled. Yes, I just read that in the last patch. If however we fold the whole stop/start bits into it, that fails again. Hmm.. lemme ponder a bit.