1
0
Fork 0
alistair23-linux/tools/perf
Stephane Eranian f5b4a9c3ab perf stat: Add no-aggregation mode to -a
This patch adds a new -A option to perf stat. If specified then perf stat does
not aggregate counts across all monitored CPUs in system-wide mode, i.e., when
using -a. This option is not supported in per-thread mode.

Being able to get a per-cpu breakdown is useful to detect imbalances between
CPUs when running a uniform workload than spans all monitored CPUs.

The second version corrects the missing cpumap[] support, so that it works when
the -C option is used.

The third version fixes a missing cpumap[] in print_counter() and removes a
stray patch in builtin-trace.c.

Examples on a 4-way system:

# perf stat -a   -e cycles,instructions -- sleep 1
 Performance counter stats for 'sleep 1':
         9592808135  cycles
         3490380006  instructions             #      0.364 IPC
        1.001584632  seconds time elapsed

# perf stat -a -A -e cycles,instructions -- sleep 1
 Performance counter stats for 'sleep 1':
CPU0            2398163767  cycles
CPU1            2398180817  cycles
CPU2            2398217115  cycles
CPU3            2398247483  cycles
CPU0             872282046  instructions             #      0.364 IPC
CPU1             873481776  instructions             #      0.364 IPC
CPU2             872638127  instructions             #      0.364 IPC
CPU3             872437789  instructions             #      0.364 IPC
        1.001556052  seconds time elapsed

Cc: David S. Miller <davem@davemloft.net>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Robert Richter <robert.richter@amd.com>
LKML-Reference: <4ce257b5.1e07e30a.7b6b.3aa9@mx.google.com>
Signed-off-by: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2010-11-19 16:16:53 -02:00
..
Documentation perf stat: Add no-aggregation mode to -a 2010-11-19 16:16:53 -02:00
arch Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-08-06 09:30:52 -07:00
bench perf options: Check v type in OPT_U?INTEGER 2010-05-17 15:43:38 -03:00
scripts perf trace scripting: remove system-wide param from shell scripts 2010-11-10 08:08:20 -06:00
util perf, ui: Eliminate stack-smashing protection compiler complaint 2010-11-10 09:04:32 +01:00
.gitignore perf tools: .gitignore += config.make config.make.autogen 2010-06-17 10:24:31 -03:00
CREDITS perf_counter tools: Add CREDITS file for Git contributors 2009-06-24 19:54:29 +02:00
MANIFEST perf tools: Make target to generate self contained source tarball 2010-06-05 09:33:35 -03:00
Makefile Merge branch 'perf/urgent' into perf/core 2010-10-05 09:47:14 +02:00
builtin-annotate.c perf tools: Add --tui and --stdio to choose the UI 2010-08-21 10:49:46 -03:00
builtin-bench.c perf options: Type check all the remaining OPT_ variants 2010-05-17 16:22:41 -03:00
builtin-buildid-cache.c perf buildid: add perfconfig option to specify buildid cache dir 2010-06-05 09:34:04 -03:00
builtin-buildid-list.c perf tools: Remove unneeded code for tracking the cwd in perf sessions 2010-07-27 11:46:12 -03:00
builtin-diff.c perf tools: Remove unneeded code for tracking the cwd in perf sessions 2010-07-27 11:46:12 -03:00
builtin-help.c perf options: Type check all the remaining OPT_ variants 2010-05-17 16:22:41 -03:00
builtin-inject.c perf inject: Add missing bits 2010-05-04 10:48:22 -03:00
builtin-kmem.c perf: add perf-inject builtin 2010-05-02 13:36:56 -03:00
builtin-kvm.c perf options: Type check all the remaining OPT_ variants 2010-05-17 16:22:41 -03:00
builtin-list.c perf list: Fix large list output by using the pager 2009-08-13 09:05:48 +02:00
builtin-lock.c perf options: Type check OPT_BOOLEAN and fix the offenders 2010-05-17 16:22:37 -03:00
builtin-probe.c perf probe: Add basic module support 2010-10-21 16:11:44 -02:00
builtin-record.c perf record: make the record options available outside perf record 2010-11-10 08:11:30 -06:00
builtin-report.c perf: Rename append_callchain into callchain_append 2010-08-22 20:43:51 +02:00
builtin-sched.c perf: Use event__process_task from perf sched 2010-06-01 00:10:32 +02:00
builtin-stat.c perf stat: Add no-aggregation mode to -a 2010-11-19 16:16:53 -02:00
builtin-test.c perf options: Type check OPT_BOOLEAN and fix the offenders 2010-05-17 16:22:37 -03:00
builtin-timechart.c perf timechart: Adjust confusing if indentation 2010-08-05 19:38:02 -03:00
builtin-top.c perf: Fix usages of profile_cpu in builtin-top.c to use cpu_list 2010-11-10 09:16:12 +01:00
builtin-trace.c perf trace: update usage 2010-11-10 08:20:45 -06:00
builtin.h perf: add perf-inject builtin 2010-05-02 13:36:56 -03:00
command-list.txt perf inject: Add missing bits 2010-05-04 10:48:22 -03:00
design.txt perf: Fix few typos + cosmetics 2010-01-13 17:39:44 +01:00
feature-tests.mak Merge branch 'linus' into perf/core 2010-08-25 13:10:00 +02:00
perf-archive.sh perf buildid: add perfconfig option to specify buildid cache dir 2010-06-05 09:34:04 -03:00
perf.c perf buildid: add perfconfig option to specify buildid cache dir 2010-06-05 09:34:04 -03:00
perf.h perf, MIPS: Support cross compiling of tools/perf for MIPS 2010-10-12 13:34:37 +02:00