From: Mathieu Desnoyers Date: Mon, 19 Sep 2011 14:30:41 +0000 (-0400) Subject: Create override for sys_mmap X-Git-Tag: v2.0-pre9~30 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=974a27a60b6a63fe8064555f3ae053272af662de;p=lttng-modules.git Create override for sys_mmap based on mmap(2). Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/syscalls/headers/x86-64-syscalls-3.0.4_integers_override.h b/instrumentation/syscalls/headers/x86-64-syscalls-3.0.4_integers_override.h index 0cdb32a1..3c809254 100644 --- a/instrumentation/syscalls/headers/x86-64-syscalls-3.0.4_integers_override.h +++ b/instrumentation/syscalls/headers/x86-64-syscalls-3.0.4_integers_override.h @@ -1,5 +1,21 @@ +#define OVERRIDE_sys_mmap + #ifndef CREATE_SYSCALL_TABLE + +TRACE_EVENT(sys_mmap, + TP_PROTO(unsigned long addr, unsigned long len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long off), + TP_ARGS(addr, len, prot, flags, fd, off), + TP_STRUCT__entry(__field_hex(unsigned long, addr) __field(size_t, len) __field(int, prot) __field(int, flags) __field(int, fd) __field(off_t, offset)), + TP_fast_assign(tp_assign(addr, addr) tp_assign(len, len) tp_assign(prot, prot) tp_assign(flags, flags) tp_assign(fd, fd) tp_assign(offset, off)), + TP_printk() +) + + #else /* CREATE_SYSCALL_TABLE */ + +TRACE_SYSCALL_TABLE(sys_mmap, sys_mmap, 9, 6) + + #endif /* CREATE_SYSCALL_TABLE */