diff options
author | Andrii Nakryiko <andriin@fb.com> | 2019-07-02 01:58:57 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-07-05 22:37:30 +0200 |
commit | 63f2f5ee856ba9db751123bc5519be099a3849a7 (patch) | |
tree | 27a5a6a7e50f876ec260de8ac1c9fa4bd46f11ae /tools/lib/bpf/libbpf.map | |
parent | libbpf: introduce concept of bpf_link (diff) | |
download | linux-63f2f5ee856ba9db751123bc5519be099a3849a7.tar.xz linux-63f2f5ee856ba9db751123bc5519be099a3849a7.zip |
libbpf: add ability to attach/detach BPF program to perf event
bpf_program__attach_perf_event allows to attach BPF program to existing
perf event hook, providing most generic and most low-level way to attach BPF
programs. It returns struct bpf_link, which should be passed to
bpf_link__destroy to detach and free resources, associated with a link.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Reviewed-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/lib/bpf/libbpf.map')
-rw-r--r-- | tools/lib/bpf/libbpf.map | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map index 3cde850fc8da..756f5aa802e9 100644 --- a/tools/lib/bpf/libbpf.map +++ b/tools/lib/bpf/libbpf.map @@ -169,6 +169,7 @@ LIBBPF_0.0.4 { global: bpf_link__destroy; bpf_object__load_xattr; + bpf_program__attach_perf_event; btf_dump__dump_type; btf_dump__free; btf_dump__new; |