diff options
author | David S. Miller <davem@davemloft.net> | 2009-09-11 23:35:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-11 23:35:13 -0400 |
commit | cabc5c0f7fa1342049042d6e147db5a73773955b (patch) | |
tree | 2be09ae1777d580c7dfe05d6d5b76e57281ec447 /include/trace/syscall.h | |
parent | b73d884756303316ead4cd7dad51236b2a515a1a (diff) | |
parent | 86d710146fb9975f04c505ec78caa43d227c1018 (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
arch/sparc/Kconfig
Diffstat (limited to 'include/trace/syscall.h')
-rw-r--r-- | include/trace/syscall.h | 48 |
1 files changed, 38 insertions, 10 deletions
diff --git a/include/trace/syscall.h b/include/trace/syscall.h index 8cfe515cbc47..5dc283ba5ae0 100644 --- a/include/trace/syscall.h +++ b/include/trace/syscall.h | |||
@@ -1,8 +1,13 @@ | |||
1 | #ifndef _TRACE_SYSCALL_H | 1 | #ifndef _TRACE_SYSCALL_H |
2 | #define _TRACE_SYSCALL_H | 2 | #define _TRACE_SYSCALL_H |
3 | 3 | ||
4 | #include <linux/tracepoint.h> | ||
5 | #include <linux/unistd.h> | ||
6 | #include <linux/ftrace_event.h> | ||
7 | |||
4 | #include <asm/ptrace.h> | 8 | #include <asm/ptrace.h> |
5 | 9 | ||
10 | |||
6 | /* | 11 | /* |
7 | * A syscall entry in the ftrace syscalls array. | 12 | * A syscall entry in the ftrace syscalls array. |
8 | * | 13 | * |
@@ -10,26 +15,49 @@ | |||
10 | * @nb_args: number of parameters it takes | 15 | * @nb_args: number of parameters it takes |
11 | * @types: list of types as strings | 16 | * @types: list of types as strings |
12 | * @args: list of args as strings (args[i] matches types[i]) | 17 | * @args: list of args as strings (args[i] matches types[i]) |
18 | * @enter_id: associated ftrace enter event id | ||
19 | * @exit_id: associated ftrace exit event id | ||
20 | * @enter_event: associated syscall_enter trace event | ||
21 | * @exit_event: associated syscall_exit trace event | ||
13 | */ | 22 | */ |
14 | struct syscall_metadata { | 23 | struct syscall_metadata { |
15 | const char *name; | 24 | const char *name; |
16 | int nb_args; | 25 | int nb_args; |
17 | const char **types; | 26 | const char **types; |
18 | const char **args; | 27 | const char **args; |
28 | int enter_id; | ||
29 | int exit_id; | ||
30 | |||
31 | struct ftrace_event_call *enter_event; | ||
32 | struct ftrace_event_call *exit_event; | ||
19 | }; | 33 | }; |
20 | 34 | ||
21 | #ifdef CONFIG_FTRACE_SYSCALLS | 35 | #ifdef CONFIG_FTRACE_SYSCALLS |
22 | extern void arch_init_ftrace_syscalls(void); | ||
23 | extern struct syscall_metadata *syscall_nr_to_meta(int nr); | 36 | extern struct syscall_metadata *syscall_nr_to_meta(int nr); |
24 | extern void start_ftrace_syscalls(void); | 37 | extern int syscall_name_to_nr(char *name); |
25 | extern void stop_ftrace_syscalls(void); | 38 | void set_syscall_enter_id(int num, int id); |
26 | extern void ftrace_syscall_enter(struct pt_regs *regs); | 39 | void set_syscall_exit_id(int num, int id); |
27 | extern void ftrace_syscall_exit(struct pt_regs *regs); | 40 | extern struct trace_event event_syscall_enter; |
28 | #else | 41 | extern struct trace_event event_syscall_exit; |
29 | static inline void start_ftrace_syscalls(void) { } | 42 | extern int reg_event_syscall_enter(void *ptr); |
30 | static inline void stop_ftrace_syscalls(void) { } | 43 | extern void unreg_event_syscall_enter(void *ptr); |
31 | static inline void ftrace_syscall_enter(struct pt_regs *regs) { } | 44 | extern int reg_event_syscall_exit(void *ptr); |
32 | static inline void ftrace_syscall_exit(struct pt_regs *regs) { } | 45 | extern void unreg_event_syscall_exit(void *ptr); |
46 | extern int syscall_enter_format(struct ftrace_event_call *call, | ||
47 | struct trace_seq *s); | ||
48 | extern int syscall_exit_format(struct ftrace_event_call *call, | ||
49 | struct trace_seq *s); | ||
50 | extern int syscall_enter_define_fields(struct ftrace_event_call *call); | ||
51 | extern int syscall_exit_define_fields(struct ftrace_event_call *call); | ||
52 | enum print_line_t print_syscall_enter(struct trace_iterator *iter, int flags); | ||
53 | enum print_line_t print_syscall_exit(struct trace_iterator *iter, int flags); | ||
54 | #endif | ||
55 | #ifdef CONFIG_EVENT_PROFILE | ||
56 | int reg_prof_syscall_enter(char *name); | ||
57 | void unreg_prof_syscall_enter(char *name); | ||
58 | int reg_prof_syscall_exit(char *name); | ||
59 | void unreg_prof_syscall_exit(char *name); | ||
60 | |||
33 | #endif | 61 | #endif |
34 | 62 | ||
35 | #endif /* _TRACE_SYSCALL_H */ | 63 | #endif /* _TRACE_SYSCALL_H */ |