perf stat: Add noise output for csv mode
authorZhengyu He <zhengyuh@google.com>
Thu, 23 Jun 2011 20:45:42 +0000 (13:45 -0700)
committerIngo Molnar <mingo@elte.hu>
Fri, 1 Jul 2011 10:52:40 +0000 (12:52 +0200)
commit3ae9a34d747f9abf2bcc85dc0e77b951513ccdf2
tree592baba4f60e156f9b0d596ade75e282ea21f1ab
parent343a031f3c4a7a663192cf56368bb5a6c56870c0
perf stat: Add noise output for csv mode

Previously, when you want perf-stat to output the statistics in
csv mode, no information of the noise will be printed out.

For example right now we output this --repeat information:

 ./perf stat -r3 -x, sleep 1
 1.164789,task-clock
 8,context-switches
 0,CPU-migrations
 219,page-faults
 3337800,cycles

With this patch, the output will be appended with an additional
entry for the noise value:

 ./perf stat -r3 -x, sleep 1
 1.164789,task-clock,3.75%
 8,context-switches,75.00%
 0,CPU-migrations,100.00%
 219,page-faults,0.00%
 3337800,cycles,3.36%

Signed-off-by: Zhengyu He <zhengyuh@google.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Stephane Eranian <eranian@google.com>
Cc: Venkatesh Pallipadi <venki@google.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1308861942-4945-1-git-send-email-zhengyuh@google.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/builtin-stat.c