OSDN Git Service

perf list: Remove s390 specific strcmp_cpuid_cmp function
authorThomas Richter <tmricht@linux.ibm.com>
Mon, 23 Apr 2018 08:17:45 +0000 (10:17 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 23 Apr 2018 14:03:13 +0000 (11:03 -0300)
commitce04abfbd3ea545a8eb38a8b6a48fb6e7d139dcb
tree5802181fd111330337553d7deb4ccac064981441
parentee05d21791db6db954bbb7b79bb18d88b5f6b7ff
perf list: Remove s390 specific strcmp_cpuid_cmp function

Make the type field in pmu-events/arch/s390/mapfile.cvs more generic to
match the created cpuid string for s390.

The pattern also checks for the counter first version number and counter
second version number ([13]\.[1-5]) and the authorization field which
follows.

These numbers do not exist in the cpuid identification string when perf
commands are executed on a z/VM environment (which does not support CPU
counter measurement facility).

CPUID string for LPAR:
   cpuid : IBM,3906,704,M03,3.5,002f
CPUID string for z/VM:
   cpuid : IBM,2964,702,N96

This allows the removal of s390 specific cpuid compare code and uses the
common compare function with its regular expression matching algorithm.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Link: http://lkml.kernel.org/r/20180423081745.3672-1-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/s390/util/header.c
tools/perf/pmu-events/arch/s390/mapfile.csv
tools/perf/util/pmu.c