Re: [PATCH v6 0/3] arm64: Add BRBE support for bpf_get_branch_snapshot()
From: Leo Yan
Date: Fri Nov 27 2026 - 06:24:37 EST
On Fri, Nov 27, 2026 at 11:11:28AM +0000, Leo Yan wrote:
[...]
> > If any sampling BRBE event gets scheduled then the snapshots just start
> > skipping and returning empty.
>
> BPF program can be attached to interrupt handlers (even it can be
> attached to PMU interrupt handler). As you suggested, we can use per-CPU
> flag to return an empty snapshot for the nested call.
I should have distinguished the two cases in my previous reply.
BRBE driver could return an empty snapshot if a sampling event is active
on the CPU. In free-running mode, a nested call could do the same while
another snapshot is in progress on that CPU.