perf test: Fix test case 23 for s390 z/VM or KVM guests
authorThomas Richter <tmricht@linux.vnet.ibm.com>
Tue, 13 Feb 2018 15:14:19 +0000 (16:14 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 16 Feb 2018 18:16:57 +0000 (15:16 -0300)
commitb3be39c51cc58eb60c698cf64987e9d465a9263a
treec73bbcf06b38f6d1459dbf072cf3b17179ddbf66
parent4cb7d3ecfca90684ad00f893c34a2028fcc5f764
perf test: Fix test case 23 for s390 z/VM or KVM guests

On s390 perf can be executed on a LPAR with support for hardware events
(i. e. cycles) or on a z/VM or KVM guest where no hardware events are
supported. In this environment use software event named cpu-clock for
this test case.

Use the cpuid infrastructure functions to determine the cpuid on s390
which contains an indication of the cpu counter facility availability.

Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Link: http://lkml.kernel.org/r/20180213151419.80737-4-tmricht@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/tests/code-reading.c