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

From: Mark Brown
Date: Mon Sep 12 2022 - 06:12:30 EST


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: signature.asc
Description: PGP signature