* [PATCH 1/1 perf-tools] perf MANIFEST: Add arch/*/include/uapi/asm/bpf_perf_event.h to the perf tarball
@ 2024-11-26 20:43 Arnaldo Carvalho de Melo
2024-11-26 23:30 ` Michel Lind
2025-01-09 22:48 ` Michel Lind
0 siblings, 2 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-11-26 20:43 UTC (permalink / raw)
To: Namhyung Kim
Cc: Michel Lind, Andrii Nakryiko, Alexei Starovoitov, Adrian Hunter,
Ian Rogers, James Clark, Jiri Olsa, Kan Liang,
Linux Kernel Mailing List, linux-perf-users
Needed to build tools/lib/bpf/ on various arches other than x86_64,
notably arm64 when using the perf tarballs generated by:
$ make help | grep perf-
perf-tar-src-pkg - Build the perf source tarball with no compression
perf-targz-src-pkg - Build the perf source tarball with gzip compression
perf-tarbz2-src-pkg - Build the perf source tarball with bz2 compression
perf-tarxz-src-pkg - Build the perf source tarball with xz compression
perf-tarzst-src-pkg - Build the perf source tarball with zst compression
$
Building with BPF support was opt-in in perf for a long time, and
testing it via the tarball main kernel Makefile targets in an
architecture other than x86_64 was an odd case.
I had noticed this at some point earlier this year while cross building
perf to some arches, including arm64, but it fell thru the cracks, see
the Link tag below.
Fix it now by adding those arch/*/include/uapi/asm/bpf_perf_event.h
files to the MANIFEST file used in building the perf source tarball.
Tested with:
perfbuilder@number:~$ time dm debian:experimental-x-arm64
1 21.60 debian:experimental-x-arm64 : Ok aarch64-linux-gnu-gcc (Debian 14.1.0-5) 14.1.0 flex 2.6.4
BUILD_TARBALL_HEAD=d31a974f6edc576f84c35be9526fec549a3b3520
$
$ git log --oneline -1 d31a974f6edc576f84c35be9526fec549a3b3520
d31a974f6edc576f (HEAD -> perf-tools-next) perf MANIFEST: Add arch/*/include/uapi/asm/bpf_perf_event.h to the perf tarball
$
That was previously failing:
perfbuilder@number:~$ grep debian:experimental-x-arm64 dm.log.old/summary
19 4.80 debian:experimental-x-arm64 : FAIL gcc version 14.1.0 (Debian 14.1.0-5)
$
perfbuilder@number:~$ grep -B6 'Error 1' dm.log.old/debian:experimental-x-arm64
In file included from /git/perf-6.12.0-rc6/tools/include/uapi/linux/bpf_perf_event.h:11,
from libbpf.c:36:
/git/perf-6.12.0-rc6/tools/include/uapi/asm/bpf_perf_event.h:2:10: fatal error: ../../arch/arm64/include/uapi/asm/bpf_perf_event.h: No such file or directory
2 | #include "../../arch/arm64/include/uapi/asm/bpf_perf_event.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[4]: *** [/git/perf-6.12.0-rc6/tools/build/Makefile.build:105: /tmp/build/perf/libbpf/staticobjs/libbpf.o] Error 1
perfbuilder@number:~$
Fixes: 9eea8fafe33eb708 ("libbpf: fix __arg_ctx type enforcement for perf_event programs")
Closes: https://lore.kernel.org/all/Z0UNRCRYKunbDYxP@hyperscale.parallels
Reported-by: Michel Lind <michel@michel-slm.name>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/ZfyEgoG3JFiOs2Fs@x1/
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/MANIFEST | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/perf/MANIFEST b/tools/perf/MANIFEST
index dc42de1785cee715..908165fcec7de3c4 100644
--- a/tools/perf/MANIFEST
+++ b/tools/perf/MANIFEST
@@ -1,5 +1,6 @@
arch/arm64/tools/gen-sysreg.awk
arch/arm64/tools/sysreg
+arch/*/include/uapi/asm/bpf_perf_event.h
tools/perf
tools/arch
tools/scripts
--
2.47.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1 perf-tools] perf MANIFEST: Add arch/*/include/uapi/asm/bpf_perf_event.h to the perf tarball
2024-11-26 20:43 [PATCH 1/1 perf-tools] perf MANIFEST: Add arch/*/include/uapi/asm/bpf_perf_event.h to the perf tarball Arnaldo Carvalho de Melo
@ 2024-11-26 23:30 ` Michel Lind
2025-01-09 22:48 ` Michel Lind
1 sibling, 0 replies; 4+ messages in thread
From: Michel Lind @ 2024-11-26 23:30 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Namhyung Kim, Andrii Nakryiko, Alexei Starovoitov, Adrian Hunter,
Ian Rogers, James Clark, Jiri Olsa, Kan Liang,
Linux Kernel Mailing List, linux-perf-users
[-- Attachment #1: Type: text/plain, Size: 1761 bytes --]
On Tue, Nov 26, 2024 at 05:43:18PM -0300, Arnaldo Carvalho de Melo wrote:
> Needed to build tools/lib/bpf/ on various arches other than x86_64,
> notably arm64 when using the perf tarballs generated by:
>
> $ make help | grep perf-
> perf-tar-src-pkg - Build the perf source tarball with no compression
> perf-targz-src-pkg - Build the perf source tarball with gzip compression
> perf-tarbz2-src-pkg - Build the perf source tarball with bz2 compression
> perf-tarxz-src-pkg - Build the perf source tarball with xz compression
> perf-tarzst-src-pkg - Build the perf source tarball with zst compression
> $
>
> Building with BPF support was opt-in in perf for a long time, and
> testing it via the tarball main kernel Makefile targets in an
> architecture other than x86_64 was an odd case.
>
> I had noticed this at some point earlier this year while cross building
> perf to some arches, including arm64, but it fell thru the cracks, see
> the Link tag below.
>
> Fix it now by adding those arch/*/include/uapi/asm/bpf_perf_event.h
> files to the MANIFEST file used in building the perf source tarball.
>
FWIW - when testing against the architectures Fedora carry (x86_64,
aarch64/arm64, ppc64le, s390x) only the arm64 and s390 headers are
needed; see
https://git.centos.org/rpms/perf/blob/c9s-sig-hyperscale/f/perf.spec#_120-128
(I would link to my Koji scratch build but Koji has some sort of glitch
right now)
It's probably safer to just include all headers just in case.
Thanks for this patch, it is really instructive in figuring out how perf
is put together!
Best regards,
--
_o) Michel Lind
_( ) identities: https://keyoxide.org/5dce2e7e9c3b1cffd335c1d78b229d2f7ccc04f2
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1 perf-tools] perf MANIFEST: Add arch/*/include/uapi/asm/bpf_perf_event.h to the perf tarball
2024-11-26 20:43 [PATCH 1/1 perf-tools] perf MANIFEST: Add arch/*/include/uapi/asm/bpf_perf_event.h to the perf tarball Arnaldo Carvalho de Melo
2024-11-26 23:30 ` Michel Lind
@ 2025-01-09 22:48 ` Michel Lind
2025-01-10 13:40 ` Arnaldo Carvalho de Melo
1 sibling, 1 reply; 4+ messages in thread
From: Michel Lind @ 2025-01-09 22:48 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: linux-perf-users
[-- Attachment #1: Type: text/plain, Size: 716 bytes --]
Hi Arnaldo,
On Tue, 2024-11-26 at 17:43 -0300, Arnaldo Carvalho de Melo wrote:
> Needed to build tools/lib/bpf/ on various arches other than x86_64,
> notably arm64 when using the perf tarballs generated by:
>
> $ make help | grep perf-
I can confirm this works - I've applied this on top of the stable
tree's 6.12.9 tag, and generated a tarball that works for building perf
in Hyperscale, e.g.
https://cbs.centos.org/koji/buildinfo?buildID=57925
Can this be merged too? Thanks
(Also - presumably merged changes eventually shows up in the perf-
tools-next branch)
Best regards,
--
_o) Michel Lind
_( ) identities:
https://keyoxide.org/5dce2e7e9c3b1cffd335c1d78b229d2f7ccc04f2
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1 perf-tools] perf MANIFEST: Add arch/*/include/uapi/asm/bpf_perf_event.h to the perf tarball
2025-01-09 22:48 ` Michel Lind
@ 2025-01-10 13:40 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2025-01-10 13:40 UTC (permalink / raw)
To: Michel Lind, Namhyung Kim
Cc: Adrian Hunter, Ian Rogers, James Clark, Jiri Olsa, Kan Liang,
linux-perf-users, Linux Kernel Mailing List
On Thu, Jan 09, 2025 at 04:48:57PM -0600, Michel Lind wrote:
> Hi Arnaldo,
>
> On Tue, 2024-11-26 at 17:43 -0300, Arnaldo Carvalho de Melo wrote:
> > Needed to build tools/lib/bpf/ on various arches other than x86_64,
> > notably arm64 when using the perf tarballs generated by:
> >
> > $ make help | grep perf-
>
> I can confirm this works - I've applied this on top of the stable
Ok, so I'm taking this as a:
Tested-by: Michel Lind <michel@michel-slm.name>
Applied.
- Arnaldo
> tree's 6.12.9 tag, and generated a tarball that works for building perf
> in Hyperscale, e.g.
> https://cbs.centos.org/koji/buildinfo?buildID=57925
>
> Can this be merged too? Thanks
>
> (Also - presumably merged changes eventually shows up in the perf-
> tools-next branch)
>
>
> Best regards,
>
> --
> _o) Michel Lind
> _( ) identities:
> https://keyoxide.org/5dce2e7e9c3b1cffd335c1d78b229d2f7ccc04f2
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-01-10 13:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-26 20:43 [PATCH 1/1 perf-tools] perf MANIFEST: Add arch/*/include/uapi/asm/bpf_perf_event.h to the perf tarball Arnaldo Carvalho de Melo
2024-11-26 23:30 ` Michel Lind
2025-01-09 22:48 ` Michel Lind
2025-01-10 13:40 ` Arnaldo Carvalho de Melo
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).