From 1d7bf993e0731b4ac790667c196b2a2d787f95c3 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Fri, 6 Sep 2013 20:24:48 +0200 Subject: MIPS: ftrace: Add support for syscall tracepoints. Signed-off-by: Ralf Baechle --- arch/mips/kernel/ptrace.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/mips/kernel') diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index b996efcccc11..b52e1d2b33e0 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -43,6 +44,9 @@ #include #include +#define CREATE_TRACE_POINTS +#include + /* * Called by kernel/ptrace.c when detaching.. * @@ -664,6 +668,9 @@ asmlinkage void syscall_trace_enter(struct pt_regs *regs) tracehook_report_syscall_entry(regs)) ret = -1; + if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) + trace_sys_enter(regs, regs->regs[2]); + audit_syscall_entry(__syscall_get_arch(), regs->regs[2], regs->regs[4], regs->regs[5], @@ -685,6 +692,9 @@ asmlinkage void syscall_trace_leave(struct pt_regs *regs) audit_syscall_exit(regs); + if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) + trace_sys_exit(regs, regs->regs[2]); + if (test_thread_flag(TIF_SYSCALL_TRACE)) tracehook_report_syscall_exit(regs, 0); -- cgit v1.2.3