[lttng-dev] [PATCH] lttng-modules: fix build for non-x86

Nathan Lynch nathan_lynch at mentor.com
Sat Oct 18 15:00:23 EDT 2014


Since commit 644d6e9c2807041db2b4fd9c3350d4fa243060b1 "Remove sys_
prefix from syscall names" the build has been broken for non-x86
architectures.

Remove the sys_ prefix from syscall names and related macros as has
already been done for x86.

Correct "OVVERRIDE" typo in arm and powerpc headers while we're at it.

Successfully built against v3.17 for 32- and 64-bit mips and powerpc;
runtime tested on arm, verifying that mmap2, execve, and clone syscall
events are captured.

Signed-off-by: Nathan Lynch <nathan_lynch at mentor.com>
---
 .../arm-32-syscalls-3.4.25_integers_override.h       | 20 ++++++++++----------
 .../arm-32-syscalls-3.4.25_pointers_override.h       | 16 ++++++++--------
 .../mips-32-syscalls-3.13.0_pointers_override.h      |  4 ++--
 .../mips-64-syscalls-3.5.0_pointers_override.h       |  2 +-
 .../powerpc-32-syscalls-3.0.34_integers_override.h   |  4 ++--
 .../powerpc-32-syscalls-3.0.34_pointers_override.h   | 16 ++++++++--------
 6 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_integers_override.h b/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_integers_override.h
index e575f6e03e7e..d5af6d028813 100644
--- a/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_integers_override.h
+++ b/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_integers_override.h
@@ -1,11 +1,11 @@
 
 
-#define OVERRIDE_TABLE_32_sys_arm_fadvise64_64
-#define OVERRIDE_TABLE_32_sys_sync_file_range2
+#define OVERRIDE_TABLE_32_arm_fadvise64_64
+#define OVERRIDE_TABLE_32_sync_file_range2
 
 #ifndef CREATE_SYSCALL_TABLE
 
