• Michael Ellerman's avatar
    powerpc/perf: Add BHRB constraint and IFM MMCRA handling for EBB · ba969237
    Michael Ellerman authored
    We want a way for users of EBB (Event Based Branches) to also access the
    BHRB (Branch History Rolling Buffer). EBB does not interoperate with our
    existing BHRB support, which is wired into the generic Linux branch
    stack sampling support.
    
    To support EBB & BHRB we add three new bits to the event code. The first
    bit indicates that the event wants access to the BHRB, and the other two
    bits indicate the desired IFM (Instruction Filtering Mode).
    
    We allow multiple events to request access to the BHRB, but they must
    agree on the IFM value. Events which are not interested in the BHRB can
    also interoperate with events which do.
    
    Finally we program the desired IFM value into MMCRA. Although we do this
    for every event, we know that the value will be identical for all events
    that request BHRB access.
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    ba969237
power8-pmu.c 23.6 KB