s390/perf: fix null string in perf list pmu command
authorThomas Richter <tmricht@linux.vnet.ibm.com>
Tue, 23 May 2017 08:49:35 +0000 (10:49 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 12 Jun 2017 14:26:00 +0000 (16:26 +0200)
commitc39457ff1fd58bf5cc466025b1467de29ba0437a
tree5fac2ea1a0f2edb6fdad07fb0ec6f7087a1ce2ee
parentcc18b460dc72fc9020edcd617b3c4b23a577ee19
s390/perf: fix null string in perf list pmu command

Command 'perf list pmu' displays events which contain
an invalid string "(null)=xxx", where xxx is the pmu event
name, for example:
   cpum_cf/AES_BLOCKED_CYCLES,(null)=AES_BLOCKED_CYCLES/
This is not correct, the invalid string should not be
displayed at all.

It is caused by an obsolete term in the
sysfs attribute file for each s390 CPUMF counter event.
Reading from the sysfs file also displays the event
name.

Fix this by omitting the event name.  This patch makes
s390 CPUMF sysfs files consistent with other plattforms.

This is an interface change between user and kernel
but does not break anything. Reading from a counter event
sysfs file should only list terms mentioned in the
/sys/bus/event_source/devices/<cpumf>/format directory.
Name is not listed.

Reported-by: Zvonko Kosic <zvonko.kosic@de.ibm.com>
Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/perf_event.c