[PATCH V2 3/7] arm64/perf: Update struct pmu_hw_events for BRBE

Mark Brown broonie at kernel.org
Mon Sep 12 03:12:22 PDT 2022


On Thu, Sep 08, 2022 at 10:40:42AM +0530, Anshuman Khandual wrote:

> +	/* Captured BRBE buffer - copied as is into perf_sample_data */
> +	struct perf_branch_stack	brbe_stack;
> +	struct perf_branch_entry	brbe_entries[BRBE_MAX_ENTRIES];

It looks like perf_branch_entry is intended to be the variably
sized entries array at the end of perf_branch_stack?  That could
probably do with being called out if it's the case.  It feels
like it would be clearer and safer to allocate these dynamically
when BRBE is used if that's possible, I'd expect that should also
deal with the stack frame size issues as well.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220912/88c67d23/attachment.sig>


More information about the linux-arm-kernel mailing list