[PATCH/RFT] Re: [PATCH v5 1/8] perf trace: Fix iteration of syscall ids in syscalltbl->entries
From: Arnaldo Carvalho de Melo
Date: Fri Aug 30 2024 - 19:30:38 EST
On Fri, Aug 30, 2024 at 12:24:29PM +0200, Jiri Slaby wrote:
> This broke NO_SYSCALL_TABLE builds. i586 in particular
> (HAVE_SYSCALL_TABLE_SUPPORT is undefined there):
> > gcc -fomit-frame-pointer -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous
> > perf-in.o -Wl,--whole-archive /home/abuild/rpmbuild/BUILD/tools/perf/libapi/libapi.a /home/abuild/rpmbuild/BUILD/tools/pe
> > /usr/lib/gcc/i586-suse-linux/14/../../../../i586-suse-linux/bin/ld: perf-in.o: in function `cmd_trace':
> > (.text+0x81411): undefined reference to `syscalltbl__id_at_idx'
> > /usr/lib/gcc/i586-suse-linux/14/../../../../i586-suse-linux/bin/ld: (.text+0x814b2): undefined reference to `syscalltbl__id_at_idx'
> > /usr/lib/gcc/i586-suse-linux/14/../../../../i586-suse-linux/bin/ld: (.text+0x8154c): undefined reference to `syscalltbl__id_at_idx'
>
> Should there be something like a function returning identity mapping for
> !HAVE_SYSCALL_TABLE_SUPPORT?
I'll address this later, meantime I'm adding the patch below to
perf-tools-next, probably your fix/suggestion of an identity mapping is
way shorter and solves the !HAVE_SYSCALL_TABLE_SUPPORT case and thus
should go to perf-tools.
Please test the patch below and see if it fixes things for you, for me,
with this container:
WARNING: image platform (linux/386) does not match the expected platform (linux/amd64)
WARNING: image platform (linux/386) does not match the expected platform (linux/amd64)
110.55 almalinux:9-i386 : Ok gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3) , clang version 17.0.6 (AlmaLinux OS Foundation 17.0.6-5.el9) flex 2.6.4
BUILD_TARBALL_HEAD=174899051e54ecdab06c07652a3d04ad000ab301
Using https://hub.docker.com/r/almalinux/i386/tags
It builds as part of my set of tools[1] (not perf specific, I use it for
pahole as well) build containers, using gcc and clang, with/without
various build options, and will thus be tested from now on before I push
things upstream.
- Arnaldo
[1] https://github.com/acmel/linux-tools-container-builds