From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932415AbcCHK0e (ORCPT ); Tue, 8 Mar 2016 05:26:34 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:52983 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753694AbcCHK0U (ORCPT ); Tue, 8 Mar 2016 05:26:20 -0500 Date: Tue, 8 Mar 2016 11:26:03 +0100 From: Peter Zijlstra To: James Morse Cc: 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, jolsa@redhat.com, Mark Rutland , Will Deacon , wangxg.fnst@cn.fujitsu.com Subject: Re: [RFC][PATCH 07/12] perf: Simplify/fix perf_event_enable() event scheduling Message-ID: <20160308102603.GX6344@twins.programming.kicks-ass.net> References: <20160111162458.427203780@infradead.org> <20160111163229.115404507@infradead.org> <56DEA3A1.3080206@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56DEA3A1.3080206@arm.com> 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 Tue, Mar 08, 2016 at 10:04:17AM +0000, James Morse wrote: > [0] > https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c I so hate LTP, you can't compile the test cases in isolate and running 'make' doesn't work. > [2] > ---------------------------------------- > x86_64, v4.2 > nanook@trouble-every-day:~$ ./perf_event_open02 -v > at iteration:0 value:3001278671 time_enabled:378865967 time_running:378865967 > at iteration:1 value:3001294516 time_enabled:379206798 time_running:379206798 > at iteration:2 value:3001304264 time_enabled:379741658 time_running:379741658 > at iteration:3 value:2247456463 time_enabled:381782350 time_running:285882994 > perf_event_open02 0 TINFO : overall task clock: 382444297 > perf_event_open02 0 TINFO : hw sum: 9004576323, task clock sum: 1146042829 > hw counters: 1276985606 1284698955 1291658694 1294253771 1293189575 1285360592 > 1278429130 > task clock counters: 162510606 163544930 164439727 164730880 164600624 163538072 > 162677990 > perf_event_open02 0 TINFO : ratio: 3.00 > perf_event_open02 1 TPASS : test passed > ---------------------------------------- > x86_64, v4.5-rc5: > nanook@trouble-every-day:~$ ./perf_event_open02 -v > at iteration:0 value:3001332678 time_enabled:379409484 time_running:379408991 > perf_event_open02 0 TINFO : overall task clock: 381025905 > perf_event_open02 0 TINFO : hw sum: 9004621962, task clock sum: 1142038427 > hw counters: 2249100352 2254366204 2252915996 2248239410 > task clock counters: 285302769 285853299 285787328 285095031 > perf_event_open02 0 TINFO : ratio: 3.00 > perf_event_open02 1 TFAIL : perf_event_open02.c:333: test failed (ratio > was greater than ) > ---------------------------------------- Its unfortunate the test doesn't actually tells what it was expecting. It fails to print 'nhw'. In any case, please try -rc6, which includes: a096309bc467 perf: Fix scaling vs. perf_install_in_context() bd2afa49d194 perf: Fix scaling vs. perf_event_enable() 7fce250915ef perf: Fix scaling vs. perf_event_enable_on_exec() 3cbaa5906967 perf: Fix ctx time tracking by introducing EVENT_TIME Which might fix this. I gave up after a few minutes trying to make LTP work.