public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	"H. Peter Anvin" <hpa@linux.intel.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Subject: [for-next][PATCH 17/32] ftrace: x86: Remove check of obsolete variable function_trace_stop
Date: Sat, 19 Jul 2014 09:15:41 -0400	[thread overview]
Message-ID: <20140719131612.356750295@goodmis.org> (raw)
In-Reply-To: 20140719131524.009152325@goodmis.org

[-- Attachment #1: 0017-ftrace-x86-Remove-check-of-obsolete-variable-functio.patch --]
[-- Type: text/plain, Size: 3543 bytes --]

From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>

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

Link: http://lkml.kernel.org/r/53C54D32.6000000@zytor.com

Acked-by: H. Peter Anvin <hpa@linux.intel.com>
Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 arch/x86/Kconfig            |  1 -
 arch/x86/kernel/entry_32.S  |  9 ---------
 arch/x86/kernel/mcount_64.S | 18 +-----------------
 3 files changed, 1 insertion(+), 27 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index a8f749ef0fdc..5b45e8fccaca 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -54,7 +54,6 @@ config X86
 	select HAVE_FUNCTION_TRACER
 	select HAVE_FUNCTION_GRAPH_TRACER
 	select HAVE_FUNCTION_GRAPH_FP_TEST
-	select HAVE_FUNCTION_TRACE_MCOUNT_TEST
 	select HAVE_SYSCALL_TRACEPOINTS
 	select SYSCTL_EXCEPTION_TRACE
 	select HAVE_KVM
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S
index dbaa23e78b36..64762c62e8a7 100644
--- a/arch/x86/kernel/entry_32.S
+++ b/arch/x86/kernel/entry_32.S
@@ -1058,9 +1058,6 @@ ENTRY(mcount)
 END(mcount)
 
 ENTRY(ftrace_caller)
-	cmpl $0, function_trace_stop
-	jne  ftrace_stub
-
 	pushl %eax
 	pushl %ecx
 	pushl %edx
@@ -1092,8 +1089,6 @@ END(ftrace_caller)
 
 ENTRY(ftrace_regs_caller)
 	pushf	/* push flags before compare (in cs location) */
-	cmpl $0, function_trace_stop
-	jne ftrace_restore_flags
 
 	/*
 	 * i386 does not save SS and ESP when coming from kernel.
@@ -1152,7 +1147,6 @@ GLOBAL(ftrace_regs_call)
 	popf			/* Pop flags at end (no addl to corrupt flags) */
 	jmp ftrace_ret
 
-ftrace_restore_flags:
 	popf
 	jmp  ftrace_stub
 #else /* ! CONFIG_DYNAMIC_FTRACE */
@@ -1161,9 +1155,6 @@ ENTRY(mcount)
 	cmpl $__PAGE_OFFSET, %esp
 	jb ftrace_stub		/* Paging not enabled yet? */
 
-	cmpl $0, function_trace_stop
-	jne  ftrace_stub
-
 	cmpl $ftrace_stub, ftrace_trace_function
 	jnz trace
 #ifdef CONFIG_FUNCTION_GRAPH_TRACER
diff --git a/arch/x86/kernel/mcount_64.S b/arch/x86/kernel/mcount_64.S
index 6b4e3c3b3d74..c73aecf10d34 100644
--- a/arch/x86/kernel/mcount_64.S
+++ b/arch/x86/kernel/mcount_64.S
@@ -46,10 +46,6 @@ END(function_hook)
 .endm
 
 ENTRY(ftrace_caller)
-	/* Check if tracing was disabled (quick check) */
-	cmpl $0, function_trace_stop
-	jne  ftrace_stub
-
 	ftrace_caller_setup
 	/* regs go into 4th parameter (but make it NULL) */
 	movq $0, %rcx
@@ -73,10 +69,6 @@ ENTRY(ftrace_regs_caller)
 	/* Save the current flags before compare (in SS location)*/
 	pushfq
 
-	/* Check if tracing was disabled (quick check) */
-	cmpl $0, function_trace_stop
-	jne  ftrace_restore_flags
-
 	/* skip=8 to skip flags saved in SS */
 	ftrace_caller_setup 8
 
@@ -131,7 +123,7 @@ GLOBAL(ftrace_regs_call)
 	popfq
 
 	jmp ftrace_return
-ftrace_restore_flags:
+
 	popfq
 	jmp  ftrace_stub
 
@@ -141,9 +133,6 @@ END(ftrace_regs_caller)
 #else /* ! CONFIG_DYNAMIC_FTRACE */
 
 ENTRY(function_hook)
-	cmpl $0, function_trace_stop
-	jne  ftrace_stub
-
 	cmpq $ftrace_stub, ftrace_trace_function
 	jnz trace
 
@@ -182,10 +171,6 @@ END(function_hook)
 ENTRY(ftrace_graph_caller)
 	MCOUNT_SAVE_FRAME
 
-	/* Check if tracing was disabled (quick check) */
-	cmpl $0, function_trace_stop
-	jne  fgraph_skip
-
 #ifdef CC_USING_FENTRY
 	leaq SS+16(%rsp), %rdi
 	movq $0, %rdx	/* No framepointers needed */
@@ -198,7 +183,6 @@ ENTRY(ftrace_graph_caller)
 
 	call	prepare_ftrace_return
 
-fgraph_skip:
 	MCOUNT_RESTORE_FRAME
 
 	retq
-- 
2.0.1



  parent reply	other threads:[~2014-07-19 13:16 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-19 13:15 [for-next][PATCH 00/32] ftrace/tracing: Fixes and final removal of ftrace_start/stop() Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 01/32] ftrace: Allow archs to specify if they need a separate function graph trampoline Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 02/32] ftrace/x86: Have function graph tracer use its own trampoline Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 03/32] x86, power, suspend: Annotate restore_processor_state() with notrace Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 04/32] PM / Sleep: Remove ftrace_stop/start() from suspend and hibernate Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 05/32] ftrace-graph: Remove dependency of ftrace_stop() from ftrace_graph_stop() Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 06/32] ftrace/x86: Add call to ftrace_graph_is_dead() in function graph code Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 07/32] microblaze: ftrace: " Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 08/32] MIPS: " Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 09/32] parisc: " Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 10/32] powerpc/ftrace: " Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 11/32] sh: ftrace: " Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 12/32] ftrace-graph: Remove usage of ftrace_stop() in ftrace_graph_stop() Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 13/32] ftrace: Remove ftrace_start/stop() Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 14/32] ftrace: Do no disable function tracing on enabling function tracing Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 15/32] ftrace: Remove function_trace_stop check from list func Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 16/32] ftrace: Remove check for HAVE_FUNCTION_TRACE_MCOUNT_TEST Steven Rostedt
2014-07-19 13:15 ` Steven Rostedt [this message]
2014-07-19 13:15 ` [for-next][PATCH 18/32] tile: ftrace: Remove check of obsolete variable function_trace_stop Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 19/32] sparc64,ftrace: " Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 20/32] sh: ftrace: " Steven Rostedt
2014-07-21 11:05   ` Matt Fleming
2014-07-21 12:09     ` Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 21/32] parisc: " Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 22/32] MIPS: " Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 23/32] microblaze: " Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 24/32] metag: " Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 25/32] Blackfin: " Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 26/32] arm64, " Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 27/32] s390/ftrace: remove " Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 28/32] tracing: Remove function_trace_stop and HAVE_FUNCTION_TRACE_MCOUNT_TEST Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 29/32] ring-buffer: Always run per-cpu ring buffer resize with schedule_work_on() Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 30/32] tracing: let user specify tracing_thresh after selecting function_graph Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 31/32] ftrace: Do not copy old hash when resetting Steven Rostedt
2014-07-19 13:15 ` [for-next][PATCH 32/32] tracing: Convert local function_graph functions to static Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140719131612.356750295@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox