1*e137d3e0SchristosThe following are examples of php_flowinfo.d.
2*e137d3e0Schristos
3*e137d3e0SchristosThis is a simple script to trace the flow of PHP functions.
4*e137d3e0SchristosHere it traces the example program, Code/Php/func_abc.php
5*e137d3e0Schristos
6*e137d3e0Schristos# php_flowinfo.d
7*e137d3e0SchristosC    PID/TID   DELTA(us)              FILE:LINE TYPE     -- FUNC
8*e137d3e0Schristos0  18422/1             9      func_abc.php:22   func     -> func_a
9*e137d3e0Schristos0  18422/1            35      func_abc.php:18   func       -> sleep
10*e137d3e0Schristos0  18422/1       1009146      func_abc.php:18   func       <- sleep
11*e137d3e0Schristos0  18422/1            35      func_abc.php:19   func       -> func_b
12*e137d3e0Schristos0  18422/1            24      func_abc.php:11   func         -> sleep
13*e137d3e0Schristos0  18422/1       1009803      func_abc.php:11   func         <- sleep
14*e137d3e0Schristos0  18422/1            34      func_abc.php:12   func         -> func_c
15*e137d3e0Schristos0  18422/1            24      func_abc.php:5    func           -> sleep
16*e137d3e0Schristos0  18422/1       1009953      func_abc.php:5    func           <- sleep
17*e137d3e0Schristos0  18422/1            28      func_abc.php:6    func         <- func_c
18*e137d3e0Schristos0  18422/1            11      func_abc.php:13   func       <- func_b
19*e137d3e0Schristos0  18422/1            10      func_abc.php:20   func     <- func_a
20*e137d3e0Schristos^C
21*e137d3e0Schristos
22*e137d3e0SchristosThe third column is indented by 2 spaces to show when a new function begins.
23*e137d3e0SchristosThis shows which function is calling which - the output above begins by
24*e137d3e0Schristosshowing that func_a() began; slept, and returned from sleep; and then called
25*e137d3e0Schristosfunc_b().
26*e137d3e0Schristos
27*e137d3e0SchristosThe DELTA(us) column shows time from that line to the previous line, and
28*e137d3e0Schristosso can be a bit tricky to read. For example, the second line of data output
29*e137d3e0Schristos(skipping the header) reads as "the time from func_a() beginning to
30*e137d3e0Schristoscalling the sleep function beginning was 35 microseconds".
31*e137d3e0Schristos
32*e137d3e0SchristosThe LINE column shows the line in the file what was being executed. Refer
33*e137d3e0Schristosto the source program to see what this line refers to.
34*e137d3e0Schristos
35*e137d3e0SchristosIf the output looks shuffled, check the CPU "C" column - if it changes,
36*e137d3e0Schristosthen the output is probably shuffled. See Notes/ALLsnoop_notes.txt for
37*e137d3e0Schristosdetails and suggested workarounds.
38*e137d3e0Schristos
39*e137d3e0SchristosSee Notes/ALLflow_notes.txt for important notes about reading flow outputs.
40*e137d3e0Schristos
41