freebsd-skq/cddl/contrib/dtracetoolkit/Examples/js_flow_example.txt

42 lines
1.9 KiB
Plaintext

The following are examples of js_flow.d.
This is a simple script to trace the flow of JavaScript functions.
Here it traces the example program, Code/JavaScript/func_clock.html
# js_flow.d
C TIME(us) FILE -- FUNC
0 3650471830941 func_clock.html -> start
0 3650471831005 func_clock.html -> getElementById
0 3650471831058 func_clock.html <- getElementById
0 3650471831890 func_clock.html -> func_a
0 3650471831906 func_clock.html -> getElementById
0 3650471831929 func_clock.html <- getElementById
0 3650471850084 func_clock.html -> func_b
0 3650471850111 func_clock.html -> getElementById
0 3650471850146 func_clock.html <- getElementById
0 3650471886534 func_clock.html -> func_c
0 3650471886573 func_clock.html -> getElementById
0 3650471886624 func_clock.html <- getElementById
0 3650471942212 func_clock.html <- func_c
0 3650471942231 func_clock.html <- func_b
0 3650471942242 func_clock.html <- func_a
0 3650471942300 func_clock.html -> setTimeout
0 3650471942392 func_clock.html <- setTimeout
0 3650471942404 func_clock.html <- start
^C
The fourth column is indented by 2 spaces to show when a new function begins.
This shows which function is calling which - the output above shows that
func_a called func_b, which in turn called func_c.
The TIME(us) column shows time from boot in microseconds.
The FILE column shows the file that was being executed.
If the output looks strange, check the CPU "C" column - if it changes,
then the output is probably shuffled. See Notes/ALLsnoop_notes.txt for
details and suggested workarounds.
See Notes/ALLflow_notes.txt for important notes about reading flow outputs.