2014-07-19 13:16:59

by Steven Rostedt

[permalink] [raw]
Subject: [for-next][PATCH 20/32] sh: ftrace: Remove check of obsolete variable function_trace_stop

From: "Steven Rostedt (Red Hat)" <[email protected]>

Nothing sets function_trace_stop to disable function tracing anymore.
Remove the check for it in the arch code.

[ Please test this on your arch ]

Cc: Matt Fleming <[email protected]>
Cc: Paul Mundt <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
---
arch/sh/Kconfig | 1 -
arch/sh/lib/mcount.S | 24 ++----------------------
2 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 834b67c4db5a..aa2df3eaeb29 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -57,7 +57,6 @@ config SUPERH32
select HAVE_FUNCTION_TRACER
select HAVE_FTRACE_MCOUNT_RECORD
select HAVE_DYNAMIC_FTRACE
- select HAVE_FUNCTION_TRACE_MCOUNT_TEST
select HAVE_FTRACE_NMI_ENTER if DYNAMIC_FTRACE
select ARCH_WANT_IPC_PARSE_VERSION
select HAVE_FUNCTION_GRAPH_TRACER
diff --git a/arch/sh/lib/mcount.S b/arch/sh/lib/mcount.S
index 52aa2011d753..7a8572f9d58b 100644
--- a/arch/sh/lib/mcount.S
+++ b/arch/sh/lib/mcount.S
@@ -92,13 +92,6 @@ mcount:
rts
nop
#else
-#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
@@ -174,11 +167,6 @@ ftrace_graph_call:

.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
@@ -196,8 +184,6 @@ ftrace_call:
#endif /* CONFIG_DYNAMIC_FTRACE */

.align 2
-.Lfunction_trace_stop:
- .long function_trace_stop

/*
* NOTE: From here on the locations of the .Lftrace_stub label and
@@ -217,12 +203,7 @@ ftrace_stub:
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
.globl ftrace_graph_caller
ftrace_graph_caller:
- mov.l 2f, r0
- mov.l @r0, r0
- tst r0, r0
- bt 1f
-
- mov.l 3f, r1
+ mov.l 2f, r1
jmp @r1
nop
1:
@@ -242,8 +223,7 @@ ftrace_graph_caller:
MCOUNT_LEAVE()

.align 2
-2: .long function_trace_stop
-3: .long skip_trace
+2: .long skip_trace
.Lprepare_ftrace_return:
.long prepare_ftrace_return

--
2.0.1


2014-07-21 11:05:38

by Matt Fleming

[permalink] [raw]
Subject: Re: [for-next][PATCH 20/32] sh: ftrace: Remove check of obsolete variable function_trace_stop

On Sat, 19 Jul, at 09:15:44AM, Steven Rostedt wrote:
> From: "Steven Rostedt (Red Hat)" <[email protected]>
>
> Nothing sets function_trace_stop to disable function tracing anymore.
> Remove the check for it in the arch code.
>
> [ Please test this on your arch ]
>
> Cc: Matt Fleming <[email protected]>
> Cc: Paul Mundt <[email protected]>
> Signed-off-by: Steven Rostedt <[email protected]>
> ---
> arch/sh/Kconfig | 1 -
> arch/sh/lib/mcount.S | 24 ++----------------------
> 2 files changed, 2 insertions(+), 23 deletions(-)

I no longer have hardware to test this on, but it looks pretty straight
forward.

--
Matt Fleming, Intel Open Source Technology Center

2014-07-21 12:09:15

by Steven Rostedt

[permalink] [raw]
Subject: Re: [for-next][PATCH 20/32] sh: ftrace: Remove check of obsolete variable function_trace_stop

On Mon, 21 Jul 2014 12:05:29 +0100
Matt Fleming <[email protected]> wrote:

> On Sat, 19 Jul, at 09:15:44AM, Steven Rostedt wrote:
> > From: "Steven Rostedt (Red Hat)" <[email protected]>
> >
> > Nothing sets function_trace_stop to disable function tracing anymore.
> > Remove the check for it in the arch code.
> >
> > [ Please test this on your arch ]
> >
> > Cc: Matt Fleming <[email protected]>
> > Cc: Paul Mundt <[email protected]>
> > Signed-off-by: Steven Rostedt <[email protected]>
> > ---
> > arch/sh/Kconfig | 1 -
> > arch/sh/lib/mcount.S | 24 ++----------------------
> > 2 files changed, 2 insertions(+), 23 deletions(-)
>
> I no longer have hardware to test this on, but it looks pretty straight
> forward.
>

Thanks.

I've already pushed this to my next repo, so it's going to keep the
"Please test this on your arch" ;-)

Anyway, the arch has been orphaned, thus it's not really that important.

-- Steve