-SC_LTTNG_TRACEPOINT_EVENT(sys_arm_fadvise64_64,
+SC_LTTNG_TRACEPOINT_EVENT(arm_fadvise64_64,
 	TP_PROTO(int fd, int advice, loff_t offset, loff_t len),
 	TP_ARGS(fd, advice, offset, len),
 	TP_STRUCT__entry(
@@ -21,7 +21,7 @@ SC_LTTNG_TRACEPOINT_EVENT(sys_arm_fadvise64_64,
 	TP_printk()
 )
 
-SC_LTTNG_TRACEPOINT_EVENT(sys_sync_file_range2,
+SC_LTTNG_TRACEPOINT_EVENT(sync_file_range2,
 	TP_PROTO(int fd, loff_t offset, loff_t nbytes, unsigned int flags),
 	TP_ARGS(fd, offset, nbytes, flags),
 	TP_STRUCT__entry(
@@ -39,13 +39,13 @@ SC_LTTNG_TRACEPOINT_EVENT(sys_sync_file_range2,
 
 #else	/* CREATE_SYSCALL_TABLE */
 
-#define OVVERRIDE_TABLE_32_sys_mmap
-TRACE_SYSCALL_TABLE(sys_mmap, sys_mmap, 90, 6)
+#define OVERRIDE_TABLE_32_mmap
+TRACE_SYSCALL_TABLE(mmap, mmap, 90, 6)
 
-#define OVERRIDE_TABLE_32_sys_arm_fadvise64_64
-TRACE_SYSCALL_TABLE(sys_arm_fadvise64_64, sys_arm_fadvise64_64, 270, 4)
-#define OVERRIDE_TABLE_32_sys_sync_file_range2
-TRACE_SYSCALL_TABLE(sys_sync_file_range2, sys_sync_file_range2, 341, 4)
+#define OVERRIDE_TABLE_32_arm_fadvise64_64
+TRACE_SYSCALL_TABLE(arm_fadvise64_64, arm_fadvise64_64, 270, 4)
+#define OVERRIDE_TABLE_32_sync_file_range2
+TRACE_SYSCALL_TABLE(sync_file_range2, sync_file_range2, 341, 4)
 
 #endif /* CREATE_SYSCALL_TABLE */
 
diff --git a/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_pointers_override.h b/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_pointers_override.h
index e5846df88dae..c01d355948c8 100644
--- a/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_pointers_override.h
+++ b/instrumentation/syscalls/headers/arm-32-syscalls-3.4.25_pointers_override.h
@@ -1,10 +1,10 @@
 
-#define OVERRIDE_TABLE_32_sys_mmap2
+#define OVERRIDE_TABLE_32_mmap2
 
 
 #ifndef CREATE_SYSCALL_TABLE
 
-SC_LTTNG_TRACEPOINT_EVENT(sys_mmap2,
+SC_LTTNG_TRACEPOINT_EVENT(mmap2,
 	TP_PROTO(void *addr, size_t len, int prot,
                  int flags, int fd, off_t pgoff),
 	TP_ARGS(addr, len, prot, flags, fd, pgoff),
@@ -27,12 +27,12 @@ SC_LTTNG_TRACEPOINT_EVENT(sys_mmap2,
 
 #else	/* CREATE_SYSCALL_TABLE */
 
-#define OVERRIDE_TABLE_32_sys_execve
-TRACE_SYSCALL_TABLE(sys_execve, sys_execve, 11, 3)
-#define OVERRIDE_TABLE_32_sys_clone
-TRACE_SYSCALL_TABLE(sys_clone, sys_clone, 120, 5)
-#define OVERRIDE_TABLE_32_sys_mmap2
-TRACE_SYSCALL_TABLE(sys_mmap2, sys_mmap2, 192, 6)
+#define OVERRIDE_TABLE_32_execve
+TRACE_SYSCALL_TABLE(execve, execve, 11, 3)
+#define OVERRIDE_TABLE_32_clone
+TRACE_SYSCALL_TABLE(clone, clone, 120, 5)
+#define OVERRIDE_TABLE_32_mmap2
+TRACE_SYSCALL_TABLE(mmap2, mmap2, 192, 6)
 
 #endif /* CREATE_SYSCALL_TABLE */
 
diff --git a/instrumentation/syscalls/headers/mips-32-syscalls-3.13.0_pointers_override.h b/instrumentation/syscalls/headers/mips-32-syscalls-3.13.0_pointers_override.h
index 596104d9772b..bcf5662f3a90 100644
--- a/instrumentation/syscalls/headers/mips-32-syscalls-3.13.0_pointers_override.h
+++ b/instrumentation/syscalls/headers/mips-32-syscalls-3.13.0_pointers_override.h
@@ -2,7 +2,7 @@
 
 #else	/* CREATE_SYSCALL_TABLE */
 
-#define OVERRIDE_TABLE_32_sys_clone
-TRACE_SYSCALL_TABLE(sys_clone, sys_clone, 4120, 0)
+#define OVERRIDE_TABLE_32_clone
+TRACE_SYSCALL_TABLE(clone, clone, 4120, 0)
 
 #endif /* CREATE_SYSCALL_TABLE */
diff --git a/instrumentation/syscalls/headers/mips-64-syscalls-3.5.0_pointers_override.h b/instrumentation/syscalls/headers/mips-64-syscalls-3.5.0_pointers_override.h
index 53f92dbf446c..f4c35c7e702d 100644
--- a/instrumentation/syscalls/headers/mips-64-syscalls-3.5.0_pointers_override.h
+++ b/instrumentation/syscalls/headers/mips-64-syscalls-3.5.0_pointers_override.h
@@ -3,6 +3,6 @@
 #else	/* CREATE_SYSCALL_TABLE */
 
 #define OVERRIDE_TABLE_64_sys_clone
-TRACE_SYSCALL_TABLE(sys_clone, sys_clone, 5055, 0)
+TRACE_SYSCALL_TABLE(clone, clone, 5055, 0)
 
 #endif /* CREATE_SYSCALL_TABLE */
diff --git a/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_integers_override.h b/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_integers_override.h
index 6696f43b4364..c0aabbbc0ecd 100644
--- a/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_integers_override.h
+++ b/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_integers_override.h
@@ -2,8 +2,8 @@
 
 #else	/* CREATE_SYSCALL_TABLE */
 
-#define OVVERRIDE_TABLE_32_sys_mmap
-TRACE_SYSCALL_TABLE(sys_mmap, sys_mmap, 90, 6)
+#define OVERRIDE_TABLE_32_mmap
+TRACE_SYSCALL_TABLE(mmap, mmap, 90, 6)
 
 #endif /* CREATE_SYSCALL_TABLE */
 
diff --git a/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_pointers_override.h b/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_pointers_override.h
index fdff68e9d93a..94b22fb3bc0b 100644
--- a/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_pointers_override.h
+++ b/instrumentation/syscalls/headers/powerpc-32-syscalls-3.0.34_pointers_override.h
@@ -1,8 +1,8 @@
-#define OVERRIDE_TABLE_32_sys_mmap2
+#define OVERRIDE_TABLE_32_mmap2
 
 #ifndef CREATE_SYSCALL_TABLE
 
-SC_LTTNG_TRACEPOINT_EVENT(sys_mmap2,
+SC_LTTNG_TRACEPOINT_EVENT(mmap2,
 	TP_PROTO(void *addr, size_t len, int prot,
                  int flags, int fd, off_t pgoff),
 	TP_ARGS(addr, len, prot, flags, fd, pgoff),
@@ -25,12 +25,12 @@ SC_LTTNG_TRACEPOINT_EVENT(sys_mmap2,
 
 #else	/* CREATE_SYSCALL_TABLE */
 
-#define OVERRIDE_TABLE_32_sys_execve
-TRACE_SYSCALL_TABLE(sys_execve, sys_execve, 11, 3)
-#define OVERRIDE_TABLE_32_sys_clone
-TRACE_SYSCALL_TABLE(sys_clone, sys_clone, 120, 5)
-#define OVERRIDE_TABLE_32_sys_mmap2
-TRACE_SYSCALL_TABLE(sys_mmap2, sys_mmap2, 192, 6)
+#define OVERRIDE_TABLE_32_execve
+TRACE_SYSCALL_TABLE(execve, execve, 11, 3)
+#define OVERRIDE_TABLE_32_clone
+TRACE_SYSCALL_TABLE(clone, clone, 120, 5)
+#define OVERRIDE_TABLE_32_mmap2
+TRACE_SYSCALL_TABLE(mmap2, mmap2, 192, 6)
 
 #endif /* CREATE_SYSCALL_TABLE */
 
-- 
1.9.3




More information about the lttng-dev mailing list