2 #define TRACE_SYSTEM syscalls
4 #if !defined(_TRACE_EVENTS_SYSCALLS_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_EVENTS_SYSCALLS_H
7 #include <linux/tracepoint.h>
9 #include <asm/ptrace.h>
10 #include <asm/syscall.h>
13 #ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS
15 extern void syscall_regfunc(void);
16 extern void syscall_unregfunc(void);
18 TRACE_EVENT_FN(sys_enter
,
20 TP_PROTO(struct pt_regs
*regs
, long id
),
26 __array( unsigned long, args
, 6 )
31 syscall_get_arguments(current
, regs
, 0, 6, __entry
->args
);
34 TP_printk("NR %ld (%lx, %lx, %lx, %lx, %lx, %lx)",
36 __entry
->args
[0], __entry
->args
[1], __entry
->args
[2],
37 __entry
->args
[3], __entry
->args
[4], __entry
->args
[5]),
39 syscall_regfunc
, syscall_unregfunc
42 TRACE_EVENT_FN(sys_exit
,
44 TP_PROTO(struct pt_regs
*regs
, long ret
),
54 __entry
->id
= syscall_get_nr(current
, regs
);
58 TP_printk("NR %ld = %ld",
59 __entry
->id
, __entry
->ret
),
61 syscall_regfunc
, syscall_unregfunc
64 #endif /* CONFIG_HAVE_SYSCALL_TRACEPOINTS */
66 #endif /* _TRACE_EVENTS_SYSCALLS_H */
68 /* This part must be outside protection */
69 #include <trace/define_trace.h>