Home | History | Annotate | Line # | Download | only in Examples
      1 The following are examples of rb_flow.d.
      2 
      3 This is a simple script to trace the flow of Ruby functions.
      4 Here it traces the example program, Code/Ruby/func_abc.rb
      5  
      6 # rb_flow.d
      7   C TIME(us)         FILE                   -- CLASS::METHOD
      8   0 3066417516583    func_abc.rb            -> Module::method_added
      9   0 3066417516640    func_abc.rb            <- Module::method_added
     10   0 3066417516658    func_abc.rb            -> Module::method_added
     11   0 3066417516668    func_abc.rb            <- Module::method_added
     12   0 3066417516680    func_abc.rb            -> Module::method_added
     13   0 3066417516689    func_abc.rb            <- Module::method_added
     14   0 3066417516701    func_abc.rb            -> Object::func_a
     15   0 3066417516711    func_abc.rb              -> Object::print
     16   0 3066417516730    func_abc.rb                -> IO::write
     17   0 3066417516832    func_abc.rb                <- IO::write
     18   0 3066417516841    func_abc.rb              <- Object::print
     19   0 3066417516849    func_abc.rb              -> Object::sleep
     20   0 3066418520705    func_abc.rb              <- Object::sleep
     21   0 3066418520727    func_abc.rb              -> Object::func_b
     22   0 3066418520744    func_abc.rb                -> Object::print
     23   0 3066418520753    func_abc.rb                  -> IO::write
     24   0 3066418520796    func_abc.rb                  <- IO::write
     25   0 3066418520805    func_abc.rb                <- Object::print
     26   0 3066418520813    func_abc.rb                -> Object::sleep
     27   0 3066419530803    func_abc.rb                <- Object::sleep
     28   0 3066419530825    func_abc.rb                -> Object::func_c
     29   0 3066419530842    func_abc.rb                  -> Object::print
     30   0 3066419530852    func_abc.rb                    -> IO::write
     31   0 3066419530893    func_abc.rb                    <- IO::write
     32   0 3066419530902    func_abc.rb                  <- Object::print
     33   0 3066419530910    func_abc.rb                  -> Object::sleep
     34   0 3066420540804    func_abc.rb                  <- Object::sleep
     35   0 3066420540822    func_abc.rb                <- Object::func_c
     36   0 3066420540831    func_abc.rb              <- Object::func_b
     37   0 3066420540840    func_abc.rb            <- Object::func_a
     38 ^C
     39 
     40 The fourth column is indented by 2 spaces to show when a new function begins.
     41 This shows which function is calling which - the output above begins by adding
     42 new methods, then showing that func_a began; did some print IO; slept, and 
     43 returned from sleep; and then called func_b.
     44 
     45 The TIME(us) column shows time from boot in microseconds.
     46 
     47 The FILE column shows the file that was being executed. 
     48 
     49 If the output looks illogical, check the CPU "C" column - if it changes,
     50 then the output is probably shuffled. See Notes/ALLsnoop_notes.txt for
     51 details and suggested workarounds.
     52 
     53 See Notes/ALLflow_notes.txt for important notes about reading flow outputs.
     54 
     55