mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
sh: Define HAVE_FUNCTION_TRACE_MCOUNT_TEST
Enable HAVE_FUNCTION_TRACE_MCOUNT_TEST and test the value of function_trace_stop from our assembly code as opposed to using the generic C function. This should optimise our mcount/ftrace code path. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
parent
ca0d17277f
commit
c1340c053b
2 changed files with 17 additions and 1 deletions
|
@ -31,6 +31,7 @@ config SUPERH32
|
||||||
select HAVE_FUNCTION_TRACER
|
select HAVE_FUNCTION_TRACER
|
||||||
select HAVE_FTRACE_MCOUNT_RECORD
|
select HAVE_FTRACE_MCOUNT_RECORD
|
||||||
select HAVE_DYNAMIC_FTRACE
|
select HAVE_DYNAMIC_FTRACE
|
||||||
|
select HAVE_FUNCTION_TRACE_MCOUNT_TEST
|
||||||
select HAVE_ARCH_KGDB
|
select HAVE_ARCH_KGDB
|
||||||
select ARCH_HIBERNATION_POSSIBLE if MMU
|
select ARCH_HIBERNATION_POSSIBLE if MMU
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* arch/sh/lib/mcount.S
|
* arch/sh/lib/mcount.S
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 Paul Mundt
|
* Copyright (C) 2008 Paul Mundt
|
||||||
* Copyright (C) 2008 Matt Fleming
|
* Copyright (C) 2008, 2009 Matt Fleming
|
||||||
*
|
*
|
||||||
* This file is subject to the terms and conditions of the GNU General Public
|
* This file is subject to the terms and conditions of the GNU General Public
|
||||||
* License. See the file "COPYING" in the main directory of this archive
|
* License. See the file "COPYING" in the main directory of this archive
|
||||||
|
@ -35,6 +35,12 @@
|
||||||
.type mcount,@function
|
.type mcount,@function
|
||||||
_mcount:
|
_mcount:
|
||||||
mcount:
|
mcount:
|
||||||
|
#ifndef CONFIG_DYNAMIC_FTRACE
|
||||||
|
mov.l .Lfunction_trace_stop, r0
|
||||||
|
mov.l @r0, r0
|
||||||
|
tst r0, r0
|
||||||
|
bf ftrace_stub
|
||||||
|
#endif
|
||||||
MCOUNT_ENTER()
|
MCOUNT_ENTER()
|
||||||
|
|
||||||
#ifdef CONFIG_DYNAMIC_FTRACE
|
#ifdef CONFIG_DYNAMIC_FTRACE
|
||||||
|
@ -62,6 +68,11 @@ skip_trace:
|
||||||
#ifdef CONFIG_DYNAMIC_FTRACE
|
#ifdef CONFIG_DYNAMIC_FTRACE
|
||||||
.globl ftrace_caller
|
.globl ftrace_caller
|
||||||
ftrace_caller:
|
ftrace_caller:
|
||||||
|
mov.l .Lfunction_trace_stop, r0
|
||||||
|
mov.l @r0, r0
|
||||||
|
tst r0, r0
|
||||||
|
bf ftrace_stub
|
||||||
|
|
||||||
MCOUNT_ENTER()
|
MCOUNT_ENTER()
|
||||||
|
|
||||||
.globl ftrace_call
|
.globl ftrace_call
|
||||||
|
@ -88,3 +99,7 @@ ftrace_call:
|
||||||
ftrace_stub:
|
ftrace_stub:
|
||||||
rts
|
rts
|
||||||
nop
|
nop
|
||||||
|
|
||||||
|
.align 2
|
||||||
|
.Lfunction_trace_stop:
|
||||||
|
.long function_trace_stop
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue