linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/2] tools/build/ patches to allow setting NO_SYSCALL_TABLE=1 from make command line
@ 2020-05-29 15:55 Arnaldo Carvalho de Melo
  2020-05-29 15:55 ` [PATCH 1/2] perf build: Group the NO_SYSCALL_TABLE logic Arnaldo Carvalho de Melo
  2020-05-29 15:55 ` [PATCH 2/2] perf build: Allow explicitely disabling the NO_SYSCALL_TABLE variable Arnaldo Carvalho de Melo
  0 siblings, 2 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-05-29 15:55 UTC (permalink / raw)
  To: Jiri Olsa, Namhyung Kim
  Cc: Ingo Molnar, Thomas Gleixner, Clark Williams, linux-kernel,
	linux-perf-users, Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <acme@redhat.com>

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(-)

-- 
2.25.3


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] perf build: Group the NO_SYSCALL_TABLE logic
  2020-05-29 15:55 [RFC 0/2] tools/build/ patches to allow setting NO_SYSCALL_TABLE=1 from make command line Arnaldo Carvalho de Melo
@ 2020-05-29 15:55 ` Arnaldo Carvalho de Melo
  2020-05-29 20:19   ` Arnaldo Carvalho de Melo
  2020-05-29 15:55 ` [PATCH 2/2] perf build: Allow explicitely disabling the NO_SYSCALL_TABLE variable Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-05-29 15:55 UTC (permalink / raw)
  To: Jiri Olsa, Namhyung Kim
  Cc: Ingo Molnar, Thomas Gleixner, Clark Williams, linux-kernel,
	linux-perf-users, Arnaldo Carvalho de Melo, Adrian Hunter

From: Arnaldo Carvalho de Melo <acme@redhat.com>

To help in allowing to disable it from the make command line.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile.config | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index ae325f79e598..93fb7510a9a9 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -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
-- 
2.25.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] perf build: Allow explicitely disabling the NO_SYSCALL_TABLE variable
  2020-05-29 15:55 [RFC 0/2] tools/build/ patches to allow setting NO_SYSCALL_TABLE=1 from make command line Arnaldo Carvalho de Melo
  2020-05-29 15:55 ` [PATCH 1/2] perf build: Group the NO_SYSCALL_TABLE logic Arnaldo Carvalho de Melo
@ 2020-05-29 15:55 ` Arnaldo Carvalho de Melo
  2020-05-29 18:07   ` Jiri Olsa
  1 sibling, 1 reply; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-05-29 15:55 UTC (permalink / raw)
  To: Jiri Olsa, Namhyung Kim
  Cc: Ingo Molnar, Thomas Gleixner, Clark Williams, linux-kernel,
	linux-perf-users, Arnaldo Carvalho de Melo, Adrian Hunter

From: Arnaldo Carvalho de Melo <acme@redhat.com>

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)
  $

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/Makefile.config | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 93fb7510a9a9..6bc9251f1634 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -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
-- 
2.25.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] perf build: Allow explicitely disabling the NO_SYSCALL_TABLE variable
  2020-05-29 15:55 ` [PATCH 2/2] perf build: Allow explicitely disabling the NO_SYSCALL_TABLE variable Arnaldo Carvalho de Melo
@ 2020-05-29 18:07   ` Jiri Olsa
  2020-05-29 19:45     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 7+ messages in thread
From: Jiri Olsa @ 2020-05-29 18:07 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Namhyung Kim, Ingo Molnar, Thomas Gleixner,
	Clark Williams, linux-kernel, linux-perf-users,
	Arnaldo Carvalho de Melo, Adrian Hunter

On Fri, May 29, 2020 at 12:55:52PM -0300, Arnaldo Carvalho de Melo wrote:
> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> 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

heya,
seems ok, perhaps also put it in comment to Makefile.perf
among other NO_* stuff and to tests/make

jirka

