On Mon, 21 Nov 2022 17:26:15 +0000 Mark Rutland <mark.rutland@xxxxxxx> wrote: > ... and since arm64 can be built with DYNAMIC_FTRACE=n we end up with: > > CONFIG_DYNAMIC_FTRACE=n Is there any reason to have CONFIG_DYNAMIC_FTRACE=n and CONFIG_FUNCTION_TRACE=y? The only reason I keep the option to turn off DYNAMIC_FTRACE is for debugging purposes. That is, if you have HAVE_DYNAMIC_FTRACE, then DYNAMIC_FTRACE should be enabled whenever it is needed by something else. The reason for static ftrace is simply to help new architectures work their way to having DYNAMIC_FTRACE enabled. Perhaps the solution is to get rid of the DYNAMIC_FRACE prompt, and have it set whenever FUNCTION_TRACER is set and HAVE_DYNAMIC_FTRACE is set. For debugging purposes, I may add HAVE_DEBUG_DYNAMIC_FTRACE which brings back the prompt (for x86 only). -- Steve > CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y > CONFIG_DYNAMIC_FTRACE_WITH_ARGS=n > > Looking at this some more, ftrace_regs_has_args() should check for > CONFIG_DYNAMIC_FTRACE_WITH_ARGS rather than > CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS, or it'll bogusly report we have args when > CONFIG_DYNAMIC_FTRACE=n. > > I'd prefer to change the core ftrace code to check for > CONFIG_DYNAMIC_FTRACE_WITH_ARGS for consistency with that, but I'll need to > check how that affects other architectures.