Commit 0bf40542 authored by Andrii Nakryiko's avatar Andrii Nakryiko Committed by Alexei Starovoitov

perf: Mute libbpf API deprecations temporarily

Libbpf development version was bumped to 0.7 in c93faaaf
("libbpf: Deprecate bpf_prog_load_xattr() API"), activating a bunch of
previously scheduled deprecations. Most APIs are pretty straightforward
to replace with newer APIs, but perf has a complicated mixed setup with
libbpf used both as static and shared configurations, which makes it
non-trivial to migrate the APIs.

Further, bpf_program__set_prep() needs more involved refactoring, which
will require help from Arnaldo and/or Jiri.

So for now, mute deprecation warnings and work on migrating perf off of
deprecated APIs separately with the input from owners of the perf tool.

Fixes: c93faaaf ("libbpf: Deprecate bpf_prog_load_xattr() API")
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20211203004640.2455717-1-andrii@kernel.org
parent 080a70b2
...@@ -312,9 +312,13 @@ static int check_env(void) ...@@ -312,9 +312,13 @@ static int check_env(void)
return err; return err;
} }
/* temporarily disable libbpf deprecation warnings */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
err = bpf_load_program(BPF_PROG_TYPE_KPROBE, insns, err = bpf_load_program(BPF_PROG_TYPE_KPROBE, insns,
sizeof(insns) / sizeof(insns[0]), sizeof(insns) / sizeof(insns[0]),
license, kver_int, NULL, 0); license, kver_int, NULL, 0);
#pragma GCC diagnostic pop
if (err < 0) { if (err < 0) {
pr_err("Missing basic BPF support, skip this test: %s\n", pr_err("Missing basic BPF support, skip this test: %s\n",
strerror(errno)); strerror(errno));
......
...@@ -29,6 +29,9 @@ ...@@ -29,6 +29,9 @@
#include <internal/xyarray.h> #include <internal/xyarray.h>
/* temporarily disable libbpf deprecation warnings */
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
static int libbpf_perf_print(enum libbpf_print_level level __attribute__((unused)), static int libbpf_perf_print(enum libbpf_print_level level __attribute__((unused)),
const char *fmt, va_list args) const char *fmt, va_list args)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment