[PATCH v2 08/11] perf arm-spe: Fill branch operations and events to record
Leo Yan
leo.yan at arm.com
Mon Feb 17 12:04:09 PST 2025
On Mon, Feb 17, 2025 at 04:20:57PM +0000, James Clark wrote:
[...]
> > diff --git a/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c b/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
> > index ba807071d3c1..52bd0a4ea96d 100644
> > --- a/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
> > +++ b/tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
> > @@ -207,6 +207,18 @@ static int arm_spe_read_record(struct arm_spe_decoder *decoder)
> > break;
> > case SPE_OP_PKT_HDR_CLASS_BR_ERET:
> > decoder->record.op |= ARM_SPE_OP_BRANCH_ERET;
> > + if (payload & SPE_OP_PKT_COND)
> > + decoder->record.op |= ARM_SPE_OP_BR_COND;
>
> I think this results in memory events being synthesised for these
> samples because of a bug in arm_spe__synth_data_source().
> ARM_SPE_OP_BR_COND overlaps with bits from other packet types like
> ARM_SPE_OP_LD:
>
> if (record->op & ARM_SPE_OP_LD)
> data_src.mem_op = PERF_MEM_OP_LOAD;
>
> arm_spe__synth_data_source() needs to only interpret that as a data
> source packet if ARM_SPE_OP_LDST is set. This was reported by Mike
> Williams but you have the privilege of hitting it for real first.
Good catching. I have added a new patch 06 to fix the bug in the
v3 series. Thanks for hooking up the info.
Leo
More information about the linux-arm-kernel
mailing list