mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
Simplify bpf_perf_event_read_simple() a bit and fix up some minor things along the way: the return code in the header is not of type int but enum bpf_perf_event_ret instead. Once callback indicated to break the loop walking event data, it also needs to be consumed in data_tail since it has been processed already. Moreover, bpf_perf_event_print_t callback should avoid void * as we actually get a pointer to struct perf_event_header and thus applications can make use of container_of() to have type checks. The walk also doesn't have to use modulo op since the ring size is required to be power of two. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Alexei Starovoitov <ast@kernel.org> |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| bpf.c | ||
| bpf.h | ||
| btf.c | ||
| btf.h | ||
| Build | ||
| libbpf_errno.c | ||
| libbpf.c | ||
| libbpf.h | ||
| Makefile | ||
| netlink.c | ||
| nlattr.c | ||
| nlattr.h | ||
| str_error.c | ||
| str_error.h | ||