[PATCH 05/12] perf arm_spe: Decode event types for new features
James Clark
james.clark at linaro.org
Thu Jun 19 07:20:44 PDT 2025
On 13/06/2025 4:53 pm, Leo Yan wrote:
> Decode new event types introduced by FEAT_SPEv1p4, FEAT_SPE_SME and
> FEAT_SPE_SME.
>
> The printed event names don't strictly follow the naming in the Arm ARM.
> For example, the "Cache data modified" event is shown as "HITM", and the
> "Data snooped" event is printed as "SNOOPED". Shorter names are easier
> to read and review while preserving core meanings.
>
Reviewed-by: James Clark <james.clark at linaro.org>
> Signed-off-by: Leo Yan <leo.yan at arm.com>
> ---
> tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c | 14 ++++++++++++++
> tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.h | 7 +++++++
> 2 files changed, 21 insertions(+)
>
> diff --git a/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c b/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c
> index 13cadb2f1ceac7a90e359c4d6aa1d5fc5169e142..80561630253dd5c46f7e99b24fc13b99f346459f 100644
> --- a/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c
> +++ b/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c
> @@ -314,6 +314,20 @@ static int arm_spe_pkt_desc_event(const struct arm_spe_pkt *packet,
> arm_spe_pkt_out_string(&err, &buf, &buf_len, " SVE-PARTIAL-PRED");
> if (payload & BIT(EV_EMPTY_PREDICATE))
> arm_spe_pkt_out_string(&err, &buf, &buf_len, " SVE-EMPTY-PRED");
> + if (payload & BIT(EV_L2D_ACCESS))
> + arm_spe_pkt_out_string(&err, &buf, &buf_len, " L2D-ACCESS");
> + if (payload & BIT(EV_L2D_MISS))
> + arm_spe_pkt_out_string(&err, &buf, &buf_len, " L2D-MISS");
> + if (payload & BIT(EV_CACHE_DATA_MODIFIED))
> + arm_spe_pkt_out_string(&err, &buf, &buf_len, " HITM");
> + if (payload & BIT(EV_RECENTLY_FETCHED))
> + arm_spe_pkt_out_string(&err, &buf, &buf_len, " LFB");
> + if (payload & BIT(EV_DATA_SNOOPED))
> + arm_spe_pkt_out_string(&err, &buf, &buf_len, " SNOOPED");
> + if (payload & BIT(EV_STREAMING_SVE_MODE))
> + arm_spe_pkt_out_string(&err, &buf, &buf_len, " STREAMING-SVE");
> + if (payload & BIT(EV_SMCU))
> + arm_spe_pkt_out_string(&err, &buf, &buf_len, " SMCU");
>
> return err;
> }
> diff --git a/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.h b/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.h
> index 2cdf9f6da2681244291445d54c5b13fe8a2e9d9a..d00c2481712dcc457eab2f5e9848ffc3150e6236 100644
> --- a/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.h
> +++ b/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.h
> @@ -108,6 +108,13 @@ enum arm_spe_events {
> EV_TRANSACTIONAL = 16,
> EV_PARTIAL_PREDICATE = 17,
> EV_EMPTY_PREDICATE = 18,
> + EV_L2D_ACCESS = 19,
> + EV_L2D_MISS = 20,
> + EV_CACHE_DATA_MODIFIED = 21,
> + EV_RECENTLY_FETCHED = 22,
> + EV_DATA_SNOOPED = 23,
> + EV_STREAMING_SVE_MODE = 24,
> + EV_SMCU = 25,
> };
>
> /* Operation packet header */
>
More information about the linux-arm-kernel
mailing list