aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--kernel/trace/Kconfig5
2 files changed, 10 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index ddf5be952e45..e7ca93f17851 100644
--- a/Makefile
+++ b/Makefile
@@ -609,7 +609,11 @@ KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly)
609endif 609endif
610 610
611ifdef CONFIG_FUNCTION_TRACER 611ifdef CONFIG_FUNCTION_TRACER
612KBUILD_CFLAGS += -pg 612ifdef CONFIG_HAVE_FENTRY
613CC_USING_FENTRY := $(call cc-option, -mfentry -DCC_USING_FENTRY)
614endif
615KBUILD_CFLAGS += -pg $(CC_USING_FENTRY)
616KBUILD_AFLAGS += $(CC_USING_FENTRY)
613ifdef CONFIG_DYNAMIC_FTRACE 617ifdef CONFIG_DYNAMIC_FTRACE
614 ifdef CONFIG_HAVE_C_RECORDMCOUNT 618 ifdef CONFIG_HAVE_C_RECORDMCOUNT
615 BUILD_C_RECORDMCOUNT := y 619 BUILD_C_RECORDMCOUNT := y
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 8c4c07071cc5..9301a0e35e0c 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -49,6 +49,11 @@ config HAVE_SYSCALL_TRACEPOINTS
49 help 49 help
50 See Documentation/trace/ftrace-design.txt 50 See Documentation/trace/ftrace-design.txt
51 51
52config HAVE_FENTRY
53 bool
54 help
55 Arch supports the gcc options -pg with -mfentry
56
52config HAVE_C_RECORDMCOUNT 57config HAVE_C_RECORDMCOUNT
53 bool 58 bool
54 help 59 help