ftrace: Show subops in enabled_functions
authorSteven Rostedt <rostedt@goodmis.org>
Thu, 10 Apr 2025 19:38:30 +0000 (15:38 -0400)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 8 May 2025 13:36:08 +0000 (09:36 -0400)
commit88cefd99ee265b18f851b911a75282146ecabc3d
treed3b869ecb5485a50975d2f922af9b4b019b83818
parent54c53dfdb681f65e0cc65ddb1e05d145fea5ae60
ftrace: Show subops in enabled_functions

The function graph infrastructure uses subops of the function tracer.
These are not shown in enabled_functions. Add a "subops:" section to the
enabled_functions line to show what functions are attached via subops. If
the subops is from the function_graph infrastructure, then show the entry
and return callbacks that are attached.

Here's an example of the output:

schedule_on_each_cpu (1)                tramp: 0xffffffffc03ef000 (ftrace_graph_func+0x0/0x60) ->ftrace_graph_func+0x0/0x60     subops: {ent:trace_graph_entry+0x0/0x20 ret:trace_graph_return+0x0/0x150}

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/20250410153830.5d97f108@gandalf.local.home
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
include/linux/ftrace.h
kernel/trace/fgraph.c
kernel/trace/ftrace.c