Re: [PATCH] fgraph: Move trace_clock_local() for return time to function_graph tracer

From
Steven Rostedt <rostedt@goodmis.org>
Date
2025-01-14 15:05:53
Also in
bpf, lkml
Reply to
Masami Hiramatsu (Google), 2025-01-14
On Tue, 14 Jan 2025 10:18:06 +0900
Masami Hiramatsu (Google) [off-list ref] wrote:
quoted
I'd rather just nuke the calltime and rettime from struct ftrace_graph_ret.  
Yeah, this one is good to me. But this will make a slightly different time
for the same function when we enable multiple function graph tracer on
different instances (mine records it once and reuse it but this will record
on each instance). We may need to notice it on the document. :)
And I believe it's separate for each instance now anyway, so I was going to
send this to Linus as well:
diff --git a/Documentation/trace/ftrace.rst b/Documentation/trace/ftrace.rst
index 272464bb7c60..2b74f96d09d5 100644
--- a/Documentation/trace/ftrace.rst
+++ b/Documentation/trace/ftrace.rst
@@ -810,6 +810,12 @@ Here is the list of current tracers that may be configured.
 	to draw a graph of function calls similar to C code
 	source.
 
+	Note that the function graph calculates the timings of when the
+	function starts and returns internally and for each instance. If
+	there are two instances that run function graph tracer and traces
+	the same functions, the length of the timings may be slightly off as
+	each read the timestamp separately and not at the same time.
+
   "blk"
 
 	The block tracer. The tracer used by the blktrace user

Reviewed-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Thanks,

-- Steve
Thread (39 messages) 39 messages, 5 authors, last reply 2025-02-06
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help