• Thomas Richter's avatar
    s390/cpum_sf: prohibit callchain data collection · 5aa98879
    Thomas Richter authored
    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: default avatarThomas Richter <tmricht@linux.ibm.com>
    Reviewed-by: default avatarSumanth Korikkar <sumanthk@linux.ibm.com>
    Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
    5aa98879
perf_cpum_sf.c 62.8 KB