From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752447AbcELHrF (ORCPT ); Thu, 12 May 2016 03:47:05 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40371 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751594AbcELHrD (ORCPT ); Thu, 12 May 2016 03:47:03 -0400 Date: Thu, 12 May 2016 09:47:00 +0200 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, peterz@infradead.org, jolsa@kernel.org, linux-kernel@vger.kernel.org Subject: Re: Add top down metrics to perf stat Message-ID: <20160512074700.GA14734@krava> References: <1462489447-31832-1-git-send-email-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1462489447-31832-1-git-send-email-andi@firstfloor.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 12 May 2016 07:47:02 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 05, 2016 at 04:03:57PM -0700, Andi Kleen wrote: SNIP > The kernel declares the events supported by the current > CPU and perf stat then computes the formulas based on the > available metrics. > > > Example output: > > $ perf stat --topdown -I 1000 cmd > 1.000735655 frontend bound retiring bad speculation backend bound > 1.000735655 S0-C0 2 47.84% 11.69% 8.37% 32.10% > 1.000735655 S0-C1 2 45.53% 11.39% 8.52% 34.56% > 2.003978563 S0-C0 2 49.47% 12.22% 8.65% 29.66% > 2.003978563 S0-C1 2 47.21% 12.98% 8.77% 31.04% > 3.004901432 S0-C0 2 49.35% 12.26% 8.68% 29.70% > 3.004901432 S0-C1 2 47.23% 12.67% 8.76% 31.35% > 4.005766611 S0-C0 2 48.44% 12.14% 8.59% 30.82% > 4.005766611 S0-C1 2 46.07% 12.41% 8.67% 32.85% > 5.006580592 S0-C0 2 47.91% 12.08% 8.57% 31.44% > 5.006580592 S0-C1 2 45.57% 12.27% 8.63% 33.53% > 6.007545125 S0-C0 2 47.45% 12.02% 8.57% 31.96% > 6.007545125 S0-C1 2 45.13% 12.17% 8.57% 34.14% > 7.008539347 S0-C0 2 47.07% 12.03% 8.61% 32.29% getting -0% for bad speculation.. im on your perf/top-down-20 thanks, jirka [root@ibm-x3650m4-01 perf]# ./perf stat --topdown -a -I 1000 nmi_watchdog enabled with topdown. May give wrong results. Disable with echo 0 > /proc/sys/kernel/nmi_watchdog 1.002322346 retiring bad speculation frontend bound backend bound 1.002322346 S0-C0 2 38.3% 0.0% 57.9% 3.8% 1.002322346 S0-C1 2 38.3% 0.0% 59.1% 2.6% 1.002322346 S0-C2 2 38.3% 0.0% 59.0% 2.6% 1.002322346 S0-C3 2 38.3% 0.0% 58.7% 3.0% 1.002322346 S0-C4 2 38.3% -0.0% 58.6% 3.1% 1.002322346 S0-C5 2 38.4% -0.0% 58.3% 3.3% 1.002322346 S1-C0 2 38.3% -0.0% 58.7% 3.0% 1.002322346 S1-C1 2 38.3% 0.0% 59.7% 2.0% 1.002322346 S1-C2 2 38.3% -0.0% 59.3% 2.5% 1.002322346 S1-C3 2 38.3% -0.0% 59.1% 2.5% 1.002322346 S1-C4 2 38.3% 0.0% 59.1% 2.6% 1.002322346 S1-C5 2 38.3% -0.0% 59.1% 2.7% 2.005429451 S0-C0 2 38.3% 0.0% 57.9% 3.8% ...