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

Mark Brown
2022-09-12T10:12:30Z

[-- Attachment #1: Type: text/plain, Size: 607 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]