linux/tools/perf
Ingo Molnar 481f988a01 perf stat: Add stalled cycles accounting, prettify the resulting output
Add stalled cycles accounting and use it to print the "cycles stalled per
instruction" value.

Also change the unit of the cycles output from M/sec to GHz - this is more
intuitive.

Prettify the output to:

 Performance counter stats for './loop_1b_instructions':

        239.775036 task-clock               #    0.997 CPUs utilized
       761,903,912 cycles                   #    3.178 GHz
       356,620,620 stalled-cycles           #   46.81% of all cycles are idle
     1,001,578,351 instructions             #    1.31  insns per cycle
                                            #    0.36  stalled cycles per insn
            14,782 cache-references         #    0.062 M/sec
             5,694 cache-misses             #   38.520 % of all cache refs

        0.240493656  seconds time elapsed

Also adjust the --repeat output to make the percentages align vertically:

 Performance counter stats for './loop_1b_instructions' (10 runs):

        236.096793 task-clock               #    0.997 CPUs utilized             ( +-   0.011% )
       756,553,086 cycles                   #    3.204 GHz                       ( +-   0.002% )
       354,942,692 stalled-cycles           #   46.92% of all cycles are idle    ( +-   0.008% )
     1,001,389,700 instructions             #    1.32  insns per cycle
                                            #    0.35  stalled cycles per insn   ( +-   0.000% )
            10,166 cache-references         #    0.043 M/sec                     ( +-   0.742% )
               468 cache-misses             #    4.608 % of all cache refs       ( +-  13.385% )

        0.236874136  seconds time elapsed   ( +- 0.01% )

Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/n/tip-uapziqny39601apdmmhoz7hk@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2011-04-26 20:04:56 +02:00
..
Documentation perf script: Add more documentation about the -f/--fields parameters 2011-03-30 15:30:43 -03:00
arch [S390] perf: add DWARF register lookup for s390 2011-01-05 12:47:31 +01:00
bench perf tool: Fix gcc 4.6.0 issues 2011-02-07 12:41:41 -02:00
config perf tools: git mv tools/perf/{features-tests.mak,config/} 2011-04-19 08:18:36 -03:00
python perf evlist: Store pointer to the cpu and thread maps 2011-01-31 12:40:52 -02:00
scripts perf script: Finish the rename from trace to script 2010-12-25 11:29:02 -02:00
util perf stat: Make all displayed event names parseable as well 2011-04-26 20:04:55 +02:00
.gitignore perf tools: Makefile: Remove various and sundry cruft 2011-02-18 07:43:06 -02:00
CREDITS
MANIFEST perf packaging: add memcpy to perf MANIFEST 2010-11-30 23:00:10 -02:00
Makefile perf tools: git mv tools/perf/{features-tests.mak,config/} 2011-04-19 08:18:36 -03:00
builtin-annotate.c perf session: Pass evsel in event_ops->sample() 2011-03-23 19:28:58 -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 Merge commit 'v2.6.37-rc8' into perf/core 2011-01-04 08:08:54 +01:00
builtin-diff.c perf session: Pass evsel in event_ops->sample() 2011-03-23 19:28:58 -03:00
builtin-evlist.c perf evlist: New command to list the names of events present in a perf.data file 2011-03-15 11:10:48 -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 session: Pass evsel in event_ops->sample() 2011-03-23 19:28:58 -03:00
builtin-kmem.c perf session: Pass evsel in event_ops->sample() 2011-03-23 19:28:58 -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: Allow filtering list of events 2011-02-17 15:38:58 -02:00
builtin-lock.c perf session: Pass evsel in event_ops->sample() 2011-03-23 19:28:58 -03:00
builtin-probe.c perf probe: Use %td for pointer arithmetic result 2011-01-31 19:45:38 -02:00
builtin-record.c perf evsel: Fix use of inherit 2011-04-15 12:52:28 -03:00
builtin-report.c perf session: Pass evsel in event_ops->sample() 2011-03-23 19:28:58 -03:00
builtin-sched.c perf session: Pass evsel in event_ops->sample() 2011-03-23 19:28:58 -03:00
builtin-script.c perf script: improve validation of sample attributes for output fields 2011-04-20 07:27:52 -03:00
builtin-stat.c perf stat: Add stalled cycles accounting, prettify the resulting output 2011-04-26 20:04:56 +02:00
builtin-test.c perf evsel: Fix use of inherit 2011-04-15 12:52:28 -03:00
builtin-timechart.c perf session: Pass evsel in event_ops->sample() 2011-03-23 19:28:58 -03:00
builtin-top.c perf evsel: Fix use of inherit 2011-04-15 12:52:28 -03:00
builtin.h perf evlist: New command to list the names of events present in a perf.data file 2011-03-15 11:10:48 -03:00
command-list.txt perf evlist: New command to list the names of events present in a perf.data file 2011-03-15 11:10:48 -03:00
design.txt perf: Fix few typos + cosmetics 2010-01-13 17:39:44 +01: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 evlist: New command to list the names of events present in a perf.data file 2011-03-15 11:10:48 -03:00
perf.h perf record: Move perf_mmap__write_tail to perf.h 2011-01-22 19:56:29 -02:00