>   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)
>   $
> 
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
>  tools/perf/Makefile.config | 24 +++++++++++++-----------
>  1 file changed, 13 insertions(+), 11 deletions(-)
> 
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index 93fb7510a9a9..6bc9251f1634 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -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
> -- 
> 2.25.3
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] perf build: Allow explicitely disabling the NO_SYSCALL_TABLE variable
  2020-05-29 18:07   ` Jiri Olsa
@ 2020-05-29 19:45     ` Arnaldo Carvalho de Melo
  2020-05-29 20:33       ` Jiri Olsa
  0 siblings, 1 reply; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-05-29 19:45 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: Jiri Olsa, Namhyung Kim, Ingo Molnar, Thomas Gleixner,
	Clark Williams, linux-kernel, linux-perf-users,
	Arnaldo Carvalho de Melo, Adrian Hunter

Em Fri, May 29, 2020 at 08:07:17PM +0200, Jiri Olsa escreveu:
> On Fri, May 29, 2020 at 12:55:52PM -0300, Arnaldo Carvalho de Melo wrote:
> > From: Arnaldo Carvalho de Melo <acme@redhat.com>
> > 
> > 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
> 
> heya,
> 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

diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 30e41dcd4095..e3a34af38130 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] perf build: Group the NO_SYSCALL_TABLE logic
  2020-05-29 15:55 ` [PATCH 1/2] perf build: Group the NO_SYSCALL_TABLE logic Arnaldo Carvalho de Melo
@ 2020-05-29 20:19   ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2020-05-29 20:19 UTC (permalink / raw)
  To: Jiri Olsa, Namhyung Kim
  Cc: Ingo Molnar, Thomas Gleixner, Clark Williams, linux-kernel,
	linux-perf-users, Arnaldo Carvalho de Melo, Adrian Hunter

Em Fri, May 29, 2020 at 12:55:51PM -0300, Arnaldo Carvalho de Melo escreveu:
> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> To help in allowing to disable it from the make command line.
> 
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
>  tools/perf/Makefile.config | 23 +++++++++++++++--------
>  1 file changed, 15 insertions(+), 8 deletions(-)
> 
> diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
> index ae325f79e598..93fb7510a9a9 100644
> --- a/tools/perf/Makefile.config
> +++ b/tools/perf/Makefile.config
> @@ -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))

The above should've been a ifeq, to see if SRCARCH is one of those,
detected in the cross build tests, fixed.

- Arnaldo

> +    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
> -- 
> 2.25.3
> 

-- 

- Arnaldo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] perf build: Allow explicitely disabling the NO_SYSCALL_TABLE variable
  2020-05-29 19:45     ` Arnaldo Carvalho de Melo
@ 2020-05-29 20:33       ` Jiri Olsa
  0 siblings, 0 replies; 7+ messages in thread
From: Jiri Olsa @ 2020-05-29 20:33 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Jiri Olsa, Namhyung Kim, Ingo Molnar, Thomas Gleixner,
	Clark Williams, linux-kernel, linux-perf-users,
	Arnaldo Carvalho de Melo, Adrian Hunter

On Fri, May 29, 2020 at 04:45:15PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, May 29, 2020 at 08:07:17PM +0200, Jiri Olsa escreveu:
> > On Fri, May 29, 2020 at 12:55:52PM -0300, Arnaldo Carvalho de Melo wrote:
> > > From: Arnaldo Carvalho de Melo <acme@redhat.com>
> > > 
> > > 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
> > 
> > heya,
> > 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?

yep ;-)

jirka

> 
> - Arnaldo
> 
> diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
> index 30e41dcd4095..e3a34af38130 100644
> --- a/tools/perf/Makefile.perf
> +++ b/tools/perf/Makefile.perf
> @@ -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
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-29 20:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-29 15:55 [RFC 0/2] tools/build/ patches to allow setting NO_SYSCALL_TABLE=1 from make command line Arnaldo Carvalho de Melo
2020-05-29 15:55 ` [PATCH 1/2] perf build: Group the NO_SYSCALL_TABLE logic Arnaldo Carvalho de Melo
2020-05-29 20:19   ` Arnaldo Carvalho de Melo
2020-05-29 15:55 ` [PATCH 2/2] perf build: Allow explicitely disabling the NO_SYSCALL_TABLE variable Arnaldo Carvalho de Melo
2020-05-29 18:07   ` Jiri Olsa
2020-05-29 19:45     ` Arnaldo Carvalho de Melo
2020-05-29 20:33       ` Jiri Olsa

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).