aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/dtracetoolkit/Examples/js_flow_example.txt
blob: 7a9278d7ce6b60b2fa9a3cf894789793bb55c646 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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.