• Anton Blanchard's avatar
    powerpc/perf: Always use pt_regs for userspace samples · 5c093efa
    Anton Blanchard authored
    At the moment we always use the SIAR if the PMU supports continuous
    sampling. Unfortunately the SIAR and the PMU exception are not
    synchronised for non marked events so we can end up with callchains
    that dont make sense.
    
    The following patch checks the HV and PR bits for samples coming from
    userspace and always uses pt_regs for them. Userspace will never have
    interrupts off so there is no real advantage to using the SIAR for
    non marked events in userspace.
    
    I had experimented with a patch that did a similar thing for kernel
    samples but we lost a significant amount of information. I was
    unable to profile any of our early exception code for example.
    Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    5c093efa
core-book3s.c 36.5 KB