blob: c55fcce4fbb2307708202d4decc3a6932fec23da [file] [log] [blame]
Frederic Weisbecker47788c52009-04-08 20:40:59 +02001#ifndef _TRACE_SYSCALL_H
2#define _TRACE_SYSCALL_H
3
4#include <asm/ptrace.h>
5
6/*
7 * A syscall entry in the ftrace syscalls array.
8 *
9 * @name: name of the syscall
10 * @nb_args: number of parameters it takes
11 * @types: list of types as strings
12 * @args: list of args as strings (args[i] matches types[i])
13 */
14struct syscall_metadata {
15 const char *name;
16 int nb_args;
17 const char **types;
18 const char **args;
19};
20
21#ifdef CONFIG_FTRACE_SYSCALLS
Frederic Weisbecker47788c52009-04-08 20:40:59 +020022extern struct syscall_metadata *syscall_nr_to_meta(int nr);
23extern void start_ftrace_syscalls(void);
24extern void stop_ftrace_syscalls(void);
25extern void ftrace_syscall_enter(struct pt_regs *regs);
26extern void ftrace_syscall_exit(struct pt_regs *regs);
27#else
28static inline void start_ftrace_syscalls(void) { }
29static inline void stop_ftrace_syscalls(void) { }
30static inline void ftrace_syscall_enter(struct pt_regs *regs) { }
31static inline void ftrace_syscall_exit(struct pt_regs *regs) { }
32#endif
33
34#endif /* _TRACE_SYSCALL_H */