Re: [PATCH] ftrace: fix static function tracer not working

From: Steven Rostedt
Date: Thu Oct 27 2022 - 09:24:42 EST


On Thu, 27 Oct 2022 16:53:43 +0800
Song Shuai <suagrfillet@xxxxxxxxx> wrote:

> Setting kernel command line parameter ftrace=function shows
> nothing on the kernel built with static ftrace.
>
> In static ftrace, ftrace_nodyn_init should be executed before
> initializing tracers. While this commit `dbeafd0d6131` brings
> the initialization of function tracer forward from core_initcall
> where ftrace_nodyn_init still remains.
>
> This patch puts ftrace_nodyn_init and ftrace_init together and
> makes function tracer works in static ftrace.

Sorry but NACK.

Static ftrace only exists for helping new architectures get dynamic ftrace
working. It is not, and never will be, considered the end product.

Really, I only keep it around as a stepping stone for full dynamic ftrace,
otherwise I would have removed it along time ago.

No generic code should ever be modified to satisfy static ftrace. Please
get dynamic ftrace functional, as that could be used in production
environments.

-- Steve