summaryrefslogtreecommitdiff
path: root/include/trace/syscall.h
diff options
context:
space:
mode:
authorJason Baron <jbaron@redhat.com>2009-08-10 16:52:31 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2009-08-11 20:35:26 +0200
commita871bd33a6c0bc86fb47cd02ea2650dd43d3d95f (patch)
treeb5720cdb3168ba0894b4bd2c1acc004cb19a692c /include/trace/syscall.h
parent63fbdab3157b72467013fe4dcf88c85e45280ef7 (diff)
tracing: Add syscall tracepoints
add two tracepoints in syscall exit and entry path, conditioned on TIF_SYSCALL_FTRACE. Supports the syscall trace event code. 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/syscall.h')
-rw-r--r--include/trace/syscall.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/trace/syscall.h b/include/trace/syscall.h
index c55fcce4fbb2..3951d774de18 100644
--- a/include/trace/syscall.h
+++ b/include/trace/syscall.h
@@ -1,8 +1,28 @@
#ifndef _TRACE_SYSCALL_H
#define _TRACE_SYSCALL_H
+#include <linux/tracepoint.h>
+
#include <asm/ptrace.h>
+
+extern void syscall_regfunc(void);
+extern void syscall_unregfunc(void);
+
+DECLARE_TRACE_WITH_CALLBACK(syscall_enter,
+ TP_PROTO(struct pt_regs *regs, long id),
+ TP_ARGS(regs, id),
+ syscall_regfunc,
+ syscall_unregfunc
+);
+
+DECLARE_TRACE_WITH_CALLBACK(syscall_exit,
+ TP_PROTO(struct pt_regs *regs, long ret),
+ TP_ARGS(regs, ret),
+ syscall_regfunc,
+ syscall_unregfunc
+);
+
/*
* A syscall entry in the ftrace syscalls array.
*