From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754362AbcBXOCo (ORCPT ); Wed, 24 Feb 2016 09:02:44 -0500 Received: from casper.infradead.org ([85.118.1.10]:57008 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751718AbcBXOCn (ORCPT ); Wed, 24 Feb 2016 09:02:43 -0500 Date: Wed, 24 Feb 2016 15:02:39 +0100 From: Peter Zijlstra To: Pratyush Anand Cc: Jiri Olsa , mingo@kernel.org, alexander.shishkin@linux.intel.com, eranian@google.com, linux-kernel@vger.kernel.org, vince@deater.net, dvyukov@google.com, andi@firstfloor.org, sasha.levin@oracle.com, oleg@redhat.com Subject: Re: [RFC][PATCH 4/7] perf: Fix scaling vs enable_on_exec Message-ID: <20160224140239.GT6375@twins.programming.kicks-ass.net> References: <20160219143743.692339502@infradead.org> <20160219144132.043429490@infradead.org> <20160223152729.GT6357@twins.programming.kicks-ass.net> <20160223154849.GC9102@krava.redhat.com> <20160223163550.GC11724@dhcppc3.redhat.com> <20160223174741.GL6356@twins.programming.kicks-ass.net> <20160224115351.GS6375@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160224115351.GS6375@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 24, 2016 at 12:53:51PM +0100, Peter Zijlstra wrote: > On Tue, Feb 23, 2016 at 06:47:41PM +0100, Peter Zijlstra wrote: > > On Tue, Feb 23, 2016 at 10:05:50PM +0530, Pratyush Anand wrote: > > > Its better with this patch, still count is 1 more in case of higher probe hits ( > > > like 65535 times). > > > > Ah, ok, I'll go try again. > > OK, so the below seems to cure this for me, but now I'm hurting my head > to make the same true for perf_install_in_context(), because 'tricky' :/ > FWIW, it would be nice to have a similar test for: attr = { .disabled = true; } sys_perf_event_open(&attr, .pid = self); if (attr.disabled) ioctl(ENABLE); /* generate N events */ ioctl(DISABLE); read(); /* print event cnt and scale factors */ and one that has .disabled = false.