Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752071AbbDTQ50 (ORCPT ); Mon, 20 Apr 2015 12:57:26 -0400 Received: from one.firstfloor.org ([193.170.194.197]:41586 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771AbbDTQ5Z (ORCPT ); Mon, 20 Apr 2015 12:57:25 -0400 Date: Mon, 20 Apr 2015 18:57:22 +0200 From: Andi Kleen To: Mark Rutland Cc: Andi Kleen , Kan Liang , "acme@kernel.org" , "a.p.zijlstra@chello.nl" , "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: <20150420165722.GB2366@two.firstfloor.org> References: <1429084576-1078-1-git-send-email-kan.liang@intel.com> <20150416163140.GA19775@leverpostej> <20150416212342.GW2366@two.firstfloor.org> <20150417094746.GA21655@leverpostej> <20150418004705.GA2366@two.firstfloor.org> <20150420101553.GE15875@leverpostej> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150420101553.GE15875@leverpostej> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1412 Lines: 35 > If you don't care about sampling and only care about totals, then you > can just open the events concurrently *without* grouping them, as I > stated previously. perf record doesn't really support that. We need some group reader that runs regularly. The best choice for the leader is a CPU sample event, which also has the advantage that it won't disturb idle states. > > > From my PoV that violates group semantics, because now the events aren't > > > always counting at the same time (which would be the reason I grouped > > > them in the first place). > > > > You never use the absolute value, just differences. The differences > > effectively count only when the group runs. > > Except that the uncore PMU is counting during the periods the CPU PMU is > disabled (e.g. when it is being programmed, read, or written). There's a > race there that you cannot solve given the two are indepedent agents. We get useful information, like "memory bandwidth during the group run time". You're right formulas between different PMUs are problematic though. But in most cases time relation is good enough. -Andi -- ak@linux.intel.com -- Speaking for myself only. -- 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/