Skip to contentSkip to conversation

perf trace arm64: Use generated syscall table

PATCH In review Kim Phillips 2 participants 2 messages Jul 6, 2018 – Jul 25, 2018 perf events

lore
Share & tools
lore
#0 lore raw

PATCH v3 3/3 perf trace arm64: Use generated syscall table

This should speed up accessing new system calls introduced with the kernel rather than waiting for libaudit updates to include them.

It also enables users to specify wildcards, for example, perf trace -e 'open*', just like was already possible on x86, s390, and powerpc, which means arm64 can now pass the "Check open filename arg using perf trace + vfs_getname" test.

Cc Ravi Bangoria <[email protected]>
Cc Alexander Shishkin <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Thomas Richter <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Arnaldo Carvalho de Melo <[email protected]>

---
Changes in V3:
- none

Changes in V2:
- added Hendrik Brueckner's Reviewed-by.

 tools/perf/Makefile.config   | 2 ++
 tools/perf/util/syscalltbl.c | 4 ++++
 2 files changed, 6 insertions(+)
tools/perf/Makefile.config +2 -0
index b5ac356ba323..3126155810bb 100644
@@ -54,6 +54,8 @@ 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
 
tools/perf/util/syscalltbl.c +4 -0
index 0ee7f568d60c..3393d7ee9401 100644
@@ -38,6 +38,10 @@ static const char **syscalltbl_native = syscalltbl_powerpc_64;
 #include <asm/syscalls_32.c>
 const int syscalltbl_native_max_id = SYSCALLTBL_POWERPC_32_MAX_ID;
 static const char **syscalltbl_native = syscalltbl_powerpc_32;
+#elif defined(__aarch64__)
+#include <asm/syscalls.c>
+const int syscalltbl_native_max_id = SYSCALLTBL_ARM64_MAX_ID;
+static const char **syscalltbl_native = syscalltbl_arm64;
 #endif
 
 struct syscall {
Signature · 1 line
2.17.1
#1 lore raw
perf trace arm64: Use generated syscall table
Commit-ID:  a7f660d6576a5f4504c8ab4f4956bba03d48bf52
Gitweb:     https://git.kernel.org/tip/a7f660d6576a5f4504c8ab4f4956bba03d48bf52
Author:     Kim Phillips <[email protected]>
AuthorDate: Fri, 6 Jul 2018 16:34:54 -0500
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 24 Jul 2018 14:53:01 -0300

perf trace arm64: Use generated syscall table

This should speed up accessing new system calls introduced with the kernel rather than waiting for libaudit updates to include them.

It also enables users to specify wildcards, for example, perf trace -e 'open*', just like was already possible on x86, s390, and powerpc, which means arm64 can now pass the "Check open filename arg using perf trace + vfs_getname" test.

---
 tools/perf/Makefile.config   | 2 ++
 tools/perf/util/syscalltbl.c | 4 ++++
 2 files changed, 6 insertions(+)
tools/perf/Makefile.config +2 -0
index f5a3b402589e..d3318f99006c 100644
@@ -54,6 +54,8 @@ 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
 
tools/perf/util/syscalltbl.c +4 -0
index 0ee7f568d60c..3393d7ee9401 100644
@@ -38,6 +38,10 @@ static const char **syscalltbl_native = syscalltbl_powerpc_64;
 #include <asm/syscalls_32.c>
 const int syscalltbl_native_max_id = SYSCALLTBL_POWERPC_32_MAX_ID;
 static const char **syscalltbl_native = syscalltbl_powerpc_32;
+#elif defined(__aarch64__)
+#include <asm/syscalls.c>
+const int syscalltbl_native_max_id = SYSCALLTBL_ARM64_MAX_ID;
+static const char **syscalltbl_native = syscalltbl_arm64;
 #endif
 
 struct syscall {