From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751160AbdE3TEi (ORCPT ); Tue, 30 May 2017 15:04:38 -0400 Received: from semfq03.mfg.siteprotect.com ([64.26.60.184]:53524 "EHLO semfq03.mfg.siteprotect.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751082AbdE3TEg (ORCPT ); Tue, 30 May 2017 15:04:36 -0400 X-Greylist: delayed 3124 seconds by postgrey-1.27 at vger.kernel.org; Tue, 30 May 2017 15:04:36 EDT Date: Tue, 30 May 2017 13:55:33 -0400 (EDT) From: Vince Weaver X-X-Sender: vince@pianoman.cluster.toy To: Peter Zijlstra cc: Andi Kleen , linux-kernel@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Stephane Eranian , Alexander Shishkin , Arnaldo Carvalho de Melo , Jiri Olsa Subject: Re: perf group read for inherited events In-Reply-To: <20170530170150.cx554x7nmbrzv7nc@hirez.programming.kicks-ass.net> Message-ID: References: <20170526205601.GA5271@tassilo.jf.intel.com> <20170530094512.dy2nljns2uq7qa3j@hirez.programming.kicks-ass.net> <20170530135714.GJ24144@tassilo.jf.intel.com> <20170530170150.cx554x7nmbrzv7nc@hirez.programming.kicks-ass.net> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Originating-IP: 64.26.60.145 X-SpamExperts-Domain: hostwaytestmfg.com X-SpamExperts-Username: 64.26.60.144/30 Authentication-Results: mfg.siteprotect.com; auth=pass smtp.auth=64.26.60.144/30@hostwaytestmfg.com X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: SB/global_tokens (0.00485589249015) X-Recommended-Action: accept X-Filter-ID: s0sct1PQhAABKnZB5plbIZI2LH29AsuM4TsCPQ0vJ/KtnDbhsDtLos9bWjuA0y73Pg+QrxY6gq7D fa72IS1maFLaBxhBne360LF5VBow381R7gKuJOz6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uQIUeLrZz7zvqjG0GLqTHFj3 X-Report-Abuse-To: spam@semfq02.mfg.siteprotect.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 30 May 2017, Peter Zijlstra wrote: > On Tue, May 30, 2017 at 06:57:14AM -0700, Andi Kleen wrote: > > On Tue, May 30, 2017 at 11:45:12AM +0200, Peter Zijlstra wrote: > > > > Or is the simple patch below good enough? > > > > > > The below seems to be the correct thing. It is rather unfortunate that > > > this would break/significantly change existing semantics :/ > > > > The "existing semantics" as in ignoring the PERF_SAMPLE_READ in sample_type, > > even though it wasn't implemented? It seems reasonable to me. > > Right, so where we used to accept PERF_SAMPLE_READ on inherited events, > we now no longer will. > > Note that it currently doesn't work right, even if it doesn't fail like > with the proposed patch. > > Typically Vince will (rightly) complain when I change things like this. > But seeing how even if we accept it, it is fairly terminally buggered in > any case, we could change it. > > Vince, do you know of anybody that would be immediately affected by > this? I often only hear about breakage months later after it's too late. So the issue is currently if you were sampling, and you were sampling on an event group, and you had set PERF_SAMPLE_READ to get all counts for a group, and the event was also inherited.... perf_event_open() would let you do this even though the results would probably be wrong? I'm not aware of anyone trying to do this, or at least I should say PAPI isn't trying to do this (PAPI currently has pretty simplistic sampling support, though that's getting a major overhaul this summer). Vince