aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2013-09-06 14:24:48 -0400
committerRalf Baechle <ralf@linux-mips.org>2013-10-29 16:25:16 -0400
commit1d7bf993e0731b4ac790667c196b2a2d787f95c3 (patch)
tree235093a4593d6c68b87b5d602a2f1d0dde3ad085 /arch/mips/kernel
parent0dfa95aaa817eec8473abf5465eae135b1cf1138 (diff)
MIPS: ftrace: Add support for syscall tracepoints.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r--arch/mips/kernel/ptrace.c10
1 files changed, 10 insertions, 0 deletions
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 @@
29#include <linux/tracehook.h> 29#include <linux/tracehook.h>
30#include <linux/audit.h> 30#include <linux/audit.h>
31#include <linux/seccomp.h> 31#include <linux/seccomp.h>
32#include <linux/ftrace.h>
32 33
33#include <asm/byteorder.h> 34#include <asm/byteorder.h>
34#include <asm/cpu.h> 35#include <asm/cpu.h>
@@ -43,6 +44,9 @@
43#include <asm/bootinfo.h> 44#include <asm/bootinfo.h>
44#include <asm/reg.h> 45#include <asm/reg.h>
45 46
47#define CREATE_TRACE_POINTS
48#include <trace/events/syscalls.h>
49
46/* 50/*
47 * Called by kernel/ptrace.c when detaching.. 51 * Called by kernel/ptrace.c when detaching..
48 * 52 *
@@ -664,6 +668,9 @@ asmlinkage void syscall_trace_enter(struct pt_regs *regs)
664 tracehook_report_syscall_entry(regs)) 668 tracehook_report_syscall_entry(regs))
665 ret = -1; 669 ret = -1;
666 670
671 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
672 trace_sys_enter(regs, regs->regs[2]);
673
667 audit_syscall_entry(__syscall_get_arch(), 674 audit_syscall_entry(__syscall_get_arch(),
668 regs->regs[2], 675 regs->regs[2],
669 regs->regs[4], regs->regs[5], 676 regs->regs[4], regs->regs[5],
@@ -685,6 +692,9 @@ asmlinkage void syscall_trace_leave(struct pt_regs *regs)
685 692
686 audit_syscall_exit(regs); 693 audit_syscall_exit(regs);
687 694
695 if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
696 trace_sys_exit(regs, regs->regs[2]);
697
688 if (test_thread_flag(TIF_SYSCALL_TRACE)) 698 if (test_thread_flag(TIF_SYSCALL_TRACE))
689 tracehook_report_syscall_exit(regs, 0); 699 tracehook_report_syscall_exit(regs, 0);
690 700