Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

Following are examples of rb_flowinfo.d.

This is a simple script to trace the flow of Ruby methods.  Here it traces the 
example program, Code/Ruby/func_abc.rb.

# rb_flowinfo.d
C    PID  DELTA(us)              FILE:LINE TYPE     -- NAME
0 146395          2       func_abc.rb:3    method   -> Module::method_added
0 146395         26       func_abc.rb:3    method   <- Module::method_added
0 146395         25       func_abc.rb:8    method   -> Module::method_added
0 146395         11       func_abc.rb:8    method   <- Module::method_added
0 146395         16       func_abc.rb:14   method   -> Module::method_added
0 146395         10       func_abc.rb:14   method   <- Module::method_added
0 146395         15       func_abc.rb:20   method   -> Object::func_a
0 146395         12       func_abc.rb:15   method     -> Object::print
0 146395         20       func_abc.rb:15   method       -> IO::write
0 146395        110       func_abc.rb:15   method       <- IO::write
0 146395         11       func_abc.rb:15   method     <- Object::print
0 146395         11       func_abc.rb:16   method     -> Object::sleep
0 146395    1003728       func_abc.rb:16   method     <- Object::sleep
0 146395         35       func_abc.rb:17   method     -> Object::func_b
0 146395         20       func_abc.rb:9    method       -> Object::print
0 146395         12       func_abc.rb:9    method         -> IO::write
0 146395         42       func_abc.rb:9    method         <- IO::write
0 146395         11       func_abc.rb:9    method       <- Object::print
0 146395         11       func_abc.rb:10   method       -> Object::sleep
0 146395    1009976       func_abc.rb:10   method       <- Object::sleep
0 146395         35       func_abc.rb:11   method       -> Object::func_c
0 146395         20       func_abc.rb:4    method         -> Object::print
0 146395         12       func_abc.rb:4    method           -> IO::write
0 146395         38       func_abc.rb:4    method           <- IO::write
0 146395         11       func_abc.rb:4    method         <- Object::print
0 146395         11       func_abc.rb:5    method         -> Object::sleep
0 146395    1009883       func_abc.rb:5    method         <- Object::sleep
0 146395         29       func_abc.rb:5    method       <- Object::func_c
0 146395         12       func_abc.rb:11   method     <- Object::func_b
0 146395         11       func_abc.rb:17   method   <- Object::func_a
^C

As each method is entered, the last column is indented by 2 spaces. This
shows which method is calling which.

The DELTA(us) column shows the change in time from the previous line to the
current line.

The LINE column shows the line in the file what was being executed. Refer
to the source program to see what this line refers to.

If the output looks shuffled, 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.