diff options
| author | Kyle Huey <[email protected]> | 2024-04-12 01:50:16 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2024-04-12 09:49:49 +0000 |
| commit | f11f10bfa1ca23b32020b2073aa13131a27978fe (patch) | |
| tree | 1657fdb40278f77e27436ee5a56855a9983873c9 /tools/testing/selftests/bpf/prog_tests/perf_skip.c | |
| parent | perf/bpf: Remove #ifdef CONFIG_BPF_SYSCALL from struct perf_event members (diff) | |
| download | kernel-f11f10bfa1ca23b32020b2073aa13131a27978fe.tar.gz kernel-f11f10bfa1ca23b32020b2073aa13131a27978fe.zip | |
perf/bpf: Call BPF handler directly, not through overflow machinery
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.
Suggested-by: Namhyung Kim <[email protected]>
Signed-off-by: Kyle Huey <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Acked-by: Song Liu <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Acked-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/perf_skip.c')
0 files changed, 0 insertions, 0 deletions
