diff options
author | Jason Baron <jbaron@redhat.com> | 2009-08-10 16:52:47 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-08-11 14:35:28 -0400 |
commit | fb34a08c3469b2be9eae626ccb96476b4687b810 (patch) | |
tree | f308cd109de2c967a1f8bd485eb9c398992a9414 /include/trace | |
parent | 69fd4f0eb2ececbf8ade55e31a933e174965745e (diff) |
tracing: Add trace events for each syscall entry/exit
Layer Frederic's syscall tracer on tracepoints. We create trace events
via hooking into the SYSCALL_DEFINE macros. This allows us to
individually toggle syscall entry and exit points on/off.
Signed-off-by: Jason Baron <jbaron@redhat.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Jiaying Zhang <jiayingz@google.com>
Cc: Martin Bligh <mbligh@google.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/syscall.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/include/trace/syscall.h b/include/trace/syscall.h index 3951d774de18..73fb8b4a9955 100644 --- a/include/trace/syscall.h +++ b/include/trace/syscall.h | |||
@@ -2,6 +2,8 @@ | |||
2 | #define _TRACE_SYSCALL_H | 2 | #define _TRACE_SYSCALL_H |
3 | 3 | ||
4 | #include <linux/tracepoint.h> | 4 | #include <linux/tracepoint.h> |
5 | #include <linux/unistd.h> | ||
6 | #include <linux/ftrace_event.h> | ||
5 | 7 | ||
6 | #include <asm/ptrace.h> | 8 | #include <asm/ptrace.h> |
7 | 9 | ||
@@ -40,15 +42,13 @@ struct syscall_metadata { | |||
40 | 42 | ||
41 | #ifdef CONFIG_FTRACE_SYSCALLS | 43 | #ifdef CONFIG_FTRACE_SYSCALLS |
42 | extern struct syscall_metadata *syscall_nr_to_meta(int nr); | 44 | extern struct syscall_metadata *syscall_nr_to_meta(int nr); |
43 | extern void start_ftrace_syscalls(void); | 45 | extern int syscall_name_to_nr(char *name); |
44 | extern void stop_ftrace_syscalls(void); | 46 | extern struct trace_event event_syscall_enter; |
45 | extern void ftrace_syscall_enter(struct pt_regs *regs); | 47 | extern struct trace_event event_syscall_exit; |
46 | extern void ftrace_syscall_exit(struct pt_regs *regs); | 48 | extern int reg_event_syscall_enter(void *ptr); |
47 | #else | 49 | extern void unreg_event_syscall_enter(void *ptr); |
48 | static inline void start_ftrace_syscalls(void) { } | 50 | extern int reg_event_syscall_exit(void *ptr); |
49 | static inline void stop_ftrace_syscalls(void) { } | 51 | extern void unreg_event_syscall_exit(void *ptr); |
50 | static inline void ftrace_syscall_enter(struct pt_regs *regs) { } | ||
51 | static inline void ftrace_syscall_exit(struct pt_regs *regs) { } | ||
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | #endif /* _TRACE_SYSCALL_H */ | 54 | #endif /* _TRACE_SYSCALL_H */ |