Bug 673161 - RFE: add systemtap static probes to Ruby
RFE: add systemtap static probes to Ruby
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: ruby (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Vít Ondruch
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 673162
  Show dependency treegraph
 
Reported: 2011-01-27 10:35 EST by William Cohen
Modified: 2013-03-22 11:45 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 673162 (view as bug list)
Environment:
Last Closed: 2013-03-22 11:45:33 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
systemtap support for ruby (5.68 KB, patch)
2011-01-27 11:06 EST, Mo Morsi
no flags Details | Diff

  None (edit)
Description William Cohen 2011-01-27 10:35:06 EST
A number of packages have included runtime support for systemtap in Fedora such as the JVM and Python. SystemTap makes use of the probe points added for DTRACE. There are similar patches for Ruby to provide SystemTap probes for Ruby 1.9.2:

http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26235

Older patches for Ruby 1.8.7 are available (https://gist.github.com/86895 and http://joyeur.com/2007/05/07/dtrace-for-ruby-is-available/)

An preliminary srpm based off of RHEL6 Ruby using the older 1.8.7 patches has been built and used successfully with trace Ruby program execution:

http://people.redhat.com/wcohen/ruby/ruby-1.8.7.299-6.el6.dtrace_20.src.rpm

It would be very nice to have the instrumentation points available in Ruby.
Comment 1 Mo Morsi 2011-01-27 11:06:12 EST
Created attachment 475631 [details]
systemtap support for ruby

I'm not claiming this as I'm not sure I can commit the time at the moment, but I have spent some cycles on my own time porting the patch adding systemtap support to python in Fedora to Ruby

Its not complete, there are some things that still need to be done/fixed and there might be better places to put the probes (I hadn't noticed the dtrace/ruby patch before, thanks for that), but it could be used as a base for further development.

Hope this helps
Comment 2 Mamoru TASAKA 2011-01-27 11:38:28 EST
First of all,
- under what license are the patches for systemtap support available?
- and where is the "current" patch for systemtap support for ruby 1.8.7.x?
Comment 3 William Cohen 2011-01-27 12:03:50 EST
-The license isn't clear for the Ruby 1.8.7 patch that is in the prototype ruby source rpm. However, there is a 1.9.2 patch in the ruby svn:

http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=26235

-The prototype rpm is available 1.8.7 patch:
http://people.redhat.com/wcohen/ruby/ruby-1.8.7.299-6.el6.dtrace_20.src.rpm


If Ruby in Fedora is going to be rebased to 1.9.2 (https://bugzilla.redhat.com/show_bug.cgi?id=667603) then could just use that patch in ruby svn. Otherwise back port the patch in Ruby svn to 1.8.7.
Comment 4 William Cohen 2011-03-18 09:50:03 EDT
Additional info.

Issue for adding dtrace support ruby:
     http://redmine.ruby-lang.org/issues/1279

Issue for adding various tracing hooks to ruby:
      http://redmine.ruby-lang.org/issues/2565

There were three patches to put dtrace support into ruby january 2010:

     http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=26235
     http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=26238
     http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=26239

However, shortly afterwards the patches were reverted with:

     http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=26243
Comment 5 Vít Ondruch 2011-05-19 04:27:15 EDT
The original patch for 1.8.5 and 1.8.6 si GPLv2, therefore also the 1.8.7 patch should be GPLv2 IMO.

http://svn.joyent.com/opensource/dtrace/ruby/
Comment 6 Vít Ondruch 2011-05-19 04:29:04 EDT
Or better Ruby or GPLv2
Comment 7 Vít Ondruch 2013-01-08 09:46:08 EST
There are going to be DTrace probes in Ruby 2.0 [1]. They are already implemented in ruby-2.0 branch of Ruby's dist-git [2].



[1] https://bugs.ruby-lang.org/issues/2565
[2] http://pkgs.fedoraproject.org/cgit/ruby.git/tree/?h=ruby-2.0
Comment 8 Vít Ondruch 2013-03-22 11:45:33 EDT
Since F19, there is integrated systemtap support [1].

William, since the probes differs from the RHEL ones, would you mind to update your wikipage [2]?


[1] http://pkgs.fedoraproject.org/cgit/ruby.git/tree/libruby.stp
[2] http://sourceware.org/systemtap/wiki/RubyMarker

Note You need to log in before you can comment on or make changes to this bug.