diff options
author | David S. Miller <davem@davemloft.net> | 2009-12-11 03:44:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-11 03:44:47 -0500 |
commit | c658ad1b4e1520511da8323aa5e60d444cc303ed (patch) | |
tree | 7e2ce4179ecfdb0e10caa7c69fa86857c0398bf4 /arch/sparc/kernel/ptrace_64.c | |
parent | 4d14a459857bd151ecbd14bcd37b4628da00792b (diff) |
sparc64: Add syscall tracepoint support.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/ptrace_64.c')
-rw-r--r-- | arch/sparc/kernel/ptrace_64.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c index 4ae91dc2feb9..2f6524d1a817 100644 --- a/arch/sparc/kernel/ptrace_64.c +++ b/arch/sparc/kernel/ptrace_64.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/signal.h> | 23 | #include <linux/signal.h> |
24 | #include <linux/regset.h> | 24 | #include <linux/regset.h> |
25 | #include <linux/tracehook.h> | 25 | #include <linux/tracehook.h> |
26 | #include <trace/syscall.h> | ||
26 | #include <linux/compat.h> | 27 | #include <linux/compat.h> |
27 | #include <linux/elf.h> | 28 | #include <linux/elf.h> |
28 | 29 | ||
@@ -37,6 +38,9 @@ | |||
37 | #include <asm/cpudata.h> | 38 | #include <asm/cpudata.h> |
38 | #include <asm/cacheflush.h> | 39 | #include <asm/cacheflush.h> |
39 | 40 | ||
41 | #define CREATE_TRACE_POINTS | ||
42 | #include <trace/events/syscalls.h> | ||
43 | |||
40 | #include "entry.h" | 44 | #include "entry.h" |
41 | 45 | ||
42 | /* #define ALLOW_INIT_TRACING */ | 46 | /* #define ALLOW_INIT_TRACING */ |
@@ -1059,6 +1063,9 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs) | |||
1059 | if (test_thread_flag(TIF_SYSCALL_TRACE)) | 1063 | if (test_thread_flag(TIF_SYSCALL_TRACE)) |
1060 | ret = tracehook_report_syscall_entry(regs); | 1064 | ret = tracehook_report_syscall_entry(regs); |
1061 | 1065 | ||
1066 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) | ||
1067 | trace_sys_enter(regs, regs->u_regs[UREG_G1]); | ||
1068 | |||
1062 | if (unlikely(current->audit_context) && !ret) | 1069 | if (unlikely(current->audit_context) && !ret) |
1063 | audit_syscall_entry((test_thread_flag(TIF_32BIT) ? | 1070 | audit_syscall_entry((test_thread_flag(TIF_32BIT) ? |
1064 | AUDIT_ARCH_SPARC : | 1071 | AUDIT_ARCH_SPARC : |
@@ -1084,6 +1091,9 @@ asmlinkage void syscall_trace_leave(struct pt_regs *regs) | |||
1084 | audit_syscall_exit(result, regs->u_regs[UREG_I0]); | 1091 | audit_syscall_exit(result, regs->u_regs[UREG_I0]); |
1085 | } | 1092 | } |
1086 | 1093 | ||
1094 | if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) | ||
1095 | trace_sys_exit(regs, regs->u_regs[UREG_G1]); | ||
1096 | |||
1087 | if (test_thread_flag(TIF_SYSCALL_TRACE)) | 1097 | if (test_thread_flag(TIF_SYSCALL_TRACE)) |
1088 | tracehook_report_syscall_exit(regs, 0); | 1098 | tracehook_report_syscall_exit(regs, 0); |
1089 | } | 1099 | } |