syscall: extract pipe and pipe2 output args
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 21 Jul 2014 01:04:04 +0000 (21:04 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 26 Sep 2014 16:09:59 +0000 (12:09 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/syscalls/headers/syscalls_pointers_override.h

index 316b3d2008117242f7ef1828fc68eb25158b568b..b375395dde5ec1f1078b74e7fc4b334453245342 100644 (file)
@@ -56,4 +56,34 @@ SC_TRACE_EVENT(getcpu,
        TP_printk()
 )
 
+#define OVERRIDE_32_pipe
+#define OVERRIDE_64_pipe
+SC_TRACE_EVENT(pipe,
+       TP_PROTO(sc_exit(long ret,) int * fildes),
+       TP_ARGS(sc_exit(ret,) fildes),
+       TP_STRUCT__entry(sc_exit(__field(long, ret))
+               sc_out(__array(int, fildes, 2))
+       ),
+       TP_fast_assign(sc_exit(tp_assign(ret, ret))
+               sc_out(tp_memcpy_from_user(fildes, fildes, 2))
+       ),
+       TP_printk()
+)
+
+#define OVERRIDE_32_pipe2
+#define OVERRIDE_64_pipe2
+SC_TRACE_EVENT(pipe2,
+       TP_PROTO(sc_exit(long ret,) int * fildes, int flags),
+       TP_ARGS(sc_exit(ret,) fildes, flags),
+       TP_STRUCT__entry(sc_exit(__field(long, ret))
+               sc_out(__array(int, fildes, 2))
+               sc_in(__field(int, flags))
+       ),
+       TP_fast_assign(sc_exit(tp_assign(ret, ret))
+               sc_out(tp_memcpy_from_user(fildes, fildes, 2))
+               sc_in(tp_assign(flags, flags))
+       ),
+       TP_printk()
+)
+
 #endif /* CREATE_SYSCALL_TABLE */
This page took 0.025289 seconds and 4 git commands to generate.