ftrace: x86: Remove check of obsolete variable function_trace_stop
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Wed, 25 Jun 2014 15:59:45 +0000 (11:59 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Fri, 18 Jul 2014 17:57:02 +0000 (13:57 -0400)
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
arch/x86/kernel/entry_32.S
arch/x86/kernel/mcount_64.S

index a8f749ef0fdcc626a16d2a94e02c6a65d26a2fe8..5b45e8fccaca217be180291317e12662716a31f4 100644 (file)
@@ -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
index dbaa23e78b369721d5082af26cc18fa698985d09..64762c62e8a724cdf98e1cc6b19a3214d0b2252f 100644 (file)
@@ -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
index 6b4e3c3b3d74e14897113d631469f082f19bddc0..c73aecf10d34a6b8f12bac3eff1bf64110ae664f 100644 (file)
@@ -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