Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752562AbbGQQME (ORCPT ); Fri, 17 Jul 2015 12:12:04 -0400 Received: from foss.arm.com ([217.140.101.70]:49761 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752306AbbGQQMB (ORCPT ); Fri, 17 Jul 2015 12:12:01 -0400 Date: Fri, 17 Jul 2015 17:11:36 +0100 From: Mark Rutland To: "Liang, Kan" Cc: "a.p.zijlstra@chello.nl" , "mingo@redhat.com" , "acme@kernel.org" , "eranian@google.com" , "ak@linux.intel.com" , "Hunter, Adrian" , "dsahern@gmail.com" , "jolsa@kernel.org" , "namhyung@kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 3/9] perf/x86: Add is_hardware_event Message-ID: <20150717161136.GH26091@leverpostej> References: <1437078831-10152-1-git-send-email-kan.liang@intel.com> <1437078831-10152-4-git-send-email-kan.liang@intel.com> <20150717104814.GB26091@leverpostej> <37D7C6CF3E00A74B8858931C1DB2F0770188DD5E@SHSMSX103.ccr.corp.intel.com> <20150717154726.GF26091@leverpostej> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150717154726.GF26091@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: 1490 Lines: 39 On Fri, Jul 17, 2015 at 04:47:26PM +0100, Mark Rutland wrote: > On Fri, Jul 17, 2015 at 04:03:36PM +0100, Liang, Kan wrote: > > > > > > On Thu, Jul 16, 2015 at 09:33:45PM +0100, kan.liang@intel.com wrote: > > > > From: Kan Liang > > > > > > > > Using is_hardware_event to replace !is_software_event to indicate a > > > > hardware event. > > > > > > Why...? > > > > First, the comments of is_software_event is not correct. > > 0 or !is_software_event is not for a hardware event. > > is_hardware_event is for a hardware event. > > Circular logic is fantastic. Sorry for the snark here. I completely misread this. I agree that the comment is wrong. However, changing !is_software_event to is_hardware_event is not always correct. For example, perf_group_attach tests for the addition of a non-software event to a software group, so we can mark the group as not consisting solely of software events. For that to be done correctly, we need to check !is_software_event. I was wrong about the throttling, having confused active_oncpu and nr_active. Sorry for the noise on that. However, as you mention that does prevent the use of exclusive events for uncore PMUs, and I don't see why that should change. Thanks, Mark. -- 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/