Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753766AbbGQURt (ORCPT ); Fri, 17 Jul 2015 16:17:49 -0400 Received: from mga14.intel.com ([192.55.52.115]:60355 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752753AbbGQURs (ORCPT ); Fri, 17 Jul 2015 16:17:48 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,497,1432623600"; d="scan'208";a="749549850" Date: Fri, 17 Jul 2015 13:17:47 -0700 From: Andi Kleen To: Mark Rutland Cc: "kan.liang@intel.com" , "a.p.zijlstra@chello.nl" , "mingo@redhat.com" , "acme@kernel.org" , "eranian@google.com" , "adrian.hunter@intel.com" , "dsahern@gmail.com" , "jolsa@kernel.org" , "namhyung@kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 4/9] perf/x86: special case per-cpu core misc PMU events Message-ID: <20150717201747.GF7380@tassilo.jf.intel.com> References: <1437078831-10152-1-git-send-email-kan.liang@intel.com> <1437078831-10152-5-git-send-email-kan.liang@intel.com> <20150717122105.GD26091@leverpostej> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150717122105.GD26091@leverpostej> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1009 Lines: 22 > As with my earlier comments, I don't think these can be grouped with > events (not even from the same PMU given their free-running nature). Mark, we already went through this last time. There is nothing stopping handling free running counters as part of other groups. A perf event logically has a 64bit counter that accumulates counts from a less wide hardware counter. A free running counter just has to be sampled at the beginning and at the end of the measurement period, and the difference between the two values added to the perf counter. To handle CPU switches the counter is just sampled, and accumulated into the software counter, before switching to another CPU. Then you start the next measurement period with a sample from the new CPU etc. -Andi -- 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/