linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] perf stat: add per-core count aggregation
@ 2013-02-12 14:09 Stephane Eranian
  2013-02-12 14:09 ` [PATCH 1/2] perf stat: refactor aggregation code Stephane Eranian
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Stephane Eranian @ 2013-02-12 14:09 UTC (permalink / raw)
  To: linux-kernel; +Cc: peterz, mingo, ak, acme, jolsa, namhyung.kim

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.
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:

 # 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                   

For instance here on this SNB machine, we can see that the load
is evenly balanced across all 4 physical core (HT is on).

Signed-off-by: Stephane Eranian <eranian@google.com>

-
Stephane Eranian (2):
  perf stat: refactor aggregation code
  perf stat: add per-core aggregation

 tools/perf/Documentation/perf-stat.txt |    6 +
 tools/perf/builtin-stat.c              |  237 ++++++++++++++++++++------------
 tools/perf/util/cpumap.c               |   86 ++++++++++--
 tools/perf/util/cpumap.h               |   12 ++
 4 files changed, 239 insertions(+), 102 deletions(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-02-13  9:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2013-02-12 17:29     ` Andi Kleen
2013-02-12 17:33       ` Stephane Eranian

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).