xref: /netbsd-src/external/cddl/dtracetoolkit/dist/Examples/php_flowtime_example.txt (revision c29d51755812ace2e87aeefdb06cb2b4dac7087a)
1The following are examples of php_flowtime.d.
2
3This is a simple script to trace the flow of PHP functions.
4Here it traces the example program, Code/Php/func_abc.php
5
6# php_flowtime.d
7  C TIME(us)         FILE             DELTA(us)  -- FUNC
8  0 3646108339057    func_abc.php             9 -> func_a
9  0 3646108339090    func_abc.php            32   -> sleep
10  0 3646109341043    func_abc.php       1001953   <- sleep
11  0 3646109341074    func_abc.php            31   -> func_b
12  0 3646109341098    func_abc.php            23     -> sleep
13  0 3646110350712    func_abc.php       1009614     <- sleep
14  0 3646110350745    func_abc.php            32     -> func_c
15  0 3646110350768    func_abc.php            23       -> sleep
16  0 3646111362323    func_abc.php       1011554       <- sleep
17  0 3646111362351    func_abc.php            27     <- func_c
18  0 3646111362361    func_abc.php            10   <- func_b
19  0 3646111362370    func_abc.php             9 <- func_a
20^C
21
22The fifth column is indented by 2 spaces to show when a new function begins.
23This shows which function is calling which - the output above begins by
24showing that func_a() began; slept, and returned from sleep; and then called
25func_b().
26
27The TIME(us) column shows time since boot.
28
29The DELTA(us) column shows time from that line to the previous line, and
30so can be a bit tricky to read. For example, the second line of data output
31(skipping the header) reads as "the time from func_a() beginning to
32calling the sleep function beginning was 32 microseconds".
33
34The FILE column shows file that was being executed.
35
36If the output looks shuffled, check the CPU "C" and "TIME" columns, and
37post sort based on TIME if necessary.
38
39See Notes/ALLflow_notes.txt for important notes about reading flow outputs.
40
41
42