]> www.infradead.org Git - users/jedix/linux-maple.git/commit
function_graph: Make fgraph_update_pid_func() a stub for !DYNAMIC_FTRACE
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Fri, 7 Jun 2024 13:48:33 +0000 (09:48 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Mon, 10 Jun 2024 22:08:23 +0000 (18:08 -0400)
commit4267fda4afd9fcf1f92b6bfa0259295f140c8ecd
tree223f2050786c60711d59f1a6614603d2754a25b1
parent2f6b884dfcc55065b76d2bf1e2424b93991ae92d
function_graph: Make fgraph_update_pid_func() a stub for !DYNAMIC_FTRACE

When CONFIG_DYNAMIC_FTRACE is not set, the function
fgraph_update_pid_func() doesn't do anything. Currently, most of its logic
is within a "#ifdef CONFIG_DYNAMIC_FTRACE" block, but its variables were
declared outside that, and when DYNAMIC_FTRACE is not set, it produces
unused variable warnings.

Instead, just place it (and the helper function fgraph_pid_func()) within
the #ifdef block and have the header file use a empty stub function for
when DYNAMIC_FTRACE is not defined.

Link: https://lore.kernel.org/linux-trace-kernel/20240607094833.6a787d73@rorschach.local.home
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202406071806.BRjaC5FF-lkp@intel.com/
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/fgraph.c
kernel/trace/ftrace_internal.h