summaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2014-09-03 13:26:23 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-09-09 08:53:30 +0200
commit3d1e220d08c6a00ffa83d39030b8162f66665b2b (patch)
tree4529f0d568ef53d296476a640d26ae0128bcbacf /arch/s390/include/asm
parentea2f47699082b971769be8b8f38c08b49219f471 (diff)
downloadop-kernel-dev-3d1e220d08c6a00ffa83d39030b8162f66665b2b.zip
op-kernel-dev-3d1e220d08c6a00ffa83d39030b8162f66665b2b.tar.gz
s390/ftrace: optimize mcount code
Reduce the number of executed instructions within the mcount block if function tracing is enabled. We achieve that by using a non-standard C function call ABI. Since the called function is also written in assembler this is not a problem. This also allows to replace the unconditional store at the beginning of the mcount block with a larl instruction, which doesn't touch memory. In theory we could also patch the first instruction of the mcount block to enable and disable function tracing. However this would break kprobes. This could be fixed with implementing the "kprobes_on_ftrace" feature; however keeping the odd jprobes working seems not to be possible without a lot of code churn. Therefore keep the code easy and simply accept one wasted 1-cycle "larl" instruction per function prologue. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm')
-rw-r--r--arch/s390/include/asm/ftrace.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/include/asm/ftrace.h b/arch/s390/include/asm/ftrace.h
index 1759d73..d419362 100644
--- a/arch/s390/include/asm/ftrace.h
+++ b/arch/s390/include/asm/ftrace.h
@@ -19,7 +19,7 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr)
#endif /* __ASSEMBLY__ */
#ifdef CONFIG_64BIT
-#define MCOUNT_INSN_SIZE 12
+#define MCOUNT_INSN_SIZE 18
#else
#define MCOUNT_INSN_SIZE 22
#endif
OpenPOWER on IntegriCloud