ftrace: Don't allocate ftrace module map if ftrace is disabled
authorYe Bin <yebin10@huawei.com>
Thu, 29 May 2025 11:19:55 +0000 (19:19 +0800)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Mon, 2 Jun 2025 17:12:26 +0000 (13:12 -0400)
commit5834a597386c59fedc601a81091028074d6ae9a2
treeceeadcc63361e6e5e9c14db20b2b0e3ff94d98fb
parentf914b52c379c12288b7623bb814d0508dbe7481d
ftrace: Don't allocate ftrace module map if ftrace is disabled

If ftrace is disabled, it is meaningless to allocate a module map.
Add a check in allocate_ftrace_mod_map() to not allocate if ftrace is
disabled.

Link: https://lore.kernel.org/20250529111955.2349189-3-yebin@huaweicloud.com
Signed-off-by: Ye Bin <yebin10@huawei.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/ftrace.c