diff mbox series

[bpf-next,1/4] ftrace: Allow users to disable ftrace direct call

Message ID 20220913063146.74750-2-xukuohai@huaweicloud.com (mailing list archive)
State New, archived
Headers show
Series Add ftrace direct call for arm64 | expand

Commit Message

Xu Kuohai Sept. 13, 2022, 6:31 a.m. UTC
From: Xu Kuohai <xukuohai@huawei.com>

To support ftrace direct call on arm64, multiple NOP instructions need
to be added to the ftrace fentry, which will make the kernel image
larger. For users who don't need direct calls, they should not pay this
unnecessary price, so they should be allowed to disable this option.

Signed-off-by: Xu Kuohai <xukuohai@huawei.com>
---
 kernel/trace/Kconfig | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index 1052126bdca2..fc8a22f1a6a0 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -240,9 +240,14 @@  config DYNAMIC_FTRACE_WITH_REGS
 	depends on HAVE_DYNAMIC_FTRACE_WITH_REGS
 
 config DYNAMIC_FTRACE_WITH_DIRECT_CALLS
-	def_bool y
+	bool "Support for calling custom trampoline from fentry directly"
+	default y
 	depends on DYNAMIC_FTRACE_WITH_REGS
 	depends on HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
+	help
+	  This option enables calling custom trampoline from ftrace fentry
+	  directly, instead of using ftrace regs caller. This may reserve more
+	  space in the fentry, making the kernel image larger.
 
 config DYNAMIC_FTRACE_WITH_ARGS
 	def_bool y