diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ftrace.h | 29 | ||||
-rw-r--r-- | include/linux/syscalls.h | 2 | ||||
-rw-r--r-- | include/trace/syscall.h | 35 |
3 files changed, 36 insertions, 30 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index ff112a872d75..8a0c2f221e6b 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -511,33 +511,4 @@ static inline void trace_hw_branch_oops(void) {} | |||
511 | 511 | ||
512 | #endif /* CONFIG_HW_BRANCH_TRACER */ | 512 | #endif /* CONFIG_HW_BRANCH_TRACER */ |
513 | 513 | ||
514 | /* | ||
515 | * A syscall entry in the ftrace syscalls array. | ||
516 | * | ||
517 | * @name: name of the syscall | ||
518 | * @nb_args: number of parameters it takes | ||
519 | * @types: list of types as strings | ||
520 | * @args: list of args as strings (args[i] matches types[i]) | ||
521 | */ | ||
522 | struct syscall_metadata { | ||
523 | const char *name; | ||
524 | int nb_args; | ||
525 | const char **types; | ||
526 | const char **args; | ||
527 | }; | ||
528 | |||
529 | #ifdef CONFIG_FTRACE_SYSCALLS | ||
530 | extern void arch_init_ftrace_syscalls(void); | ||
531 | extern struct syscall_metadata *syscall_nr_to_meta(int nr); | ||
532 | extern void start_ftrace_syscalls(void); | ||
533 | extern void stop_ftrace_syscalls(void); | ||
534 | extern void ftrace_syscall_enter(struct pt_regs *regs); | ||
535 | extern void ftrace_syscall_exit(struct pt_regs *regs); | ||
536 | #else | ||
537 | static inline void start_ftrace_syscalls(void) { } | ||
538 | static inline void stop_ftrace_syscalls(void) { } | ||
539 | static inline void ftrace_syscall_enter(struct pt_regs *regs) { } | ||
540 | static inline void ftrace_syscall_exit(struct pt_regs *regs) { } | ||
541 | #endif | ||
542 | |||
543 | #endif /* _LINUX_FTRACE_H */ | 514 | #endif /* _LINUX_FTRACE_H */ |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 6470f74074af..dabe4ad89141 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -65,7 +65,7 @@ struct old_linux_dirent; | |||
65 | #include <asm/signal.h> | 65 | #include <asm/signal.h> |
66 | #include <linux/quota.h> | 66 | #include <linux/quota.h> |
67 | #include <linux/key.h> | 67 | #include <linux/key.h> |
68 | #include <linux/ftrace.h> | 68 | #include <trace/syscall.h> |
69 | 69 | ||
70 | #define __SC_DECL1(t1, a1) t1 a1 | 70 | #define __SC_DECL1(t1, a1) t1 a1 |
71 | #define __SC_DECL2(t2, a2, ...) t2 a2, __SC_DECL1(__VA_ARGS__) | 71 | #define __SC_DECL2(t2, a2, ...) t2 a2, __SC_DECL1(__VA_ARGS__) |
diff --git a/include/trace/syscall.h b/include/trace/syscall.h new file mode 100644 index 000000000000..8cfe515cbc47 --- /dev/null +++ b/include/trace/syscall.h | |||
@@ -0,0 +1,35 @@ | |||
1 | #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 | */ | ||
14 | struct 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 | ||
22 | extern void arch_init_ftrace_syscalls(void); | ||
23 | extern struct syscall_metadata *syscall_nr_to_meta(int nr); | ||
24 | extern void start_ftrace_syscalls(void); | ||
25 | extern void stop_ftrace_syscalls(void); | ||
26 | extern void ftrace_syscall_enter(struct pt_regs *regs); | ||
27 | extern void ftrace_syscall_exit(struct pt_regs *regs); | ||
28 | #else | ||
29 | static inline void start_ftrace_syscalls(void) { } | ||
30 | static inline void stop_ftrace_syscalls(void) { } | ||
31 | static inline void ftrace_syscall_enter(struct pt_regs *regs) { } | ||
32 | static inline void ftrace_syscall_exit(struct pt_regs *regs) { } | ||
33 | #endif | ||
34 | |||
35 | #endif /* _TRACE_SYSCALL_H */ | ||