1 #ifndef _TRACE_SYSCALL_H
2 #define _TRACE_SYSCALL_H
4 #include <linux/tracepoint.h>
6 #include <asm/ptrace.h>
9 extern void syscall_regfunc(void);
10 extern void syscall_unregfunc(void);
12 DECLARE_TRACE_WITH_CALLBACK(syscall_enter,
13 TP_PROTO(struct pt_regs *regs, long id),
19 DECLARE_TRACE_WITH_CALLBACK(syscall_exit,
20 TP_PROTO(struct pt_regs *regs, long ret),
27 * A syscall entry in the ftrace syscalls array.
29 * @name: name of the syscall
30 * @nb_args: number of parameters it takes
31 * @types: list of types as strings
32 * @args: list of args as strings (args[i] matches types[i])
34 struct syscall_metadata {
41 #ifdef CONFIG_FTRACE_SYSCALLS
42 extern struct syscall_metadata *syscall_nr_to_meta(int nr);
43 extern void start_ftrace_syscalls(void);
44 extern void stop_ftrace_syscalls(void);
45 extern void ftrace_syscall_enter(struct pt_regs *regs);
46 extern void ftrace_syscall_exit(struct pt_regs *regs);
48 static inline void start_ftrace_syscalls(void) { }
49 static inline void stop_ftrace_syscalls(void) { }
50 static inline void ftrace_syscall_enter(struct pt_regs *regs) { }
51 static inline void ftrace_syscall_exit(struct pt_regs *regs) { }
54 #endif /* _TRACE_SYSCALL_H */