Commit graph

7 commits

Author SHA1 Message Date
Hendrik Brueckner 151a0eb6c8 s390/perf: cpum_cf: fallback to software sampling events
The CPU-measurement counter facility does not support sampling events
and returns -EINVAL in that case.  This return code lets the perf tool
fail.  To fall back to software sampling events, return -ENOENT instead.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-02-14 15:55:15 +01:00
Heiko Carstens 420f42ecf4 s390/irq: remove split irq fields from /proc/stat
Now that irq sum accounting for /proc/stat's "intr" line works again we
have the oddity that the sum field (first field) contains only the sum
of the second (external irqs) and third field (I/O interrupts).
The reason for that is that these two fields are already sums of all other
fields. So if we would sum up everything we would count every interrupt
twice.
This is broken since the split interrupt accounting was merged two years
ago: 052ff461c8 "[S390] irq: have detailed
statistics for interrupt types".
To fix this remove the split interrupt fields from /proc/stat's "intr"
line again and only have them in /proc/interrupts.

This restores the old behaviour, seems to be the only sane fix and mimics
a behaviour from other architectures where /proc/interrupts also contains
more than /proc/stat's "intr" line does.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2013-01-08 10:57:07 +01:00
Hendrik Brueckner f47586b24c perf_cpum_cf: Add support for counters available with IBM zEC12
Increase the maximum number of available counters and check if
the hardware supports the counter.  Support is indicated by the
version of the CPU-measurement counter facility.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-10-18 17:50:09 +02:00
Hendrik Brueckner 02456169e0 s390/irq: split irq stats for cpu-measurement alert facilities
CPU-measurement alerts are generated for different CPU-measurement
facilities, for example, the sampling and counter facilities.
Split the irq stats according to available facilities.

Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-05-23 17:06:52 +02:00
Heiko Carstens af0ee94e54 [S390] cpum_cf: get rid of compile warnings
Fix these:

arch/s390/kernel/perf_cpum_cf.c:180:3: warning: format '%lx'
   expects argument of type 'long unsigned int',
   but argument 2 has type 'int' [-Wformat]
arch/s390/kernel/perf_cpum_cf.c: In function 'cpumf_pmu_disable':
arch/s390/kernel/perf_cpum_cf.c:205:3: warning: format '%lx'
   expects argument of type 'long unsigned int',
   but argument 2 has type 'int' [-Wformat]

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-04-11 14:28:25 +02:00
Heiko Carstens 1e3cab2f2f [S390] Fix build errors (fallout from system.h disintegration)
Signed-off-by: Heiko Carstens <h.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-30 09:41:12 +02:00
Hendrik Brueckner 212188a596 [S390] perf: add support for s390x CPU counters
Add a perf PMU to access the CPU-measurement counter facility CPUM CF.
CPUM CF provides multiple counter sets for measuring generic,
problem-state, and crypto activaties.  Also an extended counter set for
the IBM System z10 and IBM z196 mainframes is available.

Counters from the basic and problem-state counter set are mapped to
generic perf hardware events.  Other counters are accessible through
raw events.

For a list of available counter sets and counters, see:

  - The Load-Program-Parameter and the CPU-Measurement Facilities (SA23-2260)
  - The CPU-Measurement Facility Extended Counters Definition for
    z10 and z196 (SA23-2261)

Reviewed-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2012-03-23 11:13:25 +01:00