[PATCH v2 3/3] perf mem: Count L2 HITM for c2c statistic
Leo Yan
leo.yan at arm.com
Wed May 21 03:37:42 PDT 2025
On Fri, Apr 25, 2025 at 11:38:45AM +0800, Yicong Yang wrote:
> From: Yicong Yang <yangyicong at hisilicon.com>
>
> L2 HITM is not counted in c2c statistic decoding. Count it for lcl_hitm
> like how we handle L2 Peer snoop.
>
> Signed-off-by: Yicong Yang <yangyicong at hisilicon.com>
Reviewed-by: Leo Yan <leo.yan at arm.com>
> ---
> tools/perf/util/mem-events.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/mem-events.c b/tools/perf/util/mem-events.c
> index 884d9aebce91..a384a866a562 100644
> --- a/tools/perf/util/mem-events.c
> +++ b/tools/perf/util/mem-events.c
> @@ -680,7 +680,10 @@ do { \
> if (lvl & P(LVL, LFB)) stats->ld_fbhit++;
> if (lvl & P(LVL, L1 )) stats->ld_l1hit++;
> if (lvl & P(LVL, L2)) {
> - stats->ld_l2hit++;
> + if (snoop & P(SNOOP, HITM))
> + HITM_INC(lcl_hitm);
> + else
> + stats->ld_l2hit++;
>
> if (snoopx & P(SNOOPX, PEER))
> PEER_INC(lcl_peer);
>
> --
> 2.24.0
>
More information about the linux-arm-kernel
mailing list