Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756554AbbDOQ4A (ORCPT ); Wed, 15 Apr 2015 12:56:00 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:40053 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754959AbbDOQzx (ORCPT ); Wed, 15 Apr 2015 12:55:53 -0400 Date: Wed, 15 Apr 2015 18:55:41 +0200 From: Peter Zijlstra To: Andi Kleen Cc: Kan Liang , acme@kernel.org, eranian@google.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH V2 1/6] perf,core: allow invalid context events to be part of sw/hw groups Message-ID: <20150415165541.GZ5029@twins.programming.kicks-ass.net> References: <1429084576-1078-1-git-send-email-kan.liang@intel.com> <20150415161528.GV23123@twins.programming.kicks-ass.net> <20150415162110.GQ2366@two.firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150415162110.GQ2366@two.firstfloor.org> 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 Content-Length: 1735 Lines: 42 On Wed, Apr 15, 2015 at 06:21:11PM +0200, Andi Kleen wrote: > On Wed, Apr 15, 2015 at 06:15:28PM +0200, Peter Zijlstra wrote: > > On Wed, Apr 15, 2015 at 03:56:11AM -0400, Kan Liang wrote: > > > From: Kan Liang > > > > > > The pmu marked as perf_invalid_context don't have any state to switch on > > > context switch. Everything is global. So it is OK to be part of sw/hw > > > groups. > > > In sched_out/sched_in, del/add must be called, so the > > > perf_invalid_context event can be disabled/enabled accordingly during > > > context switch. The event count only be read when the event is already > > > sched_in. > > > > > > However group read doesn't work with mix events. > > > > > > For example, > > > perf record -e '{cycles,uncore_imc_0/cas_count_read/}:S' -a sleep 1 > > > It always gets EINVAL. > > > > > > This patch set intends to fix this issue. > > > perf record -e '{cycles,uncore_imc_0/cas_count_read/}:S' -a sleep 1 > > > [ perf record: Woken up 1 times to write data ] > > > [ perf record: Captured and wrote 0.202 MB perf.data (12 samples) ] > > > > > > This patch special case invalid context events and allow them to be part > > > of sw/hw groups. > > > > I don't get it. What, Why? > > Without the patch you can't mix uncore and cpu core events in the same > group. > > Collecting uncore in PMIs is useful, for example to get memory > bandwidth over time. Well, start with a coherent changelog, why do you still think those are optional? -- 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/