Commit 4df3c9ec authored by Helge Deller's avatar Helge Deller

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: default avatarHelge Deller <deller@gmx.de>
parent a4351cb5
...@@ -667,7 +667,7 @@ ...@@ -667,7 +667,7 @@
* boundary * boundary
*/ */
.text .section .text.hot
.align 2048 .align 2048
ENTRY(fault_vector_20) ENTRY(fault_vector_20)
......
...@@ -18,12 +18,15 @@ ...@@ -18,12 +18,15 @@
#include <asm/ftrace.h> #include <asm/ftrace.h>
#define __hot __attribute__ ((__section__ (".text.hot")))
#ifdef CONFIG_FUNCTION_GRAPH_TRACER #ifdef CONFIG_FUNCTION_GRAPH_TRACER
/* /*
* Hook the return address and push it in the stack of return addrs * Hook the return address and push it in the stack of return addrs
* in current thread info. * 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; unsigned long old;
struct ftrace_graph_ent trace; struct ftrace_graph_ent trace;
...@@ -53,7 +56,7 @@ static void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr ...@@ -53,7 +56,7 @@ static void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr
} }
#endif /* CONFIG_FUNCTION_GRAPH_TRACER */ #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 self_addr,
unsigned long org_sp_gr3) unsigned long org_sp_gr3)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment