Andi Kleen
9dec4473ab
perf stat: Check existence of frontend/backed stalled cycles
Only put the frontend/backend stalled cycles into the default perf stat
events when the CPU actually supports them.
This avoids empty columns with --metric-only on newer Intel CPUs.
Committer note:
Before:
$ perf stat ls
Performance counter stats for 'ls':
1.080893 task-clock (msec) # 0.619 CPUs utilized
0 context-switches # 0.000 K/sec
0 cpu-migrations # 0.000 K/sec
97 page-faults # 0.090 M/sec
3,327,741 cycles # 3.079 GHz
<not supported> stalled-cycles-frontend
<not supported> stalled-cycles-backend
1,609,544 instructions # 0.48 insn per cycle
319,117 branches # 295.235 M/sec
12,246 branch-misses # 3.84% of all branches
0.001746508 seconds time elapsed
$
After:
$ perf stat ls
Performance counter stats for 'ls':
0.693948 task-clock (msec) # 0.662 CPUs utilized
0 context-switches # 0.000 K/sec
0 cpu-migrations # 0.000 K/sec
95 page-faults # 0.137 M/sec
1,792,509 cycles # 2.583 GHz
1,599,047 instructions # 0.89 insn per cycle
316,328 branches # 455.838 M/sec
12,453 branch-misses # 3.94% of all branches
0.001048987 seconds time elapsed
$
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1456532881-26621-2-git-send-email-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2016-03-03 11:06:43 -03:00
..
2015-05-08 16:11:05 -03:00
2016-02-05 09:46:45 -03:00
2015-12-14 19:15:05 -08:00
2015-08-16 10:51:26 +01:00
2016-01-12 12:42:07 -03:00
2015-06-08 16:42:07 -06:00
2015-08-26 06:12:35 +02:00
2016-02-29 11:35:21 -03:00
2015-11-15 17:24:33 -05:00
2016-03-03 11:06:43 -03:00
2016-01-21 00:43:29 +01:00
2016-01-11 19:22:20 -03:00
2015-12-08 17:58:56 +00:00
2016-02-25 18:54:53 -08:00
2015-10-10 11:32:31 +08:00
2015-10-22 17:19:33 -07:00
2016-01-26 10:18:30 +02:00
2015-11-20 16:17:32 -08:00
2016-01-14 11:39:09 -08:00