summaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/ftrace.h
Commit message (Collapse)AuthorAgeFilesLines
* ftrace: Format MCOUNT_ADDR address as type unsigned longMinfei Huang2015-07-201-1/+1
| | | | | | | | | | | | | | | | | | | | Always we use type unsigned long to format the ip address, since the value of ip address is never the negative. This patch uses type unsigned long, instead of long, to format the ip address. The code is more clearly to be viewed by using type unsigned long, although it is correct by using either unsigned long or long. Link: http://lkml.kernel.org/r/1436694744-16747-1-git-send-email-mhuang@redhat.com Cc: Minfei Huang <mnfhuang@gmail.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: Michal Simek <monstr@monstr.eu> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Minfei Huang <mnfhuang@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* ftrace: Make CALLER_ADDRx macros more genericAKASHI Takahiro2014-05-211-9/+1
| | | | | | | | | | | | | | | | | | | Most archs with HAVE_ARCH_CALLER_ADDR have pretty much the same definitions of CALLER_ADDRx(n). Instead of duplicating the code for all the archs, define a ftrace_return_address0() and ftrace_return_address(n) that can be overwritten by the archs if they need to do something different. Instead of 7 macros in every arch, we now only have at most 2 (and actually only 1 as ftrace_return_address0() should be the same for all archs). The CALLER_ADDRx(n) will now be defined in linux/ftrace.h and use the ftrace_return_address*(n?) macros. This removes a lot of the duplicate code. Link: http://lkml.kernel.org/p/1400585464-30333-1-git-send-email-takahiro.akashi@linaro.org Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
* sh: Provide CALLER_ADDRx definitions even when ftrace is disabled.Paul Mundt2009-10-141-1/+5
| | | | | | | | | Despite being located in the ftrace header, the CALLER_ADDRx definitions are used by generic code. As such, we have to provide it generically, and given that there is no real dependence on ftrace in the first place, the definitions can just be moved out. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Generalize CALLER_ADDRx support.Paul Mundt2009-10-131-42/+8
| | | | | | | | | | | | | | | | | | This splits out the unwinder implementation and adds a new return_address() abstraction modelled after the ARM code. The DWARF unwinder is tied in to this, returning NULL otherwise in the case of being unable to support arbitrary depths. This enables us to get correct behaviour with the unwinder enabled, as well as disabling the arbitrary depth support when frame pointers are enabled, as arbitrary depths with __builtin_return_address() are not supported regardless. With this abstraction it's also possible to layer on a simplified implementation with frame pointers in the event that the unwinder isn't enabled, although this is left as a future exercise. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: tracing: Use the DWARF unwinder for CALLER_ADDRxMatt Fleming2009-10-111-0/+47
| | | | | | | | The major reason for implementing the DWARF unwinder in the first place was so that we could stop using __builtin_return_address(n), which doesn't work on SH for n > 0. Signed-off-by: Matt Fleming <matt@console-pimps.org>
* sh: Fix an off-by-1 in FTRACE_SYSCALL_MAX.Paul Mundt2009-08-251-1/+1
| | | | | | | | | | This is supposed to be the equivalent of __NR_syscalls, not __NR_syscalls -1. The x86 code this was based on had simply fallen out of sync at the time this was implemented. Fix it up now. As a result, tracing of __NR_perf_counter_open works as advertised. 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-0/+1
| | | | | | Needed by ftrace changes in -tip. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Function graph tracer supportMatt Fleming2009-07-111-0/+3
| | | | | | | 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: Fix the value of MCOUNT_INSN_OFFSETMatt Fleming2009-07-061-2/+2
| | | | | | | | | | It seems that MCOUNT_INSN_OFFSET was calculating the distance between the wrong functions. The value that should have actually been computed is the distance between ftrace_call and ftrace_stub. I discovered this when I added some code to ftrace_caller. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Provide a dyn_arch_ftrace struct definition.Paul Mundt2008-12-221-2/+7
| | | | | | Needed for dynamic ftrace API changes. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: dynamic ftrace support.Matt Fleming2008-12-221-0/+21
| | | | | | | First cut at dynamic ftrace support. Signed-off-by: Matt Fleming <mjf@gentoo.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* sh: Add missing asm/ftrace.h.Paul Mundt2008-09-211-0/+8
This was missed with the ftrace support commit.. check it in now. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
OpenPOWER on IntegriCloud