]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ftrace: Make DYNAMIC_FTRACE always enabled for architectures that support it
authorSteven Rostedt <rostedt@goodmis.org>
Thu, 3 Jul 2025 15:52:22 +0000 (11:52 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Wed, 23 Jul 2025 00:13:16 +0000 (20:13 -0400)
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/
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alexandre Ghiti <alex@ghiti.fr>
Cc: ChenMiao <chenmiao.ku@gmail.com>
Link: https://lore.kernel.org/20250703115222.2d7c8cd5@batman.local.home
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/Kconfig

index a3f35c7d83b6c5e669635f9e3f9ac5347ff72337..28afc6941e7a5bc7bf76c6b85d4a13ed6a2b19bb 100644 (file)
@@ -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