From 4297c1b2d07fec7f50b70e26e3adb4d062b19e15 Mon Sep 17 00:00:00 2001 From: gnn Date: Sat, 12 May 2012 20:38:18 +0000 Subject: Add the remaining scripts from the DTraceToolkit, version 0.99, to the vendor tree. http://www.brendangregg.com/dtrace.html#DTraceToolkit --- Examples/php_syscolors_example.txt | 63 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 Examples/php_syscolors_example.txt (limited to 'Examples/php_syscolors_example.txt') diff --git a/Examples/php_syscolors_example.txt b/Examples/php_syscolors_example.txt new file mode 100644 index 0000000..96b26a8 --- /dev/null +++ b/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 +0 18426/1 8 func_abc.php:22 func -> func_a +0 18426/1 41 func_abc.php:18 func -> sleep +0 18426/1 15 ":- syscall -> nanosleep +0 18426/1 1008700 ":- syscall <- nanosleep +0 18426/1 30 func_abc.php:18 func <- sleep +0 18426/1 42 func_abc.php:19 func -> func_b +0 18426/1 28 func_abc.php:11 func -> sleep +0 18426/1 14 ":- syscall -> nanosleep +0 18426/1 1010083 ":- syscall <- nanosleep +0 18426/1 29 func_abc.php:11 func <- sleep +0 18426/1 43 func_abc.php:12 func -> func_c +0 18426/1 28 func_abc.php:5 func -> sleep +0 18426/1 14 ":- syscall -> nanosleep +0 18426/1 1009794 ":- syscall <- nanosleep +0 18426/1 28 func_abc.php:5 func <- sleep +0 18426/1 34 func_abc.php:6 func <- func_c +0 18426/1 18 func_abc.php:13 func <- func_b +0 18426/1 17 func_abc.php:20 func <- func_a +0 18426/1 21 ":- syscall -> fchdir +0 18426/1 19 ":- syscall <- fchdir +0 18426/1 9 ":- syscall -> close +0 18426/1 13 ":- syscall <- close +0 18426/1 35 ":- syscall -> semsys +0 18426/1 12 ":- syscall <- semsys +0 18426/1 7 ":- syscall -> semsys +0 18426/1 7 ":- syscall <- semsys +0 18426/1 66 ":- syscall -> setitimer +0 18426/1 8 ":- syscall <- setitimer +0 18426/1 39 ":- syscall -> read +0 18426/1 14 ":- syscall <- read +0 18426/1 11 ":- syscall -> writev +0 18426/1 22 ":- syscall <- writev +0 18426/1 23 ":- syscall -> write +0 18426/1 110 ":- syscall <- write +0 18426/1 61 ":- syscall -> pollsys + +In this excerpt: +0 18426/1 43 func_abc.php:12 func -> func_c +0 18426/1 28 func_abc.php:5 func -> sleep +0 18426/1 14 ":- syscall -> nanosleep +0 18426/1 1009794 ":- syscall <- nanosleep +0 18426/1 28 func_abc.php:5 func <- sleep +0 18426/1 34 func_abc.php:6 func <- func_c + +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. + -- cgit v1.1