On Tuesday 17 January 2017 11:16 AM, Michael Ellerman wrote:
Madhavan Srinivasan <ma...@linux.vnet.ibm.com> writes:

"use_siar" variable is primarily used for deciding the sampled address
and the privilege level to be reported for a sample. perf_read_regs()
function updates the "use_siar" and "regs->result" based on the pmu
flags along with other checks. To force the use of MSR to report the
privilege level and to use "regs->nip" to report the instruction pointer,
set "PPMU_NO_CONT_SAMPLING" flag and remove "PPMU_HAS_SIER" from the
ppmu->flags.
This still won't work for marked events AFAICS:

nice catch. My bad. Did not try with the marked events when testing this
patch.


        if (TRAP(regs) != 0xf00)
                use_siar = 0;
        else if (marked)
                use_siar = 1;
        else if ((ppmu->flags & PPMU_NO_CONT_SAMPLING))
                use_siar = 0;
        else if (!(ppmu->flags & PPMU_NO_SIPR) && regs_sipr(regs))
                use_siar = 0;
        else
                use_siar = 1;

So perhaps we just want a USE_SIAR flag?
OK, Will add a new flag. How about "PPMU_DISBALE_USE_SIAR"?

And I don't see how HAS_SIER is related? Or is SIER broken too?

We dont see proper values in SIER for some samples and we use
SIER (regs_sipr) to update the misc_flag.

Will fix the commit message.

Maddy

cheers


Reply via email to