diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2015-01-09 13:08:28 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-01-29 09:19:25 +0100 |
commit | e6d60b368b45b9be3aa068f8e5fa98c3487c9d4e (patch) | |
tree | abe83543f72b5cd5d5de309dab8551f93c34f023 /arch/s390/Makefile | |
parent | 61f552141c9c0e88b3fdc7046265781ffd8fa68a (diff) | |
download | linux-e6d60b368b45b9be3aa068f8e5fa98c3487c9d4e.tar.gz linux-e6d60b368b45b9be3aa068f8e5fa98c3487c9d4e.tar.bz2 linux-e6d60b368b45b9be3aa068f8e5fa98c3487c9d4e.zip |
s390/ftrace: hotpatch support for function tracing
Make use of gcc's hotpatch support to generate better code for ftrace
function tracing.
The generated code now contains only a six byte nop in each function
prologue instead of a 24 byte code block which will be runtime patched to
support function tracing.
With the new code generation the runtime overhead for supporting function
tracing is close to zero, while the original code did show a significant
performance impact.
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/Makefile')
-rw-r--r-- | arch/s390/Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/s390/Makefile b/arch/s390/Makefile index e742ec5de9a7..acb6859c6a95 100644 --- a/arch/s390/Makefile +++ b/arch/s390/Makefile @@ -87,6 +87,16 @@ ifeq ($(call cc-option-yn,-mwarn-dynamicstack),y) cflags-$(CONFIG_WARN_DYNAMIC_STACK) += -mwarn-dynamicstack endif +ifdef CONFIG_FUNCTION_TRACER +# make use of hotpatch feature if the compiler supports it +cc_hotpatch := -mhotpatch=0,3 +ifeq ($(call cc-option-yn,$(cc_hotpatch)),y) +CC_FLAGS_FTRACE := $(cc_hotpatch) +KBUILD_AFLAGS += -DCC_USING_HOTPATCH +KBUILD_CFLAGS += -DCC_USING_HOTPATCH +endif +endif + KBUILD_CFLAGS += -mbackchain -msoft-float $(cflags-y) KBUILD_CFLAGS += -pipe -fno-strength-reduce -Wno-sign-compare KBUILD_AFLAGS += $(aflags-y) |