[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f8f5b7bc-0219-4891-9ffd-f54102b90b45@linaro.org>
Date: Wed, 19 Feb 2025 16:09:28 +0000
From: James Clark <james.clark@...aro.org>
To: "Rob Herring (Arm)" <robh@...nel.org>
Cc: linux-arm-kernel@...ts.infradead.org, linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
kvmarm@...ts.linux.dev, Mark Brown <broonie@...nel.org>,
Will Deacon <will@...nel.org>, Mark Rutland <mark.rutland@....com>,
Catalin Marinas <catalin.marinas@....com>, Jonathan Corbet <corbet@....net>,
Marc Zyngier <maz@...nel.org>, Oliver Upton <oliver.upton@...ux.dev>,
Joey Gouly <joey.gouly@....com>, Suzuki K Poulose <suzuki.poulose@....com>,
Zenghui Yu <yuzenghui@...wei.com>,
Anshuman Khandual <anshuman.khandual@....com>, Leo Yan <leo.yan@....com>
Subject: Re: [PATCH v20 00/11] arm64/perf: Enable branch stack sampling
On 18/02/2025 8:39 pm, Rob Herring (Arm) wrote:
> This series enables perf branch stack sampling support on arm64 via a
> v9.2 arch feature called Branch Record Buffer Extension (BRBE). Details
> on BRBE can be found in the Arm ARM[1] chapter D18.
>
> I've picked up this series from Anshuman. v19 and v20 versions have been
> reworked quite a bit by Mark and myself. The bulk of those changes are
> in patch 11.
>
> Patches 1-7 are new clean-ups/prep which stand on their own. They
> were previously posted here[2]. Please pick them up if there's no issues
> with them.
>
> Patches 8-11 add BRBE support with the actual support in patch 11.
>
> A git branch is here[3].
>
> [1] https://developer.arm.com/documentation/ddi0487/latest/
> [2] https://lore.kernel.org/all/20250107-arm-pmu-cleanups-v1-v1-0-313951346a25@kernel.org/
> [3] git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git arm/brbe-v20
>
> v20:
> - Added back some of the arm64 specific exception types. The x86 IRQ
> branches also include other exceptions like page faults. On arm64, we
> can distinguish the exception types, so we do. Also, to better
> align with x86, we convert 'call' branches which are user to kernel
> to 'syscall'.
> - Only enable exceptions and exception returns if recording kernel
> branches (matching x86)
> - Drop requiring event and branch privileges to match
> - Add "branches" caps sysfs attribute like x86
> - Reword comment about FZP and MDCR_EL2.HPMN interaction
> - Rework BRBE invalidation to avoid invalidating in interrupt handler
> when no handled events capture the branch stack (i.e. when there are
> multiple users).
> - Also clear BRBCR_ELx bits in brbe_disable(). This is for KVM nVHE
> checks if BRBE is enabled.
> - Document that MDCR_EL3.SBRBE can be 0b01 also
>
Tested-by: James Clark <james.clark@...aro.org>
Powered by blists - more mailing lists