tools/build/ patches to allow setting NO_SYSCALL_TABLE=1 from make command line
Arnaldo Carvalho de Melo
maintainercover tools/build/ patches to allow setting NO_SYSCALL_TABLE=1 from make command line
From: Arnaldo Carvalho de Melo <[email protected]>
Hi Jiri,
Can you please take a look if these are ok? I've tested it
extensively, but being Makefiles, I may be missing something... There are more patches on top of these in the tmp.perf/core branch in my tree, if you could take a quick look on those, that would be great as well. The one that makes libaudit not be tested by default, for instace.
Best regards,
- Arnaldo
Arnaldo Carvalho de Melo (2):
perf build: Group the NO_SYSCALL_TABLE logic
perf build: Allow explicitely disabling the NO_SYSCALL_TABLE variable
tools/perf/Makefile.config | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-)
Signature · 1 line
2.25.3
Arnaldo Carvalho de Melo
maintainerPATCH 1/2 perf build: Group the NO_SYSCALL_TABLE logic
From: Arnaldo Carvalho de Melo <[email protected]>
To help in allowing to disable it from the make command line.
--- tools/perf/Makefile.config | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-)
tools/perf/Makefile.config +15 -8
@@ -23,12 +23,26 @@ include $(srctree)/tools/scripts/Makefile.arch $(call detected_var,SRCARCH) NO_PERF_REGS := 1 + NO_SYSCALL_TABLE := 1 +ifeq ($(SRCARCH),x86) + ifeq (${IS_64_BIT}, 1) + NO_SYSCALL_TABLE := 0 + endif +else + ifneq ($(SRCARCH),$(filter $(SRCARCH),powerpc arm64 s390)) + NO_SYSCALL_TABLE := 0 + endif +endif + +ifneq ($(NO_SYSCALL_TABLE),1) + CFLAGS += -DHAVE_SYSCALL_TABLE_SUPPORT +endif + # Additional ARCH settings for ppc ifeq ($(SRCARCH),powerpc) NO_PERF_REGS := 0 - NO_SYSCALL_TABLE := 0 CFLAGS += -I$(OUTPUT)arch/powerpc/include/generated LIBUNWIND_LIBS := -lunwind -lunwind-ppc64 endif
@@ -37,7 +51,6 @@ endif ifeq ($(SRCARCH),x86) $(call detected,CONFIG_X86) ifeq (${IS_64_BIT}, 1) - NO_SYSCALL_TABLE := 0 CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT -I$(OUTPUT)arch/x86/include/generated ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S LIBUNWIND_LIBS = -lunwind-x86_64 -lunwind -llzma
@@ -55,7 +68,6 @@ endif ifeq ($(SRCARCH),arm64) NO_PERF_REGS := 0 - NO_SYSCALL_TABLE := 0 CFLAGS += -I$(OUTPUT)arch/arm64/include/generated LIBUNWIND_LIBS = -lunwind -lunwind-aarch64 endif
@@ -70,7 +82,6 @@ endif ifeq ($(ARCH),s390) NO_PERF_REGS := 0 - NO_SYSCALL_TABLE := 0 CFLAGS += -fPIC -I$(OUTPUT)arch/s390/include/generated endif
@@ -78,10 +89,6 @@ ifeq ($(NO_PERF_REGS),0) $(call detected,CONFIG_PERF_REGS) endif -ifneq ($(NO_SYSCALL_TABLE),1) - CFLAGS += -DHAVE_SYSCALL_TABLE_SUPPORT -endif - # So far there's only x86 and arm libdw unwind support merged in perf. # Disable it on all other architectures in case libdw unwind # support is detected in system. Add supported architectures
Signature · 1 line
2.25.3
Arnaldo Carvalho de Melo
maintainerRe: [PATCH 1/2] perf build: Group the NO_SYSCALL_TABLE logic
Em Fri, May 29, 2020 at 12:55:51PM -0300, Arnaldo Carvalho de Melo escreveu:
Quoted 19 lines
From: Arnaldo Carvalho de Melo <[email protected]>
To help in allowing to disable it from the make command line.
Cc Adrian Hunter <[email protected]>Cc Jiri Olsa <[email protected]>Cc Namhyung Kim <[email protected]>Signed-off-by Arnaldo Carvalho de Melo <[email protected]>--- tools/perf/Makefile.config | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-)tools/perf/Makefile.config +0
-0@@ -23,12 +23,26 @@ include $(srctree)/tools/scripts/Makefile.arch $(call detected_var,SRCARCH)
tools/perf/Makefile.config include $(srctree)/tools/scripts/Makefile.arch · line 34
Quoted 10 lines
tools/perf/Makefile.config +7
-0NO_PERF_REGS := 1 + NO_SYSCALL_TABLE := 1 +ifeq ($(SRCARCH),x86) + ifeq (${IS_64_BIT}, 1) + NO_SYSCALL_TABLE := 0 + endif +else + ifneq ($(SRCARCH),$(filter $(SRCARCH),powerpc arm64 s390))
The above should've been a ifeq, to see if SRCARCH is one of those, detected in the cross build tests, fixed.
- Arnaldo
Quoted 53 lines
tools/perf/Makefile.config +8
-8+ NO_SYSCALL_TABLE := 0 + endif +endif + +ifneq ($(NO_SYSCALL_TABLE),1) + CFLAGS += -DHAVE_SYSCALL_TABLE_SUPPORT +endif + # Additional ARCH settings for ppc ifeq ($(SRCARCH),powerpc) NO_PERF_REGS := 0 - NO_SYSCALL_TABLE := 0 CFLAGS += -I$(OUTPUT)arch/powerpc/include/generated LIBUNWIND_LIBS := -lunwind -lunwind-ppc64 endif@@ -37,7 +51,6 @@ endif ifeq ($(SRCARCH),x86) $(call detected,CONFIG_X86) ifeq (${IS_64_BIT}, 1) - NO_SYSCALL_TABLE := 0 CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT -I$(OUTPUT)arch/x86/include/generated ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S LIBUNWIND_LIBS = -lunwind-x86_64 -lunwind -llzma@@ -55,7 +68,6 @@ endif ifeq ($(SRCARCH),arm64) NO_PERF_REGS := 0 - NO_SYSCALL_TABLE := 0 CFLAGS += -I$(OUTPUT)arch/arm64/include/generated LIBUNWIND_LIBS = -lunwind -lunwind-aarch64 endif@@ -70,7 +82,6 @@ endif ifeq ($(ARCH),s390) NO_PERF_REGS := 0 - NO_SYSCALL_TABLE := 0 CFLAGS += -fPIC -I$(OUTPUT)arch/s390/include/generated endif@@ -78,10 +89,6 @@ ifeq ($(NO_PERF_REGS),0) $(call detected,CONFIG_PERF_REGS) endif -ifneq ($(NO_SYSCALL_TABLE),1) - CFLAGS += -DHAVE_SYSCALL_TABLE_SUPPORT -endif - # So far there's only x86 and arm libdw unwind support merged in perf. # Disable it on all other architectures in case libdw unwind # support is detected in system. Add supported architecturesSignature · 1 line
2.25.3
Signature · 1 line
- Arnaldo
Arnaldo Carvalho de Melo
maintainerPATCH 2/2 perf build: Allow explicitely disabling the NO_SYSCALL_TABLE variable
In reply to Arnaldo Carvalho de MeloFrom: Arnaldo Carvalho de Melo <[email protected]>
This is useful to see if, on x86, the legacy libaudit still works, as it is used in architectures that don't have the SYSCALL_TABLE logic and we want to have it tested in 'make -C tools/perf/ build-test'.
E.g.:
Without having audit-libs-devel installed:
$ make NO_SYSCALL_TABLE=1 O=/tmp/build/perf -C tools/perf install-bin
make: Entering directory '/home/acme/git/perf/tools/perf'
BUILD: Doing 'make -j12' parallel build
<SNIP>
Auto-detecting system features:
<SNIP>
... libaudit: [ OFF ]
... libbfd: [ on ]
... libcap: [ on ]
<SNIP>
Makefile.config:664: No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev
<SNIP>After installing it:
$ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf
$ time make NO_SYSCALL_TABLE=1 O=/tmp/build/perf -C tools/perf install-bin ; perf test python
make: Entering directory '/home/acme/git/perf/tools/perf'
BUILD: Doing 'make -j12' parallel build
HOSTCC /tmp/build/perf/fixdep.o
HOSTLD /tmp/build/perf/fixdep-in.o
LINK /tmp/build/perf/fixdep
Warning: Kernel ABI header at 'tools/arch/x86/include/asm/msr-index.h' differs from latest version at 'arch/x86/include/asm/msr-index.h'
diff -u tools/arch/x86/include/asm/msr-index.h arch/x86/include/asm/msr-index.h
Warning: Kernel ABI header at 'tools/perf/util/hashmap.h' differs from latest version at 'tools/lib/bpf/hashmap.h'
diff -u tools/perf/util/hashmap.h tools/lib/bpf/hashmap.h
Warning: Kernel ABI header at 'tools/perf/util/hashmap.c' differs from latest version at 'tools/lib/bpf/hashmap.c'
diff -u tools/perf/util/hashmap.c tools/lib/bpf/hashmap.c Auto-detecting system features:
<SNIP>
... libaudit: [ on ] ... libbfd: [ on ] ... libcap: [ on ] <SNIP> $ ldd ~/bin/perf | grep audit libaudit.so.1 => /lib64/libaudit.so.1 (0x00007fc18978e000) $
--- tools/perf/Makefile.config | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-)
tools/perf/Makefile.config +13 -11
@@ -24,20 +24,22 @@ $(call detected_var,SRCARCH) NO_PERF_REGS := 1 -NO_SYSCALL_TABLE := 1 +ifneq ($(NO_SYSCALL_TABLE),1) + NO_SYSCALL_TABLE := 1 -ifeq ($(SRCARCH),x86) - ifeq (${IS_64_BIT}, 1) - NO_SYSCALL_TABLE := 0 - endif -else - ifneq ($(SRCARCH),$(filter $(SRCARCH),powerpc arm64 s390)) - NO_SYSCALL_TABLE := 0 + ifeq ($(SRCARCH),x86) + ifeq (${IS_64_BIT}, 1) + NO_SYSCALL_TABLE := 0 + endif + else + ifneq ($(SRCARCH),$(filter $(SRCARCH),powerpc arm64 s390)) + NO_SYSCALL_TABLE := 0 + endif endif -endif -ifneq ($(NO_SYSCALL_TABLE),1) - CFLAGS += -DHAVE_SYSCALL_TABLE_SUPPORT + ifneq ($(NO_SYSCALL_TABLE),1) + CFLAGS += -DHAVE_SYSCALL_TABLE_SUPPORT + endif endif # Additional ARCH settings for ppc
Signature · 1 line
2.25.3
Re: [PATCH 2/2] perf build: Allow explicitely disabling the NO_SYSCALL_TABLE variable
Quoted 23 lines · Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo <[email protected]>
This is useful to see if, on x86, the legacy libaudit still works, as it is used in architectures that don't have the
SYSCALL_TABLElogic and we want to have it tested in 'make -Ctools/perf/build-test'.E.g.:
Without having audit-libs-devel installed:
$ make NO_SYSCALL_TABLE=1 O=/tmp/build/perf -C tools/perf install-bin make: Entering directory '/home/acme/git/perf/tools/perf' BUILD: Doing 'make -j12' parallel build <SNIP> Auto-detecting system features: <SNIP> ... libaudit: [ OFF ] ... libbfd: [ on ] ... libcap: [ on ] <SNIP> Makefile.config:664: No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev <SNIP>
Quoted 4 lines
After installing it:
$ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf $ time make NO_SYSCALL_TABLE=1 O=/tmp/build/perf -C tools/perf install-bin ; perf test python
heya,
seems ok, perhaps also put it in comment to Makefile.perf among other NO_* stuff and to tests/make
jirka
Quoted 72 lines
make: Entering directory '
/home/acme/git/perf/tools/perf'BUILD: Doing 'make -j12' parallel build HOSTCC /tmp/build/perf/fixdep.o HOSTLD /tmp/build/perf/fixdep-in.o LINK /tmp/build/perf/fixdepWarning: Kernel ABI header at '
tools/arch/x86/include/asm/msr-index.h' differs from latest version at 'arch/x86/include/asm/msr-index.h' diff -utools/arch/x86/include/asm/msr-index.harch/x86/include/asm/msr-index.h
Warning: Kernel ABI header at 'tools/perf/util/hashmap.h' differs from latest version at 'tools/lib/bpf/hashmap.h' diff -utools/perf/util/hashmap.htools/lib/bpf/hashmap.h
Warning: Kernel ABI header at 'tools/perf/util/hashmap.c' differs from latest version at 'tools/lib/bpf/hashmap.c' diff -utools/perf/util/hashmap.ctools/lib/bpf/hashmap.cAuto-detecting system features:
<SNIP>... libaudit: [ on ] ... libbfd: [ on ] ... libcap: [ on ] <SNIP> $ ldd ~/bin/perf | grep audit libaudit.so.1 => /lib64/libaudit.so.1 (0x00007fc18978e000) $Cc Adrian Hunter <[email protected]>Cc Ingo Molnar <[email protected]>Cc Jiri Olsa <[email protected]>Cc Namhyung Kim <[email protected]>Signed-off-by Arnaldo Carvalho de Melo <[email protected]>--- tools/perf/Makefile.config | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-)tools/perf/Makefile.config +13
-11@@ -24,20 +24,22 @@ $(call detected_var,SRCARCH) NO_PERF_REGS := 1 -NO_SYSCALL_TABLE := 1 +ifneq ($(NO_SYSCALL_TABLE),1) + NO_SYSCALL_TABLE := 1 -ifeq ($(SRCARCH),x86) - ifeq (${IS_64_BIT}, 1) - NO_SYSCALL_TABLE := 0 - endif -else - ifneq ($(SRCARCH),$(filter $(SRCARCH),powerpc arm64 s390)) - NO_SYSCALL_TABLE := 0 + ifeq ($(SRCARCH),x86) + ifeq (${IS_64_BIT}, 1) + NO_SYSCALL_TABLE := 0 + endif + else + ifneq ($(SRCARCH),$(filter $(SRCARCH),powerpc arm64 s390)) + NO_SYSCALL_TABLE := 0 + endif endif -endif -ifneq ($(NO_SYSCALL_TABLE),1) - CFLAGS += -DHAVE_SYSCALL_TABLE_SUPPORT + ifneq ($(NO_SYSCALL_TABLE),1) + CFLAGS += -DHAVE_SYSCALL_TABLE_SUPPORT + endif endif # Additional ARCH settings for ppcSignature · 1 line
2.25.3
Arnaldo Carvalho de Melo
maintainerRe: [PATCH 2/2] perf build: Allow explicitely disabling the NO_SYSCALL_TABLE variable
Em Fri, May 29, 2020 at 08:07:17PM +0200, Jiri Olsa escreveu:
Quoted 24 lines · Arnaldo Carvalho de Melo
Quoted 23 lines
From: Arnaldo Carvalho de Melo <[email protected]>
This is useful to see if, on x86, the legacy libaudit still works, as it is used in architectures that don't have the
SYSCALL_TABLElogic and we want to have it tested in 'make -Ctools/perf/build-test'.E.g.:
Without having audit-libs-devel installed:
$ make NO_SYSCALL_TABLE=1 O=/tmp/build/perf -C tools/perf install-bin make: Entering directory '/home/acme/git/perf/tools/perf' BUILD: Doing 'make -j12' parallel build <SNIP> Auto-detecting system features: <SNIP> ... libaudit: [ OFF ] ... libbfd: [ on ] ... libcap: [ on ] <SNIP> Makefile.config:664: No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev <SNIP>
Quoted 8 lines
Quoted 4 lines
After installing it:
$ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf $ time make NO_SYSCALL_TABLE=1 O=/tmp/build/perf -C tools/perf install-bin ; perf test pythonheya,
seems ok, perhaps also put it in comment to Makefile.perf among other NO_* stuff and to tests/make
Added this and your Acked-by (from the "seems ok") :-) Ok?
- Arnaldo
tools/perf/Makefile.perf +3 -0
@@ -118,6 +118,9 @@ include ../scripts/utilities.mak # # Define LIBBPF_DYNAMIC to enable libbpf dynamic linking. # +# Define NO_SYSCALL_TABLE=1 to disable the use of syscall id to/from name tables +# generated from the kernel .tbl or unistd.h files and use, if available, libaudit +# for doing the conversions to/from strings/id. # As per kernel Makefile, avoid funny character set dependencies unexport LC_ALL
Re: [PATCH 2/2] perf build: Allow explicitely disabling the NO_SYSCALL_TABLE variable
Quoted 30 lines · Arnaldo Carvalho de Melo
Em Fri, May 29, 2020 at 08:07:17PM +0200, Jiri Olsa escreveu:
Quoted 29 lines · Arnaldo Carvalho de Melo
Quoted 27 lines
From: Arnaldo Carvalho de Melo <[email protected]>
This is useful to see if, on x86, the legacy libaudit still works, as it is used in architectures that don't have the
SYSCALL_TABLElogic and we want to have it tested in 'make -Ctools/perf/build-test'.E.g.:
Without having audit-libs-devel installed:
$ make NO_SYSCALL_TABLE=1 O=/tmp/build/perf -C tools/perf install-bin make: Entering directory '/home/acme/git/perf/tools/perf' BUILD: Doing 'make -j12' parallel build <SNIP> Auto-detecting system features: <SNIP> ... libaudit: [ OFF ] ... libbfd: [ on ] ... libcap: [ on ] <SNIP> Makefile.config:664: No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev <SNIP>After installing it:
$ rm -rf /tmp/build/perf ; mkdir -p /tmp/build/perf $ time make NO_SYSCALL_TABLE=1 O=/tmp/build/perf -C tools/perf install-bin ; perf test python
Quoted 6 lines
Quoted 3 lines
heya,
seems ok, perhaps also put it in comment to Makefile.perf among other NO_* stuff and to tests/makeAdded this and your Acked-by (from the "seems ok") :-) Ok?
yep ;-)
jirka
Quoted 18 lines
- Arnaldo
tools/perf/Makefile.perf +3
-0@@ -118,6 +118,9 @@ include ../scripts/utilities.mak # # Define LIBBPF_DYNAMIC to enable libbpf dynamic linking. # +# Define NO_SYSCALL_TABLE=1 to disable the use of syscall id to/from name tables +# generated from the kernel .tbl or unistd.h files and use, if available, libaudit +# for doing the conversions to/from strings/id. # As per kernel Makefile, avoid funny character set dependencies unexport LC_ALL