summaryrefslogtreecommitdiff
path: root/samples/Kconfig
diff options
context:
space:
mode:
authorDaniel T. Lee <danieltimlee@gmail.com>2020-11-24 12:03:06 +0300
committerAndrii Nakryiko <andrii@kernel.org>2020-11-27 06:33:35 +0300
commit4fe6641526dbee115d9d037e94a344f4f448aaa4 (patch)
treeb96f1888c4586c54e1e5c9f17ccce26496d75966 /samples/Kconfig
parentd89af13c92056c46dfc4bcb3d90efe88937c3381 (diff)
downloadlinux-4fe6641526dbee115d9d037e94a344f4f448aaa4.tar.xz
samples: bpf: Refactor task_fd_query program with libbpf
This commit refactors the existing kprobe program with libbpf bpf loader. To attach bpf program, this uses generic bpf_program__attach() approach rather than using bpf_load's load_bpf_file(). To attach bpf to perf_event, instead of using previous ioctl method, this commit uses bpf_program__attach_perf_event since it manages the enable of perf_event and attach of BPF programs to it, which is much more intuitive way to achieve. Also, explicit close(fd) has been removed since event will be closed inside bpf_link__destroy() automatically. Furthermore, to prevent conflict of same named uprobe events, O_TRUNC flag has been used to clear 'uprobe_events' interface. Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20201124090310.24374-4-danieltimlee@gmail.com
Diffstat (limited to 'samples/Kconfig')
0 files changed, 0 insertions, 0 deletions