lkml.org 
[lkml]   [2019]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 0/3] perf/bpftool: Allow to link libbpf dynamically
On Wed, Nov 27, 2019 at 1:49 AM Jiri Olsa <jolsa@kernel.org> wrote:
>
> hi,
> adding support to link bpftool with libbpf dynamically,
> and config change for perf.
>
> It's now possible to use:
> $ make -C tools/bpf/bpftool/ LIBBPF_DYNAMIC=1

I wonder what's the motivation behind these changes, though? Why is
linking bpftool dynamically with libbpf is necessary and important?
They are both developed tightly within kernel repo, so I fail to see
what are the huge advantages one can get from linking them
dynamically.

>
> which will detect libbpf devel package with needed version,
> and if found, link it with bpftool.
>
> It's possible to use arbitrary installed libbpf:
> $ make -C tools/bpf/bpftool/ LIBBPF_DYNAMIC=1 LIBBPF_DIR=/tmp/libbpf/
>
> I based this change on top of Arnaldo's perf/core, because
> it contains libbpf feature detection code as dependency.
> It's now also synced with latest bpf-next, so Toke's change
> applies correctly.
>
> Also available in:
> git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
> libbpf/dyn
>
> thanks,
> jirka
>
>
> ---
> Jiri Olsa (2):
> perf tools: Allow to specify libbpf install directory
> bpftool: Allow to link libbpf dynamically
>
> Toke Høiland-Jørgensen (1):
> libbpf: Export netlink functions used by bpftool
>
> tools/bpf/bpftool/Makefile | 40 +++++++++++++++++++++++++++++++++++++++-
> tools/build/feature/test-libbpf.c | 9 +++++++++
> tools/lib/bpf/libbpf.h | 22 +++++++++++++---------
> tools/lib/bpf/libbpf.map | 7 +++++++
> tools/lib/bpf/nlattr.h | 15 ++++++++++-----
> tools/perf/Makefile.config | 27 ++++++++++++++++++++-------
> 6 files changed, 98 insertions(+), 22 deletions(-)
>

\
 
 \ /
  Last update: 2019-12-02 18:11    [W:0.231 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site