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

perf tools arm64: Use syscall table



arm64 uses a syscall table, use that in perf instead of using unistd.h.

Signed-off-by: default avatarCharlie Jenkins <charlie@rivosinc.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-11-7543b5293098@rivosinc.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 02f2d58f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ $(call detected_var,SRCARCH)
ifneq ($(NO_SYSCALL_TABLE),1)
  NO_SYSCALL_TABLE := 1

  ifeq ($(SRCARCH),$(filter $(SRCARCH),powerpc arm64 s390 mips loongarch))
  ifeq ($(SRCARCH),$(filter $(SRCARCH),powerpc s390 mips loongarch))
    NO_SYSCALL_TABLE := 0
  endif

@@ -79,7 +79,6 @@ ifeq ($(SRCARCH),arm)
endif

ifeq ($(SRCARCH),arm64)
  CFLAGS += -I$(OUTPUT)arch/arm64/include/generated
  ifndef NO_LIBUNWIND
    LIBUNWIND_LIBS = -lunwind -lunwind-aarch64
  endif
+1 −1
Original line number Diff line number Diff line
@@ -311,7 +311,7 @@ FEATURE_TESTS := all
endif
endif
# architectures that use the generic syscall table
generic_syscall_table_archs := riscv arc csky arm sh sparc xtensa x86 alpha parisc
generic_syscall_table_archs := riscv arc csky arm sh sparc xtensa x86 alpha parisc arm64
ifneq ($(filter $(SRCARCH), $(generic_syscall_table_archs)),)
include $(srctree)/tools/perf/scripts/Makefile.syscalls
endif
+0 −22
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
PERF_HAVE_JITDUMP := 1
HAVE_KVM_STAT_SUPPORT := 1

#
# Syscall table generation for perf
#

out    := $(OUTPUT)arch/arm64/include/generated/asm
header := $(out)/syscalls.c
incpath := $(srctree)/tools
sysdef := $(srctree)/tools/arch/arm64/include/uapi/asm/unistd.h
sysprf := $(srctree)/tools/perf/arch/arm64/entry/syscalls/
systbl := $(sysprf)/mksyscalltbl

# Create output directory if not already present
$(shell [ -d '$(out)' ] || mkdir -p '$(out)')

$(header): $(sysdef) $(systbl)
	$(Q)$(SHELL) '$(systbl)' '$(CC)' '$(HOSTCC)' $(incpath) $(sysdef) > $@

clean::
	$(call QUIET_CLEAN, arm64) $(RM) $(header)

archheaders: $(header)
+3 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
syscall-y += syscalls_32.h
syscall-y += syscalls_64.h
+6 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0

syscall_abis_32 +=
syscall_abis_64 += renameat rlimit memfd_secret

syscalltbl = $(srctree)/tools/perf/arch/arm64/entry/syscalls/syscall_%.tbl
Loading