perf test bpf: Hook on epoll_pwait()
The 'perf test bpf' was hooking a eBPF program on the SyS_epoll_wait() kernel function, that was what the epoll_wait() glibc function ended up calling, but since at least glibc 2.26, the one that comes with, for instance, Fedora 27, glibc ends up calling SyS_epoll_pwait() when epoll_wait() is used, causing this 'perf test' entry to fail. So switch to using epoll_pwait() and hook the eBPF program to the SyS_epoll_pwait() kernel function to make it work on a wider range of glibc and kernel versions. Tested-by: Wang Nan <wangnan0@huawei.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: https://lkml.kernel.org/n/tip-zynvquy63er8s5mrgsz65pto@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
13cb2d0f51
commit
e0337f4f9a
2 changed files with 6 additions and 6 deletions
|
|
@ -31,8 +31,8 @@ struct bpf_map_def SEC("maps") flip_table = {
|
|||
.max_entries = 1,
|
||||
};
|
||||
|
||||
SEC("func=SyS_epoll_wait")
|
||||
int bpf_func__SyS_epoll_wait(void *ctx)
|
||||
SEC("func=SyS_epoll_pwait")
|
||||
int bpf_func__SyS_epoll_pwait(void *ctx)
|
||||
{
|
||||
int ind =0;
|
||||
int *flag = bpf_map_lookup_elem(&flip_table, &ind);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue