2 #define TRACE_SYSTEM raw_syscalls
3 #define TRACE_INCLUDE_FILE syscalls
5 #if !defined(_TRACE_EVENTS_SYSCALLS_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_EVENTS_SYSCALLS_H
8 #include <linux/tracepoint.h>
10 #include <asm/ptrace.h>
11 #include <asm/syscall.h>
14 #ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
16 extern void syscall_regfunc(void);
17 extern void syscall_unregfunc(void);
19 TRACE_EVENT_FN(sys_enter
,
21 TP_PROTO(struct pt_regs
*regs
, long id
),
27 __array( unsigned long, args
, 6 )
32 syscall_get_arguments(current
, regs
, 0, 6, __entry
->args
);
35 TP_printk("NR %ld (%lx, %lx, %lx, %lx, %lx, %lx)",
37 __entry
->args
[0], __entry
->args
[1], __entry
->args
[2],
38 __entry
->args
[3], __entry
->args
[4], __entry
->args
[5]),
40 syscall_regfunc
, syscall_unregfunc
43 TRACE_EVENT_FLAGS(sys_enter
, TRACE_EVENT_FL_CAP_ANY
)
45 TRACE_EVENT_FN(sys_exit
,
47 TP_PROTO(struct pt_regs
*regs
, long ret
),
57 __entry
->id
= syscall_get_nr(current
, regs
);
61 TP_printk("NR %ld = %ld",
62 __entry
->id
, __entry
->ret
),
64 syscall_regfunc
, syscall_unregfunc
67 TRACE_EVENT_FLAGS(sys_exit
, TRACE_EVENT_FL_CAP_ANY
)
69 #endif /* CONFIG_HAVE_SYSCALL_TRACEPOINTS */
71 #endif /* _TRACE_EVENTS_SYSCALLS_H */
73 /* This part must be outside protection */
74 #include <trace/define_trace.h>