public inbox for linux-trace-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC][PATCH] ftrace: Make DYNAMIC_FTRACE always enabled for architectures that support it
@ 2025-07-03 15:52 Steven Rostedt
  2025-07-03 16:57 ` Linus Torvalds
  0 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2025-07-03 15:52 UTC (permalink / raw)
  To: LKML, Linux trace kernel
  Cc: Masami Hiramatsu, Mathieu Desnoyers, Mark Rutland, Linus Torvalds,
	Alexandre Ghiti, ChenMiao, linux-arch

From: Steven Rostedt <rostedt@goodmis.org>

ftrace has two flavors:

 1) static: Where every function always calls the ftrace trampoline

 2) dynamic: Where each function has nops that can be changed on demand to
             jump to the ftrace trampoline when needed.

The static flavor has very high performance overhead and was only created
to make it easier for architectures to implement the dynamic flavor. An
architecture developer can first implement the static ftrace to make sure
the trampolines work before working on the more complicated dynamic aspect
of ftrace. Once the architecture can support dynamic ftrace, there's no
reason to continue to support the static flavor. In fact, the static
flavor tends to bitrot and bugs start to appear in them.

Remove the prompt to pick DYNAMIC_FTRACE and simply enable it if the
architecture supports it.

Link: https://lore.kernel.org/all/f7e12c6d-892e-4ca3-9ef0-fbb524d04a48@ghiti.fr/

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
 kernel/trace/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig
index a3f35c7d83b6..28afc6941e7a 100644
--- a/kernel/trace/Kconfig
+++ b/kernel/trace/Kconfig
@@ -275,7 +275,7 @@ config FUNCTION_TRACE_ARGS
 	  funcgraph-args (for the function graph tracer)
 
 config DYNAMIC_FTRACE
-	bool "enable/disable function tracing dynamically"
+	bool
 	depends on FUNCTION_TRACER
 	depends on HAVE_DYNAMIC_FTRACE
 	default y
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-07-04 15:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-03 15:52 [RFC][PATCH] ftrace: Make DYNAMIC_FTRACE always enabled for architectures that support it Steven Rostedt
2025-07-03 16:57 ` Linus Torvalds
2025-07-03 19:26   ` Steven Rostedt
2025-07-03 19:49     ` Steven Rostedt
2025-07-03 19:52       ` Steven Rostedt
2025-07-03 20:58     ` Linus Torvalds
2025-07-04 15:12       ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox