lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEf4BzZT28PrpSNdGU29X0aRT6nQrGwm168apmKOre4giZkv-g@mail.gmail.com>
Date:   Thu, 17 Nov 2022 09:00:14 -0800
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
Cc:     Namhyung Kim <namhyung@...nel.org>,
        Song Liu <songliubraving@...com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Ian Rogers <irogers@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Building perf with BUILD_BPF_SKEL=1

On Thu, Nov 17, 2022 at 5:11 AM Arnaldo Carvalho de Melo
<arnaldo.melo@...il.com> wrote:
>
> Hi guys,
>
>         At some point we should switch to building with BPF skels by
> default as there are many features that are implemented that way in
> perf:
>
> ⬢[acme@...lbox perf]$ ls -la tools/perf/util/bpf_skel/
> total 464
> drwxr-xr-x. 1 acme acme  334 Oct 14 10:28 .
> drwxr-xr-x. 1 acme acme 7380 Nov 17 09:22 ..
> -rw-r--r--. 1 acme acme 5581 Oct 14 10:28 bperf_cgroup.bpf.c
> -rw-r--r--. 1 acme acme 1764 Mar 14  2022 bperf_follower.bpf.c
> -rw-r--r--. 1 acme acme 1438 Mar 14  2022 bperf_leader.bpf.c
> -rw-r--r--. 1 acme acme  285 Mar 14  2022 bperf_u.h
> -rw-r--r--. 1 acme acme 2290 Mar 14  2022 bpf_prog_profiler.bpf.c
> -rw-r--r--. 1 acme acme 2164 Mar 27  2022 func_latency.bpf.c
> -rw-r--r--. 1 acme acme   53 Nov  6  2021 .gitignore
> -rw-r--r--. 1 acme acme 9017 Sep 27 09:29 kwork_trace.bpf.c
> -rw-r--r--. 1 acme acme 3691 Oct  6 08:03 lock_contention.bpf.c
> -rw-r--r--. 1 acme acme 6102 Oct  4 08:55 off_cpu.bpf.c
> ⬢[acme@...lbox perf]$
>
>
> Since I'm finally using the Firefly ARM board the fine folks at
> Librecomputer gave us at Kernel Recipes, I'm noticing issues as I go on
> adding the components, for instance:
>
> /bin/sh: 2: llvm-strip: not found
> make[2]: *** [Makefile.perf:1136: /tmp/build/perf/util/bpf_skel/.tmp/bperf_follower.bpf.o] Error 127
> make[2]: *** Waiting for unfinished jobs....
> /bin/sh: 2: llvm-strip: not found
> make[2]: *** [Makefile.perf:1136: /tmp/build/perf/util/bpf_skel/.tmp/bpf_prog_profiler.bpf.o] Error 127
> /bin/sh: 2: llvm-strip: not found
> make[2]: *** [Makefile.perf:1136: /tmp/build/perf/util/bpf_skel/.tmp/bperf_leader.bpf.o] Error 127
> /bin/sh: 2: llvm-strip: not found
> make[2]: *** [Makefile.perf:1136: /tmp/build/perf/util/bpf_skel/.tmp/func_latency.bpf.o] Error 127
> /bin/sh: 2: llvm-strip: not found
> make[2]: *** [Makefile.perf:1136: /tmp/build/perf/util/bpf_skel/.tmp/bperf_cgroup.bpf.o] Error 127
> make[1]: *** [Makefile.perf:240: sub-make] Error 2
> make: *** [Makefile:113: install-bin] Error 2
> make: Leaving directory '/home/acme/git/perf/tools/perf'
>
> So this is just me taking notes, feel free to fix it if you want ;-)
>
> acme@...-rk3399-pc:~/git/perf$ cat /etc/os-release
> PRETTY_NAME="Ubuntu 22.04.1 LTS"
> NAME="Ubuntu"
> VERSION_ID="22.04"
> VERSION="22.04.1 LTS (Jammy Jellyfish)"
> VERSION_CODENAME=jammy
> ID=ubuntu
> ID_LIKE=debian
> HOME_URL="https://www.ubuntu.com/"
> SUPPORT_URL="https://help.ubuntu.com/"
> BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
> PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
> UBUNTU_CODENAME=jammy
> acme@...-rk3399-pc:~/git/perf$
>
> perf should check for that and give per-distro hints on how to overcome
> those, for instance, on ubuntu I had to:

there is no need to use llvm-strip anymore, if you use BPF static
linking (even if for single .bpf.o file). We do `bpftool obj gen` and
that effectively strips away DWARF.

>
> acme@...-rk3399-pc:~/git/perf$ dpkg -L llvm-14 | grep strip
> /usr/share/man/man1/llvm-strip-14.1.gz
> /usr/bin/llvm-bitcode-strip-14
> /usr/bin/llvm-strip-14
> /usr/lib/llvm-14/bin/llvm-bitcode-strip
> /usr/lib/llvm-14/bin/llvm-strip
> acme@...-rk3399-pc:~/git/perf$ export PATH=$PATH:/usr/lib/llvm-14/bin
>
>
> and now:
>

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