[PATCH v7 2/2] ARM: ftrace: Add MODULE_PLTS support

Steven Rostedt rostedt at goodmis.org
Mon Mar 22 15:01:06 GMT 2021


On Sun, 21 Mar 2021 19:06:11 +0000
Qais Yousef <qais.yousef at arm.com> wrote:

>  #ifdef CONFIG_DYNAMIC_FTRACE
>  struct dyn_arch_ftrace {
> -#ifdef CONFIG_ARM_MODULE_PLTS
>  	struct module *mod;
> -#endif
>  };
>  

I know you want to reduce the "ifdefery", but please note that the
dyn_arch_ftrace is defined once for every function that can be traced. If
you have 40,000 functions that can be traced, that pointer is created
40,000 times. Thus, you really only want fields in the struct
dyn_arch_ftrace if you really need them, otherwise, that's a lot of memory
that is wasted.

-- Steve



More information about the linux-arm-kernel mailing list