Skip to content

Commit 94d529a

Browse files
committed
ftrace: Document that multiple function_graph tracing may have different times
The function graph tracer now calculates the calltime internally and for each instance. If there are two instances that are running function graph tracer and are tracing the same functions, the timings of the length of those functions may be slightly different: # trace-cmd record -B foo -p function_graph -B bar -p function_graph sleep 5 # trace-cmd report [..] bar: sleep-981 [000] ...1. 1101.109027: funcgraph_entry: 0.764 us | mutex_unlock(); (ret=0xffff8abcc256c300) foo: sleep-981 [000] ...1. 1101.109028: funcgraph_entry: 0.748 us | mutex_unlock(); (ret=0xffff8abcc256c300) bar: sleep-981 [000] ..... 1101.109029: funcgraph_exit: 2.456 us | } (ret=0xffff8abcc256c300) foo: sleep-981 [000] ..... 1101.109029: funcgraph_exit: 2.403 us | } (ret=0xffff8abcc256c300) bar: sleep-981 [000] d..1. 1101.109031: funcgraph_entry: 0.844 us | fpregs_assert_state_consistent(); (ret=0x0) foo: sleep-981 [000] d..1. 1101.109032: funcgraph_entry: 0.803 us | fpregs_assert_state_consistent(); (ret=0x0) Link: https://lore.kernel.org/all/[email protected]/ Cc: Mark Rutland <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Suggested-by: Masami Hiramatsu <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 24e0e61 commit 94d529a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Documentation/trace/ftrace.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,12 @@ Here is the list of current tracers that may be configured.
810810
to draw a graph of function calls similar to C code
811811
source.
812812

813+
Note that the function graph calculates the timings of when the
814+
function starts and returns internally and for each instance. If
815+
there are two instances that run function graph tracer and traces
816+
the same functions, the length of the timings may be slightly off as
817+
each read the timestamp separately and not at the same time.
818+
813819
"blk"
814820

815821
The block tracer. The tracer used by the blktrace user

0 commit comments

Comments
 (0)