summaryrefslogtreecommitdiffstats
path: root/scripts/generate_rust_analyzer.py
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2025-04-11 13:30:15 -0400
committerSteven Rostedt (Google) <rostedt@goodmis.org>2025-04-12 12:13:30 -0400
commit485acd207d7daf8cf941a5f0fd0c09bc6d049402 (patch)
treea8ddf0cd9bdba761b5435b67cb1a3c71f72995cd /scripts/generate_rust_analyzer.py
parenta1fc89d409d8fd927622c238b7c7d719e9ecab3d (diff)
downloadlinux-485acd207d7daf8cf941a5f0fd0c09bc6d049402.tar.gz
linux-485acd207d7daf8cf941a5f0fd0c09bc6d049402.tar.bz2
linux-485acd207d7daf8cf941a5f0fd0c09bc6d049402.zip
ftrace: Do not have print_graph_retval() add a newline
The retval and retaddr options for function_graph tracer will add a comment at the end of a function for both leaf and non leaf functions that looks like: __wake_up_common(); /* ret=0x1 */ } /* pick_next_task_fair ret=0x0 */ The function print_graph_retval() adds a newline after the "*/". But if that's not called, the caller function needs to make sure there's a newline added. This is confusing and when the function parameters code was added, it added a newline even when calling print_graph_retval() as the fact that the print_graph_retval() function prints a newline isn't obvious. This caused an extra newline to be printed and that made it fail the selftests when the retval option was set, as the selftests were not expecting blank lines being injected into the trace. Instead of having print_graph_retval() print a newline, just have the caller always print the newline regardless if it calls print_graph_retval() or not. This not only fixes this bug, but it also simplifies the code. 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/20250411133015.015ca393@gandalf.local.home Reported-by: Mark Brown <broonie@kernel.org> Tested-by: Mark Brown <broonie@kernel.org> Closes: https://lore.kernel.org/all/ccc40f2b-4b9e-4abd-8daf-d22fce2a86f0@sirena.org.uk/ Fixes: ff5c9c576e754 ("ftrace: Add support for function argument to graph tracer") Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions