2014-06-26 17:03:40

by Steven Rostedt

[permalink] [raw]
Subject: [RFA][PATCH 17/27] tile: 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: Chris Metcalf <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
---
arch/tile/Kconfig | 1 -
arch/tile/kernel/mcount_64.S | 18 ------------------
2 files changed, 19 deletions(-)

diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
index 4f3006b600e3..7fcd492adbfc 100644
--- a/arch/tile/Kconfig
+++ b/arch/tile/Kconfig
@@ -128,7 +128,6 @@ config TILEGX
select SPARSE_IRQ
select GENERIC_IRQ_LEGACY_ALLOC_HWIRQ
select HAVE_FUNCTION_TRACER
- select HAVE_FUNCTION_TRACE_MCOUNT_TEST
select HAVE_FUNCTION_GRAPH_TRACER
select HAVE_DYNAMIC_FTRACE
select HAVE_FTRACE_MCOUNT_RECORD
diff --git a/arch/tile/kernel/mcount_64.S b/arch/tile/kernel/mcount_64.S
index 70d7bb0c4d8f..3c2b8d5e1d1a 100644
--- a/arch/tile/kernel/mcount_64.S
+++ b/arch/tile/kernel/mcount_64.S
@@ -77,15 +77,6 @@ STD_ENDPROC(__mcount)

.align 64
STD_ENTRY(ftrace_caller)
- moveli r11, hw2_last(function_trace_stop)
- { shl16insli r11, r11, hw1(function_trace_stop); move r12, lr }
- { shl16insli r11, r11, hw0(function_trace_stop); move lr, r10 }
- ld r11, r11
- beqz r11, 1f
- jrp r12
-
-1:
- { move r10, lr; move lr, r12 }
MCOUNT_SAVE_REGS

/* arg1: self return address */
@@ -119,15 +110,6 @@ STD_ENDPROC(ftrace_caller)

.align 64
STD_ENTRY(__mcount)
- moveli r11, hw2_last(function_trace_stop)
- { shl16insli r11, r11, hw1(function_trace_stop); move r12, lr }
- { shl16insli r11, r11, hw0(function_trace_stop); move lr, r10 }
- ld r11, r11
- beqz r11, 1f
- jrp r12
-
-1:
- { move r10, lr; move lr, r12 }
{
moveli r11, hw2_last(ftrace_trace_function)
moveli r13, hw2_last(ftrace_stub)
--
2.0.0


2014-06-26 17:33:12

by Steven Rostedt

[permalink] [raw]
Subject: Re: [RFA][PATCH 17/27] tile: ftrace: Remove check of obsolete variable function_trace_stop

On Thu, 26 Jun 2014 12:52:38 -0400
Steven Rostedt <[email protected]> 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 ]

>From the cover letter (you were not Cc'd on)

Anyway, as there is no more reason to set function_trace_stop it is time
to remove it. Unfortunately it's in several archs in assembly. Most of
the assembly looks rather straight forward and I removed them myself.
But I was only able to compile test them (for archs: arm64, metag, and
microblaze I do not have my cross tools set up for them and did not
even compile test it). But I would really love it if people can
download their patch and test it out. You only need the patches that go
against your arch and to really test it, also include the patch titled:

ftrace: Remove check for HAVE_FUNCTION_TRACE_MCOUNT_TEST

Otherwise your arch patch will call the list op that still does the
check. That is, if you want to test suspend and resume on your arch.

As you may see, there are patches to the ftrace infrastructure that
depend on the arch patches being implemented. I removed the
functionality from the infrastructure, then removed it from the archs,
and then finally removed the existence of the function_trace_stop
variable, which would cause the archs to fail to compile if that were
to go first.

If you can test your arch and give me your acked-by, I would appreciate
it. Otherwise, if you need this to go through your tree, I would ask you
to set up a dedicated branch that I can pull from to keep this order
intact.

-- Steve

>
> Cc: Chris Metcalf <[email protected]>
> Signed-off-by: Steven Rostedt <[email protected]>
> ---
> arch/tile/Kconfig | 1 -
> arch/tile/kernel/mcount_64.S | 18 ------------------
> 2 files changed, 19 deletions(-)
>
> diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
> index 4f3006b600e3..7fcd492adbfc 100644
> --- a/arch/tile/Kconfig
> +++ b/arch/tile/Kconfig
> @@ -128,7 +128,6 @@ config TILEGX
> select SPARSE_IRQ
> select GENERIC_IRQ_LEGACY_ALLOC_HWIRQ
> select HAVE_FUNCTION_TRACER
> - select HAVE_FUNCTION_TRACE_MCOUNT_TEST
> select HAVE_FUNCTION_GRAPH_TRACER
> select HAVE_DYNAMIC_FTRACE
> select HAVE_FTRACE_MCOUNT_RECORD
> diff --git a/arch/tile/kernel/mcount_64.S b/arch/tile/kernel/mcount_64.S
> index 70d7bb0c4d8f..3c2b8d5e1d1a 100644
> --- a/arch/tile/kernel/mcount_64.S
> +++ b/arch/tile/kernel/mcount_64.S
> @@ -77,15 +77,6 @@ STD_ENDPROC(__mcount)
>
> .align 64
> STD_ENTRY(ftrace_caller)
> - moveli r11, hw2_last(function_trace_stop)
> - { shl16insli r11, r11, hw1(function_trace_stop); move r12, lr }
> - { shl16insli r11, r11, hw0(function_trace_stop); move lr, r10 }
> - ld r11, r11
> - beqz r11, 1f
> - jrp r12
> -
> -1:
> - { move r10, lr; move lr, r12 }
> MCOUNT_SAVE_REGS
>
> /* arg1: self return address */
> @@ -119,15 +110,6 @@ STD_ENDPROC(ftrace_caller)
>
> .align 64
> STD_ENTRY(__mcount)
> - moveli r11, hw2_last(function_trace_stop)
> - { shl16insli r11, r11, hw1(function_trace_stop); move r12, lr }
> - { shl16insli r11, r11, hw0(function_trace_stop); move lr, r10 }
> - ld r11, r11
> - beqz r11, 1f
> - jrp r12
> -
> -1:
> - { move r10, lr; move lr, r12 }
> {
> moveli r11, hw2_last(ftrace_trace_function)
> moveli r13, hw2_last(ftrace_stub)

2014-07-03 13:53:41

by Chris Metcalf

[permalink] [raw]
Subject: Re: [RFA][PATCH 17/27] tile: ftrace: Remove check of obsolete variable function_trace_stop

On 6/26/2014 12:52 PM, 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: Chris Metcalf<[email protected]>
> Signed-off-by: Steven Rostedt<[email protected]>

I forwarded this internally to the guy who did the work at Tilera and he's happy with the change.

Acked-by: Zhigang Lu<[email protected]>

--
Chris Metcalf, Tilera Corp.
http://www.tilera.com

2014-07-03 14:02:13

by Steven Rostedt

[permalink] [raw]
Subject: Re: [RFA][PATCH 17/27] tile: ftrace: Remove check of obsolete variable function_trace_stop

On Thu, 3 Jul 2014 09:53:37 -0400
Chris Metcalf <[email protected]> wrote:

> On 6/26/2014 12:52 PM, 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: Chris Metcalf<[email protected]>
> > Signed-off-by: Steven Rostedt<[email protected]>
>
> I forwarded this internally to the guy who did the work at Tilera and he's happy with the change.
>
> Acked-by: Zhigang Lu<[email protected]>
>

Thanks!

-- Steve