Re: [PATCH] perf/arm-cci: Slightly optimize cci_pmu_sync_counters()

From: Will Deacon
Date: Mon Jun 05 2023 - 12:35:26 EST


On Thu, 20 Apr 2023 22:27:24 +0200, Christophe JAILLET wrote:
> When the 'mask' bitmap is cleared, it is better to use its full maximum
> size instead of only the needed size.
> This lets the compiler optimize it because the size is now known at compile
> time. HW_CNTRS_MAX is small (i.e. currently 9), so a call to memset() is
> saved.
>
> Also, as 'mask' is local to the function, the non-atomic __set_bit() can
> also safely be used here.
>
> [...]

Applied to will (for-next/perf), thanks!

[1/1] perf/arm-cci: Slightly optimize cci_pmu_sync_counters()
https://git.kernel.org/will/c/f818947a0618

Cheers,
--
Will

https://fixes.arm64.dev
https://next.arm64.dev
https://will.arm64.dev