Commit 3cc550f5 authored by Charlie Jenkins's avatar Charlie Jenkins Committed by Arnaldo Carvalho de Melo
Browse files

perf tools: Remove dependency on libaudit



All architectures now support HAVE_SYSCALL_TABLE_SUPPORT, so the flag is
no longer needed. With the removal of the flag, the related
GENERIC_SYSCALL_TABLE can also be removed.

libaudit was only used as a fallback for when HAVE_SYSCALL_TABLE_SUPPORT
was not defined, so libaudit is also no longer needed for any
architecture.

Signed-off-by: default avatarCharlie Jenkins <charlie@rivosinc.com>
Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Guo Ren <guoren@kernel.org>
Cc: Günther Noack <gnoack@google.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Leo Yan <leo.yan@linux.dev>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mickaël Salaün <mic@digikod.net>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20250108-perf_syscalltbl-v6-16-7543b5293098@rivosinc.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 00d1bfae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ scripts/ver_linux is a good way to check if your system already has
the necessary tools::

  sudo apt-get build-essentials flex bison yacc
  sudo apt install libelf-dev systemtap-sdt-dev libaudit-dev libslang2-dev libperl-dev libdw-dev
  sudo apt install libelf-dev systemtap-sdt-dev libslang2-dev libperl-dev libdw-dev

cscope is a good tool to browse kernel sources. Let's install it now::

+0 −4
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@ FILES= \
         test-gtk2.bin                          \
         test-gtk2-infobar.bin                  \
         test-hello.bin                         \
         test-libaudit.bin                      \
         test-libbfd.bin                        \
         test-libbfd-buildid.bin		\
         test-disassembler-four-args.bin        \
@@ -232,9 +231,6 @@ $(OUTPUT)test-libunwind-debug-frame-arm.bin:
$(OUTPUT)test-libunwind-debug-frame-aarch64.bin:
	$(BUILD) -lelf -llzma -lunwind-aarch64

$(OUTPUT)test-libaudit.bin:
	$(BUILD) -laudit

$(OUTPUT)test-libslang.bin:
	$(BUILD) -lslang

+0 −11
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
#include <libaudit.h>

extern int printf(const char *format, ...);

int main(void)
{
	printf("error message: %s\n", audit_errno_to_name(0));

	return audit_open();
}
+0 −2
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ feature::
                dwarf_getlocations      /  HAVE_LIBDW_SUPPORT
                dwarf-unwind            /  HAVE_DWARF_UNWIND_SUPPORT
                auxtrace                /  HAVE_AUXTRACE_SUPPORT
                libaudit                /  HAVE_LIBAUDIT_SUPPORT
                libbfd                  /  HAVE_LIBBFD_SUPPORT
                libcapstone             /  HAVE_LIBCAPSTONE_SUPPORT
                libcrypto               /  HAVE_LIBCRYPTO_SUPPORT
@@ -67,7 +66,6 @@ feature::
                libunwind               /  HAVE_LIBUNWIND_SUPPORT
                lzma                    /  HAVE_LZMA_SUPPORT
                numa_num_possible_cpus  /  HAVE_LIBNUMA_SUPPORT
                syscall_table           /  HAVE_SYSCALL_TABLE_SUPPORT
                zlib                    /  HAVE_ZLIB_SUPPORT
                zstd                    /  HAVE_ZSTD_SUPPORT

+2 −29
Original line number Diff line number Diff line
@@ -28,20 +28,7 @@ include $(srctree)/tools/scripts/Makefile.arch

$(call detected_var,SRCARCH)

ifneq ($(NO_SYSCALL_TABLE),1)
  NO_SYSCALL_TABLE := 1

  # architectures that use the generic syscall table scripts
  ifneq ($(filter $(SRCARCH), $(generic_syscall_table_archs)),)
    NO_SYSCALL_TABLE := 0
    CFLAGS += -DGENERIC_SYSCALL_TABLE
CFLAGS += -I$(OUTPUT)arch/$(SRCARCH)/include/generated
  endif

  ifneq ($(NO_SYSCALL_TABLE),1)
    CFLAGS += -DHAVE_SYSCALL_TABLE_SUPPORT
  endif
endif

# Additional ARCH settings for ppc
ifeq ($(SRCARCH),powerpc)
@@ -776,21 +763,7 @@ ifndef NO_LIBUNWIND
endif

ifneq ($(NO_LIBTRACEEVENT),1)
  ifeq ($(NO_SYSCALL_TABLE),0)
  $(call detected,CONFIG_TRACE)
  else
    ifndef NO_LIBAUDIT
      $(call feature_check,libaudit)
      ifneq ($(feature-libaudit), 1)
        $(warning No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev)
        NO_LIBAUDIT := 1
      else
        CFLAGS += -DHAVE_LIBAUDIT_SUPPORT
        EXTLIBS += -laudit
        $(call detected,CONFIG_TRACE)
      endif
    endif
  endif
endif

ifndef NO_LIBCRYPTO
Loading