xref: /netbsd-src/external/cddl/dtracetoolkit/dist/Docs/Examples/tcl_procflow_example.txt (revision c29d51755812ace2e87aeefdb06cb2b4dac7087a)
1The following are examples of tcl_procflow.d.
2
3This is a simple script to trace the flow of Tcl procedures.
4
5Here it traces the example program, Code/Tcl/func_abc.tcl.
6
7# tcl_procflow.d
8  C    PID TIME(us)         -- PROCEDURE
9  0  16073 3904971507502    -> tclInit
10  0  16073 3904971509096    <- tclInit
11  0  16073 3904971509305    -> func_a
12  0  16073 3904972511039      -> func_b
13  0  16073 3904973521023        -> func_c
14  0  16073 3904974530998        <- func_c
15  0  16073 3904974531008      <- func_b
16  0  16073 3904974531014    <- func_a
17^C
18
19As each procedure starts, the third column is indented by 2 spaces. This
20shows which procedure is calling which - the output above begins with an init
21procedure and then shows that func_a began, and then called func_b.
22
23The columns are CPU, PID, Time since boot, indicator and procedure name.
24
25If the output looks shuffled, check the CPU "C" and "TIME" columns, and
26post sort based on TIME if necessary.
27
28See Notes/ALLflow_notes.txt for important notes about reading flow outputs.
29
30