diff options
Diffstat (limited to 'cddl/contrib/dtracetoolkit/Examples/php_syscolors_example.txt')
-rw-r--r-- | cddl/contrib/dtracetoolkit/Examples/php_syscolors_example.txt | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/cddl/contrib/dtracetoolkit/Examples/php_syscolors_example.txt b/cddl/contrib/dtracetoolkit/Examples/php_syscolors_example.txt new file mode 100644 index 0000000..96b26a8 --- /dev/null +++ b/cddl/contrib/dtracetoolkit/Examples/php_syscolors_example.txt @@ -0,0 +1,63 @@ +The following are examples of php_syscolors.d. + +This is a simple script to trace the flow of PHP functions and system +calls made, and renders the output in color ("colour") using terminal +escape sequences (which you can tweak by modifying the script). + +Here it traces the example program, Code/Php/func_abc.php. + +WARNING: This output is full of terminal escape sequences, so if you are +trying to view this through an editor or web browser - it may look awful. +Try viewing this using "more" (although, depending on your terminal, it +still may look awful). + +# php_syscolors.d +C PID/TID DELTA(us) FILE:LINE TYPE -- NAME +[2;35m0 18426/1 8 func_abc.php:22 func -> func_a[0m +[2;35m0 18426/1 41 func_abc.php:18 func -> sleep[0m +[2;32m0 18426/1 15 ":- syscall -> nanosleep[0m +[2;32m0 18426/1 1008700 ":- syscall <- nanosleep[0m +[2;35m0 18426/1 30 func_abc.php:18 func <- sleep[0m +[2;35m0 18426/1 42 func_abc.php:19 func -> func_b[0m +[2;35m0 18426/1 28 func_abc.php:11 func -> sleep[0m +[2;32m0 18426/1 14 ":- syscall -> nanosleep[0m +[2;32m0 18426/1 1010083 ":- syscall <- nanosleep[0m +[2;35m0 18426/1 29 func_abc.php:11 func <- sleep[0m +[2;35m0 18426/1 43 func_abc.php:12 func -> func_c[0m +[2;35m0 18426/1 28 func_abc.php:5 func -> sleep[0m +[2;32m0 18426/1 14 ":- syscall -> nanosleep[0m +[2;32m0 18426/1 1009794 ":- syscall <- nanosleep[0m +[2;35m0 18426/1 28 func_abc.php:5 func <- sleep[0m +[2;35m0 18426/1 34 func_abc.php:6 func <- func_c[0m +[2;35m0 18426/1 18 func_abc.php:13 func <- func_b[0m +[2;35m0 18426/1 17 func_abc.php:20 func <- func_a[0m +[2;32m0 18426/1 21 ":- syscall -> fchdir[0m +[2;32m0 18426/1 19 ":- syscall <- fchdir[0m +[2;32m0 18426/1 9 ":- syscall -> close[0m +[2;32m0 18426/1 13 ":- syscall <- close[0m +[2;32m0 18426/1 35 ":- syscall -> semsys[0m +[2;32m0 18426/1 12 ":- syscall <- semsys[0m +[2;32m0 18426/1 7 ":- syscall -> semsys[0m +[2;32m0 18426/1 7 ":- syscall <- semsys[0m +[2;32m0 18426/1 66 ":- syscall -> setitimer[0m +[2;32m0 18426/1 8 ":- syscall <- setitimer[0m +[2;32m0 18426/1 39 ":- syscall -> read[0m +[2;32m0 18426/1 14 ":- syscall <- read[0m +[2;32m0 18426/1 11 ":- syscall -> writev[0m +[2;32m0 18426/1 22 ":- syscall <- writev[0m +[2;32m0 18426/1 23 ":- syscall -> write[0m +[2;32m0 18426/1 110 ":- syscall <- write[0m +[2;32m0 18426/1 61 ":- syscall -> pollsys[0m + +In this excerpt: +[2;35m0 18426/1 43 func_abc.php:12 func -> func_c[0m +[2;35m0 18426/1 28 func_abc.php:5 func -> sleep[0m +[2;32m0 18426/1 14 ":- syscall -> nanosleep[0m +[2;32m0 18426/1 1009794 ":- syscall <- nanosleep[0m +[2;35m0 18426/1 28 func_abc.php:5 func <- sleep[0m +[2;35m0 18426/1 34 func_abc.php:6 func <- func_c[0m + +we can see that we are at Line 12 of the program which invokes func_c. func_c +then invokes sleep, which uses the syscall nanosleep. Approximately one +second later nanosleep returns, then sleep finishes, then func_c finishes. + |