]> git.baikalelectronics.ru Git - kernel.git/commitdiff
perf c2c: Output statistics for peer snooping
authorLeo Yan <leo.yan@linaro.org>
Thu, 11 Aug 2022 06:24:41 +0000 (14:24 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 11 Aug 2022 22:12:16 +0000 (19:12 -0300)
This patch outputs statistics for peer snooping for whole trace events
and global shared cache line.

Reviewed-by: Ali Saidi <alisaidi@amazon.com>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Tested-by: Ali Saidi <alisaidi@amazon.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: German Gomez <german.gomez@arm.com>
Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.garry@huawei.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Like Xu <likexu@tencent.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Timothy Hayes <timothy.hayes@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20220811062451.435810-6-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-c2c.c

index 4898ee57d15627b932252680b7219896b2e1f6e2..37bebeb6c11b9eb329f86abb1cdf6431ee168247 100644 (file)
@@ -2202,6 +2202,8 @@ static void print_c2c__display_stats(FILE *out)
        fprintf(out, "  Load LLC Misses                   : %10d\n", llc_misses);
        fprintf(out, "  Load access blocked by data       : %10d\n", stats->blk_data);
        fprintf(out, "  Load access blocked by address    : %10d\n", stats->blk_addr);
+       fprintf(out, "  Load HIT Local Peer               : %10d\n", stats->lcl_peer);
+       fprintf(out, "  Load HIT Remote Peer              : %10d\n", stats->rmt_peer);
        fprintf(out, "  LLC Misses to Local DRAM          : %10.1f%%\n", ((double)stats->lcl_dram/(double)llc_misses) * 100.);
        fprintf(out, "  LLC Misses to Remote DRAM         : %10.1f%%\n", ((double)stats->rmt_dram/(double)llc_misses) * 100.);
        fprintf(out, "  LLC Misses to Remote cache (HIT)  : %10.1f%%\n", ((double)stats->rmt_hit /(double)llc_misses) * 100.);
@@ -2230,6 +2232,7 @@ static void print_shared_cacheline_info(FILE *out)
        fprintf(out, "  L1D hits on shared lines          : %10d\n", stats->ld_l1hit);
        fprintf(out, "  L2D hits on shared lines          : %10d\n", stats->ld_l2hit);
        fprintf(out, "  LLC hits on shared lines          : %10d\n", stats->ld_llchit + stats->lcl_hitm);
+       fprintf(out, "  Load hits on peer cache or nodes  : %10d\n", stats->lcl_peer + stats->rmt_peer);
        fprintf(out, "  Locked Access on shared lines     : %10d\n", stats->locks);
        fprintf(out, "  Blocked Access on shared lines    : %10d\n", stats->blk_data + stats->blk_addr);
        fprintf(out, "  Store HITs on shared lines        : %10d\n", stats->store);