From: Nathan Lynch Date: Sat, 18 Oct 2014 19:00:23 +0000 (-0500) Subject: lttng-modules: fix build for non-x86 X-Git-Tag: v2.6.0-rc1~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8ba62b946eb4a337327ed41a241589820a3b9fcc;p=lttng-modules.git lttng-modules: fix build for non-x86 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 Signed-off-by: Mathieu Desnoyers --- 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 e575f6e0..d5af6d02 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 e5846df8..c01d3559 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 596104d9..bcf5662f 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 53f92dbf..f4c35c7e 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 6696f43b..c0aabbbc 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 fdff68e9..94b22fb3 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 */