Skip to content

Commit fa9b357

Browse files
Yicong Yangacmel
authored andcommitted
perf mem: Count L2 HITM for c2c statistic
L2 HITM is not counted in c2c statistic decoding. Count it for lcl_hitm like how we handle L2 Peer snoop. Reviewed-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com> Cc: CaiJingtao <caijingtao@huawei.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Ian Rogers <irogers@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@linaro.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: John Garry <john.g.garry@oracle.com> Cc: Jonathan Cameron <jonathan.cameron@huawei.com> Cc: Junhao He <hejunhao3@huawei.com> Cc: Leo Yan <leo.yan@linux.dev> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will@kernel.org> Cc: Yushan Wang <wangyushan12@huawei.com> Cc: Zeng Tao <prime.zeng@hisilicon.com> Cc: xueshan2@huawei.com Link: https://lore.kernel.org/r/20250425033845.57671-4-yangyicong@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 846b62b commit fa9b357

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/perf/util/mem-events.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,10 @@ do { \
677677
if (lvl & P(LVL, LFB)) stats->ld_fbhit++;
678678
if (lvl & P(LVL, L1 )) stats->ld_l1hit++;
679679
if (lvl & P(LVL, L2)) {
680-
stats->ld_l2hit++;
680+
if (snoop & P(SNOOP, HITM))
681+
HITM_INC(lcl_hitm);
682+
else
683+
stats->ld_l2hit++;
681684

682685
if (snoopx & P(SNOOPX, PEER))
683686
PEER_INC(lcl_peer);

0 commit comments

Comments
 (0)