Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ftrace: x86: Remove check of obsolete variable function_trace_stop

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>

+1 -27
-1
arch/x86/Kconfig
··· 54 54 select HAVE_FUNCTION_TRACER 55 55 select HAVE_FUNCTION_GRAPH_TRACER 56 56 select HAVE_FUNCTION_GRAPH_FP_TEST 57 - select HAVE_FUNCTION_TRACE_MCOUNT_TEST 58 57 select HAVE_SYSCALL_TRACEPOINTS 59 58 select SYSCTL_EXCEPTION_TRACE 60 59 select HAVE_KVM
-9
arch/x86/kernel/entry_32.S
··· 1058 1058 END(mcount) 1059 1059 1060 1060 ENTRY(ftrace_caller) 1061 - cmpl $0, function_trace_stop 1062 - jne ftrace_stub 1063 - 1064 1061 pushl %eax 1065 1062 pushl %ecx 1066 1063 pushl %edx ··· 1089 1092 1090 1093 ENTRY(ftrace_regs_caller) 1091 1094 pushf /* push flags before compare (in cs location) */ 1092 - cmpl $0, function_trace_stop 1093 - jne ftrace_restore_flags 1094 1095 1095 1096 /* 1096 1097 * i386 does not save SS and ESP when coming from kernel. ··· 1147 1152 popf /* Pop flags at end (no addl to corrupt flags) */ 1148 1153 jmp ftrace_ret 1149 1154 1150 - ftrace_restore_flags: 1151 1155 popf 1152 1156 jmp ftrace_stub 1153 1157 #else /* ! CONFIG_DYNAMIC_FTRACE */ ··· 1154 1160 ENTRY(mcount) 1155 1161 cmpl $__PAGE_OFFSET, %esp 1156 1162 jb ftrace_stub /* Paging not enabled yet? */ 1157 - 1158 - cmpl $0, function_trace_stop 1159 - jne ftrace_stub 1160 1163 1161 1164 cmpl $ftrace_stub, ftrace_trace_function 1162 1165 jnz trace
+1 -17
arch/x86/kernel/mcount_64.S
··· 46 46 .endm 47 47 48 48 ENTRY(ftrace_caller) 49 - /* Check if tracing was disabled (quick check) */ 50 - cmpl $0, function_trace_stop 51 - jne ftrace_stub 52 - 53 49 ftrace_caller_setup 54 50 /* regs go into 4th parameter (but make it NULL) */ 55 51 movq $0, %rcx ··· 68 72 ENTRY(ftrace_regs_caller) 69 73 /* Save the current flags before compare (in SS location)*/ 70 74 pushfq 71 - 72 - /* Check if tracing was disabled (quick check) */ 73 - cmpl $0, function_trace_stop 74 - jne ftrace_restore_flags 75 75 76 76 /* skip=8 to skip flags saved in SS */ 77 77 ftrace_caller_setup 8 ··· 123 131 popfq 124 132 125 133 jmp ftrace_return 126 - ftrace_restore_flags: 134 + 127 135 popfq 128 136 jmp ftrace_stub 129 137 ··· 133 141 #else /* ! CONFIG_DYNAMIC_FTRACE */ 134 142 135 143 ENTRY(function_hook) 136 - cmpl $0, function_trace_stop 137 - jne ftrace_stub 138 - 139 144 cmpq $ftrace_stub, ftrace_trace_function 140 145 jnz trace 141 146 ··· 171 182 ENTRY(ftrace_graph_caller) 172 183 MCOUNT_SAVE_FRAME 173 184 174 - /* Check if tracing was disabled (quick check) */ 175 - cmpl $0, function_trace_stop 176 - jne fgraph_skip 177 - 178 185 #ifdef CC_USING_FENTRY 179 186 leaq SS+16(%rsp), %rdi 180 187 movq $0, %rdx /* No framepointers needed */ ··· 183 198 184 199 call prepare_ftrace_return 185 200 186 - fgraph_skip: 187 201 MCOUNT_RESTORE_FRAME 188 202 189 203 retq