diff --git a/[refs] b/[refs] index 5718bcefc7cd..6ab9c364809b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d57c5d51a30152f3175d2344cb6395f08bf8ee0c +refs/heads/master: d45a3e00687bb52a20d9256d3d1068eea271013f diff --git a/trunk/Makefile b/trunk/Makefile index e7ca93f17851..ddf5be952e45 100644 --- a/trunk/Makefile +++ b/trunk/Makefile @@ -609,11 +609,7 @@ KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) endif ifdef CONFIG_FUNCTION_TRACER -ifdef CONFIG_HAVE_FENTRY -CC_USING_FENTRY := $(call cc-option, -mfentry -DCC_USING_FENTRY) -endif -KBUILD_CFLAGS += -pg $(CC_USING_FENTRY) -KBUILD_AFLAGS += $(CC_USING_FENTRY) +KBUILD_CFLAGS += -pg ifdef CONFIG_DYNAMIC_FTRACE ifdef CONFIG_HAVE_C_RECORDMCOUNT BUILD_C_RECORDMCOUNT := y diff --git a/trunk/arch/x86/Kconfig b/trunk/arch/x86/Kconfig index 28dd891a0a16..a2d19ee750ca 100644 --- a/trunk/arch/x86/Kconfig +++ b/trunk/arch/x86/Kconfig @@ -36,7 +36,6 @@ config X86 select HAVE_KRETPROBES select HAVE_OPTPROBES select HAVE_FTRACE_MCOUNT_RECORD - select HAVE_FENTRY if X86_64 select HAVE_C_RECORDMCOUNT select HAVE_DYNAMIC_FTRACE select HAVE_FUNCTION_TRACER diff --git a/trunk/arch/x86/include/asm/ftrace.h b/trunk/arch/x86/include/asm/ftrace.h index 9a25b522d377..a6cae0c1720c 100644 --- a/trunk/arch/x86/include/asm/ftrace.h +++ b/trunk/arch/x86/include/asm/ftrace.h @@ -35,11 +35,7 @@ #endif #ifdef CONFIG_FUNCTION_TRACER -#ifdef CC_USING_FENTRY -# define MCOUNT_ADDR ((long)(__fentry__)) -#else -# define MCOUNT_ADDR ((long)(mcount)) -#endif +#define MCOUNT_ADDR ((long)(mcount)) #define MCOUNT_INSN_SIZE 5 /* sizeof mcount call */ #ifdef CONFIG_DYNAMIC_FTRACE @@ -50,7 +46,6 @@ #ifndef __ASSEMBLY__ extern void mcount(void); extern atomic_t modifying_ftrace_code; -extern void __fentry__(void); static inline unsigned long ftrace_call_adjust(unsigned long addr) { diff --git a/trunk/arch/x86/kernel/entry_64.S b/trunk/arch/x86/kernel/entry_64.S index ed767b747fe5..b7a81dcb7366 100644 --- a/trunk/arch/x86/kernel/entry_64.S +++ b/trunk/arch/x86/kernel/entry_64.S @@ -68,18 +68,10 @@ .section .entry.text, "ax" #ifdef CONFIG_FUNCTION_TRACER - -#ifdef CC_USING_FENTRY -# define function_hook __fentry__ -#else -# define function_hook mcount -#endif - #ifdef CONFIG_DYNAMIC_FTRACE - -ENTRY(function_hook) +ENTRY(mcount) retq -END(function_hook) +END(mcount) /* skip is set if stack has been adjusted */ .macro ftrace_caller_setup skip=0 @@ -92,11 +84,7 @@ END(function_hook) movq RIP(%rsp), %rdi subq $MCOUNT_INSN_SIZE, %rdi /* Load the parent_ip into the second parameter */ -#ifdef CC_USING_FENTRY - movq SS+16(%rsp), %rsi -#else movq 8(%rbp), %rsi -#endif .endm ENTRY(ftrace_caller) @@ -189,8 +177,7 @@ END(ftrace_regs_caller) #else /* ! CONFIG_DYNAMIC_FTRACE */ - -ENTRY(function_hook) +ENTRY(mcount) cmpl $0, function_trace_stop jne ftrace_stub @@ -212,11 +199,7 @@ trace: MCOUNT_SAVE_FRAME movq RIP(%rsp), %rdi -#ifdef CC_USING_FENTRY - movq SS+16(%rsp), %rsi -#else movq 8(%rbp), %rsi -#endif subq $MCOUNT_INSN_SIZE, %rdi call *ftrace_trace_function @@ -224,7 +207,7 @@ trace: MCOUNT_RESTORE_FRAME jmp ftrace_stub -END(function_hook) +END(mcount) #endif /* CONFIG_DYNAMIC_FTRACE */ #endif /* CONFIG_FUNCTION_TRACER */ @@ -232,14 +215,9 @@ END(function_hook) ENTRY(ftrace_graph_caller) MCOUNT_SAVE_FRAME -#ifdef CC_USING_FENTRY - leaq SS+16(%rsp), %rdi - movq $0, %rdx /* No framepointers needed */ -#else leaq 8(%rbp), %rdi - movq (%rbp), %rdx -#endif movq RIP(%rsp), %rsi + movq (%rbp), %rdx subq $MCOUNT_INSN_SIZE, %rsi call prepare_ftrace_return diff --git a/trunk/arch/x86/kernel/x8664_ksyms_64.c b/trunk/arch/x86/kernel/x8664_ksyms_64.c index 1330dd102950..6020f6f5927c 100644 --- a/trunk/arch/x86/kernel/x8664_ksyms_64.c +++ b/trunk/arch/x86/kernel/x8664_ksyms_64.c @@ -13,13 +13,9 @@ #include #ifdef CONFIG_FUNCTION_TRACER -/* mcount and __fentry__ are defined in assembly */ -#ifdef CC_USING_FENTRY -EXPORT_SYMBOL(__fentry__); -#else +/* mcount is defined in assembly */ EXPORT_SYMBOL(mcount); #endif -#endif EXPORT_SYMBOL(__get_user_1); EXPORT_SYMBOL(__get_user_2); diff --git a/trunk/kernel/trace/Kconfig b/trunk/kernel/trace/Kconfig index 9301a0e35e0c..8c4c07071cc5 100644 --- a/trunk/kernel/trace/Kconfig +++ b/trunk/kernel/trace/Kconfig @@ -49,11 +49,6 @@ config HAVE_SYSCALL_TRACEPOINTS help See Documentation/trace/ftrace-design.txt -config HAVE_FENTRY - bool - help - Arch supports the gcc options -pg with -mfentry - config HAVE_C_RECORDMCOUNT bool help diff --git a/trunk/kernel/trace/trace_functions_graph.c b/trunk/kernel/trace/trace_functions_graph.c index 99b4378393d5..ce27c8ba8d31 100644 --- a/trunk/kernel/trace/trace_functions_graph.c +++ b/trunk/kernel/trace/trace_functions_graph.c @@ -143,7 +143,7 @@ ftrace_pop_return_trace(struct ftrace_graph_ret *trace, unsigned long *ret, return; } -#if defined(CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST) && !defined(CC_USING_FENTRY) +#ifdef CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST /* * The arch may choose to record the frame pointer used * and check it here to make sure that it is what we expect it @@ -154,9 +154,6 @@ ftrace_pop_return_trace(struct ftrace_graph_ret *trace, unsigned long *ret, * * Currently, x86_32 with optimize for size (-Os) makes the latest * gcc do the above. - * - * Note, -mfentry does not use frame pointers, and this test - * is not needed if CC_USING_FENTRY is set. */ if (unlikely(current->ret_stack[index].fp != frame_pointer)) { ftrace_graph_stop(); diff --git a/trunk/scripts/recordmcount.h b/trunk/scripts/recordmcount.h index 9d1421e63ff8..54e35c1e5948 100644 --- a/trunk/scripts/recordmcount.h +++ b/trunk/scripts/recordmcount.h @@ -261,13 +261,11 @@ static unsigned get_mcountsym(Elf_Sym const *const sym0, &sym0[Elf_r_sym(relp)]; char const *symname = &str0[w(symp->st_name)]; char const *mcount = gpfx == '_' ? "_mcount" : "mcount"; - char const *fentry = "__fentry__"; if (symname[0] == '.') ++symname; /* ppc64 hack */ if (strcmp(mcount, symname) == 0 || - (altmcount && strcmp(altmcount, symname) == 0) || - (strcmp(fentry, symname) == 0)) + (altmcount && strcmp(altmcount, symname) == 0)) mcountsym = Elf_r_sym(relp); return mcountsym; diff --git a/trunk/tools/perf/Makefile b/trunk/tools/perf/Makefile index 6bd888d04b6e..722ddee61f9f 100644 --- a/trunk/tools/perf/Makefile +++ b/trunk/tools/perf/Makefile @@ -493,7 +493,7 @@ endif FLAGS_UNWIND=$(LIBUNWIND_CFLAGS) $(ALL_CFLAGS) $(LIBUNWIND_LDFLAGS) $(ALL_LDFLAGS) $(EXTLIBS) $(LIBUNWIND_LIBS) ifneq ($(call try-cc,$(SOURCE_LIBUNWIND),$(FLAGS_UNWIND)),y) - msg := $(warning No libunwind found. Please install libunwind >= 0.99); + msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 0.99); NO_LIBUNWIND := 1 endif # Libunwind support endif # NO_LIBUNWIND