linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: acme@kernel.org, peterz@infradead.org, jolsa@kernel.org,
	mingo@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Add top down metrics to perf stat
Date: Mon, 16 May 2016 14:58:38 +0200	[thread overview]
Message-ID: <20160516125838.GD10877@krava> (raw)
In-Reply-To: <1463190297-17408-1-git-send-email-andi@firstfloor.org>

On Fri, May 13, 2016 at 06:44:49PM -0700, Andi Kleen wrote:

SNIP

>     
> The formulas to compute the metrics are generic, they
> only change based on the availability on the abstracted
> input values.
>     
> 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%           

you've lost first 3 header lines (time/core/cpus):

[jolsa@ibm-x3650m4-01 perf]$ sudo ./perf stat --per-core -e cycles -I 1000 -a
#           time core         cpus             counts unit events
     1.000310344 S0-C0           2      3,764,470,414      cycles                                                      
     1.000310344 S0-C1           2      3,764,445,293      cycles                                                      
     1.000310344 S0-C2           2      3,764,428,422      cycles                                                      

also I'm still getting -0% as I mentioned in my previous comment:

[jolsa@ibm-x3650m4-01 perf]$ sudo ./perf stat --topdown -I 1000 -a
nmi_watchdog enabled with topdown. May give wrong results.
Disable with echo 0 > /proc/sys/kernel/nmi_watchdog
     1.001615409                   retiring             bad speculation      frontend bound       backend bound        
     1.001615409 S0-C0           2     38.3%                0.0%               58.4%                3.3%           
     1.001615409 S0-C1           2     38.1%               -0.0%               59.3%                2.6%           
     1.001615409 S0-C2           2     38.1%                0.0%               58.9%                2.9%           
     1.001615409 S0-C3           2     38.1%               -0.0%               58.9%                3.0%           
     1.001615409 S0-C4           2     38.0%                0.0%               59.0%                2.9%           
     1.001615409 S0-C5           2     38.1%               -0.0%               58.6%                3.3%           
     1.001615409 S1-C0           2     49.7%                1.9%               44.7%                3.7%           

thanks,
jirka

  parent reply	other threads:[~2016-05-16 12:58 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-14  1:44 Add top down metrics to perf stat Andi Kleen
2016-05-14  1:44 ` [PATCH 1/8] x86/topology: Add topology_max_smt_threads() Andi Kleen
2016-05-14  1:44 ` [PATCH 2/8] perf/x86: Support sysfs files depending on SMT status Andi Kleen
2016-05-14  1:44 ` [PATCH 3/8] perf/x86/intel: Add Top Down events to Intel Core Andi Kleen
2016-05-14  1:44 ` [PATCH 4/8] perf/x86/intel: Add Top Down events to Intel Atom Andi Kleen
2016-05-14  1:44 ` [PATCH 5/8] perf/x86/intel: Use new topology_max_smt_threads() in HT leak workaround Andi Kleen
2016-05-14  1:44 ` [PATCH 6/8] perf stat: Avoid fractional digits for integer scales Andi Kleen
2016-05-16 12:53   ` Jiri Olsa
2016-05-14  1:44 ` [PATCH 7/8] perf stat: Basic support for TopDown in perf stat Andi Kleen
2016-05-14  1:44 ` [PATCH 8/8] perf stat: Add computation of TopDown formulas Andi Kleen
2016-05-20 10:23   ` Jiri Olsa
2016-05-20 13:38     ` Andi Kleen
2016-05-20 13:43       ` Jiri Olsa
2016-05-20 14:15         ` Andi Kleen
2016-05-20 13:43     ` Andi Kleen
2016-05-16 12:58 ` Jiri Olsa [this message]
2016-05-19 23:51   ` Add top down metrics to perf stat Andi Kleen
2016-05-20  9:59     ` Jiri Olsa
2016-05-20 14:18       ` Andi Kleen
2016-05-20 10:24 ` Jiri Olsa
  -- strict thread matches above, loose matches on Subject: below --
2016-05-20  0:09 Andi Kleen
2016-05-05 23:03 Andi Kleen
2016-05-12  7:47 ` Jiri Olsa
2016-04-27 20:00 Andi Kleen
2016-04-04 20:41 Andi Kleen
2016-03-22 23:08 Andi Kleen
2016-03-27 11:27 ` Jiri Olsa
2016-03-27 15:22   ` Andi Kleen
2016-01-20  2:27 Andi Kleen
2016-01-16  1:12 Andi Kleen
2015-08-08  1:06 Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160516125838.GD10877@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=andi@firstfloor.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).