Differences between revisions 4 and 5
Revision 4 as of 2012-01-05 20:01:49
Size: 1710
Editor: 78-80-253-33
Comment: counting method calls article link
Revision 5 as of 2013-04-11 17:48:50
Size: 2211
Editor: WilliamCohen
Comment: Add information about ruby 2.0
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

Ruby-2.0.0 in Fedora 19 include the following user-space markers:

{{{
ruby.array.create
ruby.cmethod.entry
ruby.cmethod.return
ruby.find.require.entry
ruby.find.require.return
ruby.gc.mark.begin
ruby.gc.mark.end
ruby.gc.sweep.begin
ruby.gc.sweep.end
ruby.hash.create
ruby.load.entry
ruby.load.return
ruby.method.entry
ruby.method.return
ruby.object.create
ruby.parse.begin
ruby.parse.end
ruby.raise
ruby.require.entry
ruby.require.return
ruby.string.create
}}}
Line 6: Line 32:
function. The Ruby user-space probes available are: function. The Ruby user-space probes available in RHEL-6.2 are:

Ruby User-Space Markers

Ruby-2.0.0 in Fedora 19 include the following user-space markers:

ruby.array.create
ruby.cmethod.entry
ruby.cmethod.return
ruby.find.require.entry
ruby.find.require.return
ruby.gc.mark.begin
ruby.gc.mark.end
ruby.gc.sweep.begin
ruby.gc.sweep.end
ruby.hash.create
ruby.load.entry
ruby.load.return
ruby.method.entry
ruby.method.return
ruby.object.create
ruby.parse.begin
ruby.parse.end
ruby.raise
ruby.require.entry
ruby.require.return
ruby.string.create

Some work has been done in Ruby to include support for SystemTap user-space markers in Red Hat Enterprise Linux 6.2 and allow SystemTap to probe the start and completion of each Ruby function. The Ruby user-space probes available in RHEL-6.2 are:

ruby.function.entry classname:string methodname:string file:string line:long $arg1:long $arg2:long $arg3:long $arg4:long
ruby.function.return classname:string methodname:string file:string line:long $arg1:long $arg2:long $arg3:long $arg4:long
ruby.gc.begin
ruby.gc.end
ruby.line file:string line:long $arg1:long $arg2:long
ruby.object.free classname:string $arg1:long
ruby.raise classname:string file:string line:long $arg1:long $arg2:long $arg3:long
ruby.rescue file:string line:long $arg1:long $arg2:long
ruby.ruby__probe probe_point:string probe_data:string $arg1:long $arg2:long

Using Ruby User-Space Markers

To use the Ruby user-space markers on a Fedora you will need:

Examples Scripts for Ruby Probing

Short example scripts:

The SystemTap Ruby user-space probes provide similar functionality to the probe points used in:

http://tenderlovemaking.com/2011/12/05/profiling-rails-startup-with-dtrace/

None: RubyMarker (last edited 2013-04-11 17:48:50 by WilliamCohen)