Re: [PATCH v3 1/4] perf/bpf: Call bpf handler directly, not through overflow machinery

From: Song Liu
Date: Tue Jan 02 2024 - 17:56:26 EST


On Sun, Dec 10, 2023 at 8:55 PM Kyle Huey <me@xxxxxxxxxxxx> wrote:
>
> To ultimately allow bpf programs attached to perf events to completely
> suppress all of the effects of a perf event overflow (rather than just the
> sample output, as they do today), call bpf_overflow_handler() from
> __perf_event_overflow() directly rather than modifying struct perf_event's
> overflow_handler. Return the bpf program's return value from
> bpf_overflow_handler() so that __perf_event_overflow() knows how to
> proceed. Remove the now unnecessary orig_overflow_handler from struct
> perf_event.
>
> This patch is solely a refactoring and results in no behavior change.
>
> Signed-off-by: Kyle Huey <khuey@xxxxxxxxxxxx>
> Suggested-by: Namhyung Kim <namhyung@xxxxxxxxxx>

Acked-by: Song Liu <song@xxxxxxxxxx>