alistair23-linux/tools
Andi Kleen 44d49a6002 perf stat: Support metrics in --per-core/socket mode
Enable metrics printing in --per-core / --per-socket mode. We need to
save the shadow metrics in a unique place. Always use the first CPU in
the aggregation. Then use the same CPU to retrieve the shadow value
later.

Example output:

  % perf stat --per-core -a ./BC1s

   Performance counter stats for 'system wide':

  S0-C0 2   2966.020381 task-clock (msec) #   2.004 CPUs utilized  (100.00%)
  S0-C0 2            49 context-switches  #   0.017 K/sec          (100.00%)
  S0-C0 2             4 cpu-migrations    #   0.001 K/sec          (100.00%)
  S0-C0 2           467 page-faults       #   0.157 K/sec
  S0-C0 2 4,599,061,773 cycles            #   1.551 GHz            (100.00%)
  S0-C0 2 9,755,886,883 instructions      #   2.12  insn per cycle (100.00%)
  S0-C0 2 1,906,272,125 branches          # 642.704 M/sec          (100.00%)
  S0-C0 2    81,180,867 branch-misses     #   4.26% of all branches
  S0-C1 2   2965.995373 task-clock (msec) #   2.003 CPUs utilized  (100.00%)
  S0-C1 2            62 context-switches  #   0.021 K/sec          (100.00%)
  S0-C1 2             8 cpu-migrations    #   0.003 K/sec          (100.00%)
  S0-C1 2           281 page-faults       #   0.095 K/sec
  S0-C1 2     6,347,290 cycles            #   0.002 GHz            (100.00%)
  S0-C1 2     4,654,156 instructions      #   0.73  insn per cycle (100.00%)
  S0-C1 2       947,121 branches          #   0.319 M/sec          (100.00%)
  S0-C1 2        37,322 branch-misses     #   3.94% of all branches

         1.480409747 seconds time elapsed

v2: Rebase to older patches
v3: Document shadow cpus. Fix aggr_get_id argument. Fix -A shadows (Jiri)

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/r/1456785386-19481-4-git-send-email-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-03-03 11:10:36 -03:00
..
arch
build perf build: Add libcrypto feature detection 2016-02-05 09:46:45 -03:00
cgroup
firewire
hv tools: hv: vss: fix the write()'s argument: error -> vss_msg 2015-12-14 19:15:05 -08:00
iio
include tools: Make list.h self-sufficient 2016-01-12 12:42:07 -03:00
laptop/freefall
lguest
lib tools lib traceevent: Split pevent_print_event() into specific functionality functions 2016-02-29 11:35:21 -03:00
net
nfsd
perf perf stat: Support metrics in --per-core/socket mode 2016-03-03 11:10:36 -03:00
power Merge branch 'pm-tools' 2016-01-21 00:43:29 +01:00
scripts tools: Move Makefile.arch from perf/config to tools/scripts 2016-01-11 19:22:20 -03:00
spi spi: spidev_test: Fix typo in error message 2015-12-08 17:58:56 +00:00
testing Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm 2016-02-25 18:54:53 -08:00
thermal/tmon
time
usb
virtio tools/virtio: add ringtest utilities 2016-01-26 10:18:30 +02:00
vm
Makefile Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2016-01-14 11:39:09 -08:00