All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephane Eranian <eranian@google.com>
To: Andi Kleen <ak@linux.intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	"mingo@elte.hu" <mingo@elte.hu>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung.kim@lge.com>
Subject: Re: [PATCH 0/2] perf stat: add per-core count aggregation
Date: Tue, 12 Feb 2013 18:26:12 +0100	[thread overview]
Message-ID: <CABPqkBTZ+ooWHFvagR=YFDUdnnW9az0LXg1-etNfgC2Af8yA-w@mail.gmail.com> (raw)
In-Reply-To: <20130212172319.GB30387@tassilo.jf.intel.com>

On Tue, Feb 12, 2013 at 6:23 PM, Andi Kleen <ak@linux.intel.com> wrote:
> On Tue, Feb 12, 2013 at 03:09:26PM +0100, Stephane Eranian wrote:
>> This patch series contains improvement to the aggregation support
>> in perf stat.
>>
>> First, the aggregation code is refactored and a aggr_mode enum
>> is defined. There is also an important bug fix for the existing
>> per-socket aggregation.
>>
>> Second, the patch adds a new --aggr-core option to perf stat.
>
> Perhaps it's just me, but the option name is ugly (and sounds
> aggressive)
>
> --per-core perhaps?
>
I chose that name to be similar to ---aggr-socket.
But we could change both at this point.


> The idea itself is useful.
>
Yes, it is.

>> It aggregates counts per physical core and becomes useful on
>> systems with hyper-threading. The cores are presented per
>> socket: S0-C1, means socket 0 core 1. Note that the core number
>> represents its physical core id. As such, numbers may not always
>> be contiguous. All of this is based on topology information available
>> in sysfs.
>>
>> Per-core aggregation can be combined with interval printing:
>
> FWIW this would be much nicer if stat had a Kevents or Mevents mode.
> Usually we don't need all the digits.  But that could be added separately
>
> Does it work for multiple events in parallel?

Yes, it does. It's all regular perf stat.


>>
>>  # perf stat -a --aggr-core -I 1000 -e cycles sleep 100
>>  #           time core         cpus             counts events
>>       1.000101160 S0-C0           2      6,051,254,899 cycles
>>       1.000101160 S0-C1           2      6,379,230,776 cycles
>>       1.000101160 S0-C2           2      6,480,268,471 cycles
>>       1.000101160 S0-C3           2      6,110,514,321 cycles
>>       2.000663750 S0-C0           2      6,572,533,016 cycles
>>       2.000663750 S0-C1           2      6,378,623,674 cycles
>>       2.000663750 S0-C2           2      6,264,127,589 cycles
>>       2.000663750 S0-C3           2      6,305,346,613 cycles
>
> -Andi

  reply	other threads:[~2013-02-12 17:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-12 14:09 [PATCH 0/2] perf stat: add per-core count aggregation Stephane Eranian
2013-02-12 14:09 ` [PATCH 1/2] perf stat: refactor aggregation code Stephane Eranian
2013-02-12 17:26   ` Andi Kleen
2013-02-13  7:50   ` Namhyung Kim
2013-02-13  9:38     ` Stephane Eranian
2013-02-12 14:09 ` [PATCH 2/2] perf stat: add per-core aggregation Stephane Eranian
2013-02-12 17:23 ` [PATCH 0/2] perf stat: add per-core count aggregation Andi Kleen
2013-02-12 17:26   ` Stephane Eranian [this message]
2013-02-12 17:29     ` Andi Kleen
2013-02-12 17:33       ` Stephane Eranian

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='CABPqkBTZ+ooWHFvagR=YFDUdnnW9az0LXg1-etNfgC2Af8yA-w@mail.gmail.com' \
    --to=eranian@google.com \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=namhyung.kim@lge.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.