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

Mark Brown
2022-09-14T09:37:42Z

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

On Wed, Sep 14, 2022 at 09:09:10AM +0530, Anshuman Khandual wrote:

> Something like the following change moves the buffer allocation off the stack,
> although it requires updating the driver, and buffer assignment during a PMU
> interrupt. But it does seem to work (will require some more testing).

Yeah, looks like it should do the trick.

> +
> + events->branch_records = kmalloc(sizeof(struct brbe_records), flags);
> + WARN_ON(!events->branch_records);

No need for the WARN_ON(), if we run out of memory the memory
management code is already very loud about it.

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