Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942076AbcJ1Pne (ORCPT ); Fri, 28 Oct 2016 11:43:34 -0400 Received: from foss.arm.com ([217.140.101.70]:33898 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760585AbcJ1Pnd (ORCPT ); Fri, 28 Oct 2016 11:43:33 -0400 Date: Fri, 28 Oct 2016 16:42:59 +0100 From: Mark Rutland To: Jan Glauber Cc: Will Deacon , Peter Zijlstra , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 0/5] Cavium ThunderX uncore PMU support Message-ID: <20161028154259.GM5806@leverpostej> References: <1476955841-27898-1-git-send-email-jglauber@cavium.com> <20161020103707.GB3175@twins.programming.kicks-ass.net> <20161020112351.GC13708@hardcore> <20161028151749.GG14402@arm.com> <20161028153646.GA11371@hardcore> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161028153646.GA11371@hardcore> 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: 1721 Lines: 35 On Fri, Oct 28, 2016 at 05:36:46PM +0200, Jan Glauber wrote: > On Fri, Oct 28, 2016 at 04:17:49PM +0100, Will Deacon wrote: > > On Thu, Oct 20, 2016 at 01:23:51PM +0200, Jan Glauber wrote: > > > On Thu, Oct 20, 2016 at 12:37:07PM +0200, Peter Zijlstra wrote: > > > > On Thu, Oct 20, 2016 at 11:30:36AM +0200, Jan Glauber wrote: > > > > > Note: > > > > > I'm using perf_sw_context in difference to perf_invalid_context > > > > > (see WARN_ON in perf_pmu_register). Reason is that with perf_invalid_context > > > > > add() is never called and the counter results are shown as "unsupported" by > > > > > perf. With perf_sw_context everything works as expected. > > > > > > > > What?! All the uncore PMUs use perf_invalid_context. What doesn't work > > > > for you? > > > > > > OK, so using perf_invalid_context and "-a" seems to work. > > > > > > But I must say that I hate that from a user perspective. The user needs to know about > > > the type of PMU behind the event and then provide "-a" or get a " > > as counter value? > > > > Sure, but in the interest of getting *something* merged, can we start > > off using perf_invalid_context and then have the discussion about whether > > or not this can be extended later on, please? If your PMU is a shared > > resource amongst CPUs, it maybe that all you want is a better error > > message from the perf tool (but again, this can come later!). > > If that is the only obstacle I can repost with perf_sw_context (or do a > follow-up patch). After all it works, it is just "clueless" people like > me that are not aware of the required switches. Please send a version using perf_invalid_context (which I assume is what you meant above). Thanks, Mark.