[PATCH v2 3/3] perf mem: Count L2 HITM for c2c statistic
Yicong Yang
yangyicong at huawei.com
Thu Apr 24 20:38:45 PDT 2025
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>
---
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