tmp_suning_uos_patched/tools/perf
Lucas De Marchi 7255fe2a42 perf stat: Do not print ratio when task-clock event is not counted
The ratio between the number of events and the time elapsed makes
sense only if task-clock event is counted. Otherwise it will be
simply a (confusing)

	#      0.000 M/sec

This patch outputs the ratio only if task-clock event is counted.
Some test examples of before and after:

Before:

 [lucas@skywalker linux.trees.git]$ sudo perf stat -e branch-misses -a -- sleep 1

	 Performance counter stats for 'sleep 1':

		1367818  branch-misses            #      0.000 M/sec

	    1.001494325  seconds time elapsed

After (without task-clock):

 [lucas@skywalker perf]$ sudo ./perf stat -e branch-misses -a -- sleep 1

	 Performance counter stats for 'sleep 1':

		1135044  branch-misses

	    1.001370775  seconds time elapsed

After (with task-clock):

 [lucas@skywalker perf]$ sudo ./perf stat -e branch-misses -e task-clock -a -- sleep 1

	 Performance counter stats for 'sleep 1':

		1070111  branch-misses            #      0.534 M/sec
	    2002.730893  task-clock-msecs         #      1.999 CPUs

	    1.001640292  seconds time elapsed

Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <20091115140507.GB21561@skywalker.lan>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-11-15 15:25:50 +01:00
..
bench perf bench: Improve sched-message.c with more comfortable output 2009-11-10 19:56:46 +01:00
Documentation Merge branches 'perf/powerpc' and 'perf/bench' into perf/core 2009-11-15 09:51:24 +01:00
util perf tools: Add new perf_atoll() function to parse string representing size in bytes 2009-11-15 14:54:23 +01:00
.gitignore perf tools: .gitignore += perf*.html 2009-09-24 14:01:22 +02:00
builtin-annotate.c perf tools: Simplify the symbol priv area mechanism 2009-11-02 16:52:11 +01:00
builtin-bench.c perf bench: Improve builtin-bench.c for more friendly output 2009-11-10 19:56:44 +01:00
builtin-help.c perf: Clean up trivial style issues in builtin-help.c 2009-11-03 18:37:29 +01:00
builtin-list.c perf list: Fix large list output by using the pager 2009-08-13 09:05:48 +02:00
builtin-record.c Merge commit 'v2.6.32-rc7' into perf/core 2009-11-15 09:50:41 +01:00
builtin-report.c perf tools: Simplify the symbol priv area mechanism 2009-11-02 16:52:11 +01:00
builtin-sched.c perf tools: Simplify the symbol priv area mechanism 2009-11-02 16:52:11 +01:00
builtin-stat.c perf stat: Do not print ratio when task-clock event is not counted 2009-11-15 15:25:50 +01:00
builtin-timechart.c perf tools: Simplify the symbol priv area mechanism 2009-11-02 16:52:11 +01:00
builtin-top.c Merge commit 'v2.6.32-rc7' into perf/core 2009-11-15 09:50:41 +01:00
builtin-trace.c perf tools: Simplify the symbol priv area mechanism 2009-11-02 16:52:11 +01:00
builtin.h perf bench: Modify builtin.h for new prototype 2009-11-08 10:19:19 +01:00
command-list.txt perf bench: Modify command-list.txt for the entry of perf-bench 2009-11-10 14:14:36 +01:00
CREDITS perf_counter tools: Add CREDITS file for Git contributors 2009-06-24 19:54:29 +02:00
design.txt perf_event: Add alignment-faults and emulation-faults software events 2009-10-28 16:13:03 +11:00
Makefile Merge branches 'perf/powerpc' and 'perf/bench' into perf/core 2009-11-15 09:51:24 +01:00
perf.c Merge branches 'perf/powerpc' and 'perf/bench' into perf/core 2009-11-15 09:51:24 +01:00
perf.h perf tools, Alpha: Add Alpha support to perf.h 2009-10-26 09:45:41 +01:00