Namhyung Kim
a1f3d56761
perf stat: Use cpu-clock event for cpu targets
Currently 'perf stat' always counts task-clock event by default. But
it's somewhat confusing for system-wide targets (especially with 'sleep
N' as the 'sleep' task just sleeps and doesn't use cputime). Changing
to cpu-clock event instead for that case makes more sense IMHO.
Before:
# perf stat -a sleep 0.1
Performance counter stats for 'system wide':
403.038603 task-clock (msec) # 4.001 CPUs utilized
150 context-switches # 0.372 K/sec
7 cpu-migrations # 0.017 K/sec
71 page-faults # 0.176 K/sec
23,705,169 cycles # 0.059 GHz
15,888,166 instructions # 0.67 insn per cycle
3,326,078 branches # 8.253 M/sec
87,643 branch-misses # 2.64% of all branches
0.100737009 seconds time elapsed
#
After:
# perf stat -a sleep 0.1
Performance counter stats for 'system wide':
404.271182 cpu-clock (msec) # 4.000 CPUs utilized
143 context-switches # 0.354 K/sec
13 cpu-migrations # 0.032 K/sec
73 page-faults # 0.181 K/sec
22,119,220 cycles # 0.055 GHz
13,622,065 instructions # 0.62 insn per cycle
2,918,769 branches # 7.220 M/sec
85,033 branch-misses # 2.91% of all branches
0.101073089 seconds time elapsed
#
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1463119263-5569-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-05-16 23:11:47 -03:00
..
2015-05-08 16:11:05 -03:00
2016-05-11 12:24:58 -03:00
2016-02-25 21:07:23 +01:00
2016-02-07 21:34:12 -08:00
2015-08-16 10:51:26 +01:00
2016-03-24 10:02:14 -07:00
2015-06-08 16:42:07 -06:00
2015-08-26 06:12:35 +02:00
2016-04-26 13:15:00 -03:00
2016-05-08 23:32:59 -04:00
2016-04-16 11:14:17 +02:00
2016-05-16 23:11:47 -03:00
2016-04-08 21:46:56 +02:00
2016-03-18 13:57:20 -03:00
2015-12-08 17:58:56 +00:00
2016-04-14 21:14:04 -04:00
2015-10-10 11:32:31 +08:00
2014-07-23 10:16:38 -07:00
2015-10-22 17:19:33 -07:00
2016-03-02 17:01:57 +02:00
2016-03-17 15:09:34 -07:00
2016-04-25 17:59:36 -03:00