2 #define TRACE_SYSTEM raw_syscalls
3 #undef TRACE_INCLUDE_FILE
4 #define TRACE_INCLUDE_FILE syscalls
6 #if !defined(_TRACE_EVENTS_SYSCALLS_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define _TRACE_EVENTS_SYSCALLS_H
9 #include <linux/tracepoint.h>
11 #include <asm/ptrace.h>
12 #include <asm/syscall.h>
15 #ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
17 TRACE_EVENT_FN(sys_enter
,
19 TP_PROTO(struct pt_regs
*regs
, long id
),
25 __array( unsigned long, args
, 6 )
30 syscall_get_arguments(current
, regs
, 0, 6, __entry
->args
);
33 TP_printk("NR %ld (%lx, %lx, %lx, %lx, %lx, %lx)",
35 __entry
->args
[0], __entry
->args
[1], __entry
->args
[2],
36 __entry
->args
[3], __entry
->args
[4], __entry
->args
[5]),
38 syscall_regfunc
, syscall_unregfunc
41 TRACE_EVENT_FLAGS(sys_enter
, TRACE_EVENT_FL_CAP_ANY
)
43 TRACE_EVENT_FN(sys_exit
,
45 TP_PROTO(struct pt_regs
*regs
, long ret
),
55 __entry
->id
= syscall_get_nr(current
, regs
);
59 TP_printk("NR %ld = %ld",
60 __entry
->id
, __entry
->ret
),
62 syscall_regfunc
, syscall_unregfunc
65 TRACE_EVENT_FLAGS(sys_exit
, TRACE_EVENT_FL_CAP_ANY
)
67 #endif /* CONFIG_HAVE_SYSCALL_TRACEPOINTS */
69 #endif /* _TRACE_EVENTS_SYSCALLS_H */
71 /* This part must be outside protection */
72 #include <trace/define_trace.h>