diff options
author | Helge Deller | 2016-04-29 22:07:31 +0200 |
---|---|---|
committer | Helge Deller | 2016-05-22 21:46:21 +0200 |
commit | 4df3c9ec12077384e0add54f28a9b079a87b59ef (patch) | |
tree | 456bf8e9bca4ae2b5e5d1afb58246da6ba5ee65e /arch | |
parent | a4351cb5511b917556c796d97068318a53a00849 (diff) |
parisc: Merge ftrace C-helper and assembler functions into .text.hot section
When enabling all-branch ftrace support (CONFIG_PROFILE_ALL_BRANCHES)
the kernel gets really huge and some ftrace assembler functions like
mcount can't reach the ftrace helper functions which are written in C.
Avoid this problem of too distant branches by moving the ftrace C-helper
functions into the .text.hot section which is put in front of the
standard .text section by the linker.
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/parisc/kernel/entry.S | 2 | ||||
-rw-r--r-- | arch/parisc/kernel/ftrace.c | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index 39127d3e70e5..2b2b0df67be5 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S @@ -667,7 +667,7 @@ * boundary */ - .text + .section .text.hot .align 2048 ENTRY(fault_vector_20) diff --git a/arch/parisc/kernel/ftrace.c b/arch/parisc/kernel/ftrace.c index b13f9ec6f294..a828a0adf52c 100644 --- a/arch/parisc/kernel/ftrace.c +++ b/arch/parisc/kernel/ftrace.c @@ -18,12 +18,15 @@ #include <asm/ftrace.h> +#define __hot __attribute__ ((__section__ (".text.hot"))) + #ifdef CONFIG_FUNCTION_GRAPH_TRACER /* * Hook the return address and push it in the stack of return addrs * in current thread info. */ -static void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr) +static void __hot prepare_ftrace_return(unsigned long *parent, + unsigned long self_addr) { unsigned long old; struct ftrace_graph_ent trace; @@ -53,7 +56,7 @@ static void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr } #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ -void notrace ftrace_function_trampoline(unsigned long parent, +void notrace __hot ftrace_function_trampoline(unsigned long parent, unsigned long self_addr, unsigned long org_sp_gr3) { |