From: hw.claudio@gmail.com
To: Will Deacon <will.deacon@arm.com>
Cc: Claudio Fontana <claudio.fontana@huawei.com>,
Ammar Saeed <ammar.saeed@huawei.com>,
Mark Rutland <mark.rutland@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Marc Zyngier <marc.zyngier@arm.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [RFC] arm64: perf: associate LL with L2 cache accesses and refills
Date: Wed, 4 Nov 2015 12:24:13 +0100 [thread overview]
Message-ID: <1446636253-7519-1-git-send-email-hw.claudio@gmail.com> (raw)
From: Claudio Fontana <claudio.fontana@huawei.com>
Signed-off-by: Claudio Fontana <claudio.fontana@huawei.com>
Cc: Ammar Saeed <ammar.saeed@huawei.com>
---
Hello,
as part of some experiments with the Juno ARM64 board, we needed to get
readings from the PMU regarding L2 Cache hits and misses, but we noticed
that the L2 Cache Access and Refill performance counters were not hooked
up in the perf API. We just did that, and that seems to produce correct
results on the Juno.
However I guess that these registers are not hooked up by default due to
differences between different boards...how could this be done taking
account of the different possible implementations?
I send this as an initial RFC to try to kickoff discussion about this.
Thank you,
Claudio Fontana
arch/arm64/kernel/perf_event.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/arm64/kernel/perf_event.c b/arch/arm64/kernel/perf_event.c
index f9a74d4..f72f2ff 100644
--- a/arch/arm64/kernel/perf_event.c
+++ b/arch/arm64/kernel/perf_event.c
@@ -728,6 +728,11 @@ static const unsigned armv8_pmuv3_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]
[C(L1D)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_PMUV3_PERFCTR_L1_DCACHE_ACCESS,
[C(L1D)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV8_PMUV3_PERFCTR_L1_DCACHE_REFILL,
+ [C(LL)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV8_PMUV3_PERFCTR_L2_CACHE_ACCESS,
+ [C(LL)][C(OP_READ)][C(RESULT_MISS)] = ARMV8_PMUV3_PERFCTR_L2_CACHE_REFILL,
+ [C(LL)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_PMUV3_PERFCTR_L2_CACHE_ACCESS,
+ [C(LL)][C(OP_WRITE)][C(RESULT_MISS)] = ARMV8_PMUV3_PERFCTR_L2_CACHE_REFILL,
+
[C(BPU)][C(OP_READ)][C(RESULT_ACCESS)] = ARMV8_PMUV3_PERFCTR_PC_BRANCH_PRED,
[C(BPU)][C(OP_READ)][C(RESULT_MISS)] = ARMV8_PMUV3_PERFCTR_PC_BRANCH_MIS_PRED,
[C(BPU)][C(OP_WRITE)][C(RESULT_ACCESS)] = ARMV8_PMUV3_PERFCTR_PC_BRANCH_PRED,
--
1.8.5.3
next reply other threads:[~2015-11-04 11:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 11:24 hw.claudio [this message]
2015-11-04 11:39 ` [RFC] arm64: perf: associate LL with L2 cache accesses and refills Mark Rutland
2015-11-04 12:50 ` Claudio Fontana
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446636253-7519-1-git-send-email-hw.claudio@gmail.com \
--to=hw.claudio@gmail.com \
--cc=ammar.saeed@huawei.com \
--cc=catalin.marinas@arm.com \
--cc=claudio.fontana@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=mark.rutland@arm.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox