]> git.baikalelectronics.ru Git - kernel.git/commit
s390/cpum_sf: prohibit callchain data collection
authorThomas Richter <tmricht@linux.ibm.com>
Fri, 26 Jun 2020 09:24:34 +0000 (11:24 +0200)
committerHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 1 Jul 2020 18:02:33 +0000 (20:02 +0200)
commitdbd7d94b0c358c5a9adc6fad0e712d7727904201
tree2388917e8c829b167709e16315638b927ce4b673
parenta3643739f277d16f978716e64b32c9a825083483
s390/cpum_sf: prohibit callchain data collection

CPU Measurement sampling facility on s390 does not support
perf tool collection of callchain data using --call-graph
option. The sampling facility collects samples in a ring
buffer which includes only the instruction address the
samples were taken. When the ring buffer hits a watermark,
a measurement alert interrupt is triggered and handled
by the performance measurement unit (PMU) device driver.
It collects the samples and feeds each sample to the
perf ring buffer in the common code via functions
perf_prepare_sample()/perf_output_sample(). When function
perf_prepare_sample() is called to collect sample data's
callchain, user register values or stack area, invalid
data is picked, because the context of the collected
information does not match the context when the sample
was taken.

There is currently no way to provide the callchain and other
information, because the hardware sampler does not collect this
information.

Therefore prohibit sampling when the user requests a callchain graph
from the hardware sampler. Return -EOPNOTSUPP to the user in this
case.
If call chains are really wanted, users need to specify software
event cpu-clock to get the callchain information from a
software event.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
arch/s390/kernel/perf_cpum_sf.c