]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fgraph: Use fgraph data to store subtime for profiler
authorSteven Rostedt <rostedt@goodmis.org>
Sat, 14 Sep 2024 21:48:06 +0000 (17:48 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Mon, 30 Sep 2024 15:12:46 +0000 (11:12 -0400)
commita312a0f7834e605e7c41570f0e9525d0fc4a70a4
treef81fc113c06081f51ce1a7f6b070c636338d778a
parenta370b72ec7165ebe1230d0225cbe66f6526e68ef
fgraph: Use fgraph data to store subtime for profiler

Instead of having the "subtime" for the function profiler in the
infrastructure ftrace_ret_stack structure, have it use the fgraph data
reserve and retrieve functions.

This will keep the limited shadow stack from wasting 8 bytes for something
that is seldom used.

Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <olsajiri@gmail.com>
Link: https://lore.kernel.org/20240914214826.780323141@goodmis.org
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
include/linux/ftrace.h
kernel/trace/fgraph.c
kernel/trace/ftrace.c