From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <olsajiri@gmail.com>
Cc: Ian Rogers <irogers@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Namhyung Kim <namhyung@kernel.org>,
Andres Freund <andres@anarazel.de>,
Quentin Monnet <quentin@isovalent.com>,
Roberto Sassu <roberto.sassu@huawei.com>,
Christy Lee <christylee@fb.com>,
Andrii Nakryiko <andrii@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
bpf@vger.kernel.org, Michael Petlan <mpetlan@redhat.com>
Subject: Re: [PATCH v1 0/3] Assume libbpf 1.0 in build
Date: Tue, 10 Jan 2023 10:36:31 -0300 [thread overview]
Message-ID: <Y71p30zGtzUtrvt2@kernel.org> (raw)
In-Reply-To: <Y71bcMYQ26eroc2W@krava>
Em Tue, Jan 10, 2023 at 01:34:56PM +0100, Jiri Olsa escreveu:
> On Mon, Jan 09, 2023 at 12:34:21PM -0800, Ian Rogers wrote:
> > libbpf 1.0 was a major change in API. Perf has partially supported
> > older libbpf's but an implementation may be:
> > ..
> > pr_err("%s: not support, update libbpf\n", __func__);
> > return -ENOTSUP;
> > ..
> >
> > Rather than build a binary that would fail at runtime it is
> > preferrential just to build libbpf statically and link against
> > that. The static version is in the kernel tools tree and newer than
> > 1.0.
> >
> > These patches change the libbpf test to only pass when at least
> > version 1.0 is installed, then remove the conditional build and
> > feature logic.
> >
> > The issue is discussed here:
> > https://lore.kernel.org/lkml/20230106151320.619514-1-irogers@google.com/
> >
> > Ian Rogers (3):
> > tools build: Pass libbpf feature only if libbpf 1.0+
> > perf build: Remove libbpf pre-1.0 feature tests
> > perf bpf: Remove pre libbpf 1.0 conditional logic
> >
> > tools/build/feature/Makefile | 7 --
> > .../feature/test-libbpf-bpf_map_create.c | 8 ---
> > .../test-libbpf-bpf_object__next_map.c | 8 ---
> > .../test-libbpf-bpf_object__next_program.c | 8 ---
> > .../build/feature/test-libbpf-bpf_prog_load.c | 9 ---
> > .../test-libbpf-bpf_program__set_insns.c | 8 ---
> > .../test-libbpf-btf__load_from_kernel_by_id.c | 8 ---
> > .../build/feature/test-libbpf-btf__raw_data.c | 8 ---
> > tools/build/feature/test-libbpf.c | 4 ++
> > tools/perf/Makefile.config | 37 +----------
> > tools/perf/util/bpf-event.c | 66 -------------------
> > tools/perf/util/bpf-loader.c | 18 -----
> > tools/perf/util/bpf_counter.c | 18 -----
> > 13 files changed, 5 insertions(+), 202 deletions(-)
>
> nice, I like that.. I was able to build perf on fedora
> with (dynamic) and without (static) libbpf 1.0
>
> I hope supporting allowing dynamic link just with libbpf 1.0
> won't mess up backport world too much.. cc-ing Michael
Yeah, would be nice to hear from Michael and other distro maintainers.
- Arnaldo
> other than that looks ok to me
>
> Acked/Tested-by: Jiri Olsa <jolsa@kernel.org>
>
> also for the 2 dependency patches
ok!
prev parent reply other threads:[~2023-01-10 13:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-09 20:34 [PATCH v1 0/3] Assume libbpf 1.0 in build Ian Rogers
2023-01-09 20:34 ` [PATCH v1 1/3] tools build: Pass libbpf feature only if libbpf 1.0+ Ian Rogers
2023-01-09 20:34 ` [PATCH v1 2/3] perf build: Remove libbpf pre-1.0 feature tests Ian Rogers
2023-01-09 20:34 ` [PATCH v1 3/3] perf bpf: Remove pre libbpf 1.0 conditional logic Ian Rogers
2023-01-10 12:34 ` [PATCH v1 0/3] Assume libbpf 1.0 in build Jiri Olsa
2023-01-10 13:36 ` Arnaldo Carvalho de Melo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y71p30zGtzUtrvt2@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=andres@anarazel.de \
--cc=andrii@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=christylee@fb.com \
--cc=irogers@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=mpetlan@redhat.com \
--cc=namhyung@kernel.org \
--cc=olsajiri@gmail.com \
--cc=peterz@infradead.org \
--cc=quentin@isovalent.com \
--cc=roberto.sassu@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).