aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/bpf/libbpf.map
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2021-11-10 21:36:20 -0800
committerAlexei Starovoitov <ast@kernel.org>2021-11-11 16:54:05 -0800
commit4178893465774f91dcd49465ae6f4e3cc036b7b2 (patch)
tree1cb9eefd63b0d1161a18958a831d97b848092c4b /tools/lib/bpf/libbpf.map
parentlibbpf: Ensure btf_dump__new() and btf_dump_opts are future-proof (diff)
downloadlinux-dev-4178893465774f91dcd49465ae6f4e3cc036b7b2.tar.xz
linux-dev-4178893465774f91dcd49465ae6f4e3cc036b7b2.zip
libbpf: Make perf_buffer__new() use OPTS-based interface
Add new variants of perf_buffer__new() and perf_buffer__new_raw() that use OPTS-based options for future extensibility ([0]). Given all the currently used API names are best fits, re-use them and use ___libbpf_override() approach and symbol versioning to preserve ABI and source code compatibility. struct perf_buffer_opts and struct perf_buffer_raw_opts are kept as well, but they are restructured such that they are OPTS-based when used with new APIs. For struct perf_buffer_raw_opts we keep few fields intact, so we have to also preserve the memory location of them both when used as OPTS and for legacy API variants. This is achieved with anonymous padding for OPTS "incarnation" of the struct. These pads can be eventually used for new options. [0] Closes: https://github.com/libbpf/libbpf/issues/311 Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20211111053624.190580-6-andrii@kernel.org
Diffstat (limited to 'tools/lib/bpf/libbpf.map')
-rw-r--r--tools/lib/bpf/libbpf.map4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/lib/bpf/libbpf.map b/tools/lib/bpf/libbpf.map
index 07762d6723ef..9e91aa8da303 100644
--- a/tools/lib/bpf/libbpf.map
+++ b/tools/lib/bpf/libbpf.map
@@ -409,4 +409,8 @@ LIBBPF_0.6.0 {
btf__type_cnt;
btf_dump__new;
btf_dump__new_deprecated;
+ perf_buffer__new;
+ perf_buffer__new_deprecated;
+ perf_buffer__new_raw;
+ perf_buffer__new_raw_deprecated;
} LIBBPF_0.5.0;