Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163304
b: refs/heads/master
c: c1340c0
h: refs/heads/master
v: v3
  • Loading branch information
Matt Fleming authored and Paul Mundt committed Jul 6, 2009
1 parent abd7a1a commit 53f24f3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ca0d17277fd101ce4878f92b398b6ab71fb2c287
refs/heads/master: c1340c053be7a43d837a3acb352d5008be865a55
1 change: 1 addition & 0 deletions trunk/arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ config SUPERH32
select HAVE_FUNCTION_TRACER
select HAVE_FTRACE_MCOUNT_RECORD
select HAVE_DYNAMIC_FTRACE
select HAVE_FUNCTION_TRACE_MCOUNT_TEST
select HAVE_ARCH_KGDB
select ARCH_HIBERNATION_POSSIBLE if MMU

Expand Down
17 changes: 16 additions & 1 deletion trunk/arch/sh/lib/mcount.S
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* arch/sh/lib/mcount.S
*
* 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
* License. See the file "COPYING" in the main directory of this archive
Expand Down Expand Up @@ -35,6 +35,12 @@
.type mcount,@function
_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()

#ifdef CONFIG_DYNAMIC_FTRACE
Expand Down Expand Up @@ -62,6 +68,11 @@ skip_trace:
#ifdef CONFIG_DYNAMIC_FTRACE
.globl ftrace_caller
ftrace_caller:
mov.l .Lfunction_trace_stop, r0
mov.l @r0, r0
tst r0, r0
bf ftrace_stub

MCOUNT_ENTER()

.globl ftrace_call
Expand All @@ -88,3 +99,7 @@ ftrace_call:
ftrace_stub:
rts
nop

.align 2
.Lfunction_trace_stop:
.long function_trace_stop

0 comments on commit 53f24f3

Please sign in to comment.