From: Mathieu Desnoyers Date: Thu, 16 Feb 2012 02:48:30 +0000 (-0500) Subject: Add sys_clone x86 instrumentation X-Git-Tag: v2.0-pre14~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ba21566bd4d49e97184ac34bec82a95f47da28b4;p=lttng-modules.git Add sys_clone x86 instrumentation Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/syscalls/headers/syscalls_pointers_override.h b/instrumentation/syscalls/headers/syscalls_pointers_override.h index b52b00bc..f268ce16 100644 --- a/instrumentation/syscalls/headers/syscalls_pointers_override.h +++ b/instrumentation/syscalls/headers/syscalls_pointers_override.h @@ -15,4 +15,23 @@ SC_TRACE_EVENT(sys_execve, TP_printk() ) +SC_TRACE_EVENT(sys_clone, + TP_PROTO(unsigned long clone_flags, unsigned long newsp, + void __user *parent_tid, + void __user *child_tid, + struct pt_regs *regs), + TP_ARGS(clone_flags, newsp, parent_tid, child_tid, regs), + TP_STRUCT__entry( + __field_hex(unsigned long, clone_flags) + __field_hex(unsigned long, newsp) + __field_hex(void *, parent_tid) + __field_hex(void *, child_tid)), + TP_fast_assign( + tp_assign(clone_flags, clone_flags) + tp_assign(newsp, newsp) + tp_assign(parent_tid, parent_tid) + tp_assign(child_tid, child_tid)), + TP_printk() +) + #endif /* CREATE_SYSCALL_TABLE */ diff --git a/instrumentation/syscalls/headers/x86-32-syscalls-3.1.0-rc6_pointers_override.h b/instrumentation/syscalls/headers/x86-32-syscalls-3.1.0-rc6_pointers_override.h index b7ed5fca..9d6d7af8 100644 --- a/instrumentation/syscalls/headers/x86-32-syscalls-3.1.0-rc6_pointers_override.h +++ b/instrumentation/syscalls/headers/x86-32-syscalls-3.1.0-rc6_pointers_override.h @@ -23,6 +23,8 @@ #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) #endif /* CREATE_SYSCALL_TABLE */ diff --git a/instrumentation/syscalls/headers/x86-64-syscalls-3.0.4_pointers_override.h b/instrumentation/syscalls/headers/x86-64-syscalls-3.0.4_pointers_override.h index e993ebd6..b6b853fd 100644 --- a/instrumentation/syscalls/headers/x86-64-syscalls-3.0.4_pointers_override.h +++ b/instrumentation/syscalls/headers/x86-64-syscalls-3.0.4_pointers_override.h @@ -2,6 +2,8 @@ #else /* CREATE_SYSCALL_TABLE */ +#define OVERRIDE_TABLE_64_sys_clone +TRACE_SYSCALL_TABLE(sys_clone, sys_clone, 56, 5) #define OVERRIDE_TABLE_64_sys_execve TRACE_SYSCALL_TABLE(sys_execve, sys_execve, 59, 3)