aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/ftrace.c
Commit message (Collapse)AuthorAgeFilesLines
* tracing: Unify arch_syscall_addr() implementationsMike Frysinger2010-02-171-9/+0
| | | | | | | | | | | | | | | | | Most implementations of arch_syscall_addr() are the same, so create a default version in common code and move the one piece that differs (the syscall table) to asm/syscall.h. New arch ports don't have to waste time copying & pasting this simple function. The s390/sparc versions need to be different, so document why. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Steven Rostedt <rostedt@goodmis.org> LKML-Reference: <1264498803-17278-1-git-send-email-vapier@gentoo.org> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
* sh: ftrace: Fix up syscall tracing build.Paul Mundt2009-12-111-74/+2
| | | | | | Syscall tracing metadata was shuffled around, update accordingly. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: ftrace: Make code modification NMI safe.Paul Mundt2009-10-131-1/+145
| | | | | | | | | | This cribs the x86 implementation of ftrace_nmi_enter() and friends to make ftrace_modify_code() NMI safe, particularly on SMP configurations. For additional notes on the problems involved, see the comment below ftrace_call_replace(). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: ftrace: Fix up syscall tracepoint support.Paul Mundt2009-10-131-10/+27
| | | | | | | | | | | | Sync up with latest core changes in the syscalls tracing area: - tracing: Map syscall name to number (syscall_name_to_nr()) - tracing: Call arch_init_ftrace_syscalls at boot - tracing: add support tracepoint ids (set_syscall_{enter,exit}_id()) Taken from the s390 change. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Move the FTRACE_SYSCALL_MAX definition in to asm/ftrace.h.Paul Mundt2009-08-241-2/+0
| | | | | | Needed by ftrace changes in -tip. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Function graph tracer supportMatt Fleming2009-07-111-0/+122
| | | | | | | Add both dynamic and static function graph tracer support for sh. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add ftrace syscall tracing supportMatt Fleming2009-07-061-0/+68
| | | | | | | | | Now that I've added TIF_SYSCALL_FTRACE the thread flags do not fit into a single byte any more. Code testing them now needs to be aware of the upper and lower bytes. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Fix dynamic ftrace's NOP action.Matt Fleming2009-06-111-29/+29
| | | | | | | | | | | | | | | | | | | Ftrace on sh handles nop'ing out trace function calls differently than other architectures. Instead of inserting NOP instructions in place of the call to the function tracer we branch over the call instructions and continue executing the main body of the function. This patch fixes a bug in the implementation of ftrace_modify_code() where we check that the old value of the code we're about to replace is an expected one. In the ftrace_make_call() code path ftrace_modify_code() was comparing the old instruction value with NOP instructions. The compare was failing because we never actually insert NOP instructions. It makes sense to just get rid of the NOP instructions in ftrace_nop and compare the old code with the address of the function body if we're expecting ftrace to have nop'd out the function trace call. Signed-off-by: Matt Fleming <matt@console-pimps.org>
* sh: Update my email addressMatt Fleming2009-06-111-1/+1
| | | | | | | Use my current email address as my gentoo account will be closed at some point. Signed-off-by: Matt Fleming <matt@console-pimps.org>
* sh: Provide ftrace_make_call()/ftrace_make_nop().Paul Mundt2008-12-221-0/+24
| | | | Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: dynamic ftrace support.Matt Fleming2008-12-221-0/+109
First cut at dynamic ftrace support. Signed-off-by: Matt Fleming <mjf@gentoo.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>