Bug#747232: Ruby should support SystemTap
* Sebastian Boehm sebast...@sometimesfood.org [140508 00:12]: The current probe selection syntax is rather basic, but if the patch above is accepted, I could add a simple tap file in order to turn process(/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1).mark(method__entry”) into ruby.method.entry I would add another bug report for this, though. Please expand on this - would this mean additional changes to the Ruby package? If so, please show us :-) -ch -- ,''`. Christian Hofstaedtler z...@debian.org : :' : Debian Developer `. `' 7D1A CFFA D9E0 806C 9C4C D392 5C13 D6DB 9305 2E03 `- pgpsgAc3GJvPs.pgp Description: PGP signature
Bug#747232: Ruby should support SystemTap
On 8 May 2014 12:39, Christian Hofstaedtler z...@debian.org wrote: Please expand on this - would this mean additional changes to the Ruby package? If so, please show us :-) Yes, but only minor changes. Basically we would have to install a tap file to /usr/share/systemtap/tapset which is then loaded by systemtap on startup. (Details in the Processing section of the stap(1) man page.) Fedora uses this tap file: http://pkgs.fedoraproject.org/cgit/ruby.git/tree/libruby.stp @LIBRARY_PATH@ is set to the correct path in the course of the package build process. As of 2.1, Ruby upstream also has a simple tap file generator, but as far as I can tell its incomplete (wrong simplified probe names, no string copying) at the moment: https://github.com/ruby/ruby/blob/ruby_2_1/tool/gen_ruby_tapset.rb I haven't talked to upstream yet, but I threw together a somewhat improved version of the current gen_ruby_tapset.rb that I would like to contribute if they are interested. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#747232: Ruby should support SystemTap
Hi Antonio, great to hear that 2.1 actually will be the default Ruby in jessie. On Tuesday 6 May 2014 at 23:32, Antonio Terceiro wrote: Can you try this on ruby2.1 and let me know? The patch works great for ruby2.1 as well and applies cleanly to Git commit fb119e39 via git am”. Best, Sebastian -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#747232: Ruby should support SystemTap
On Wed, May 07, 2014 at 12:45:03PM +0200, Sebastian Boehm wrote: Hi Antonio, great to hear that 2.1 actually will be the default Ruby in jessie. On Tuesday 6 May 2014 at 23:32, Antonio Terceiro wrote: Can you try this on ruby2.1 and let me know? The patch works great for ruby2.1 as well and applies cleanly to Git commit fb119e39 via git am”. Just to be sure: did you actually tested it with ruby2.1 and does it work for you? Right now I am not familiar with dtrace/systemtap beyond knowing they exist, so while this is interesting and I will definitively look at it at some point, it would be nice to have an initial input would be nice. -- Antonio Terceiro terce...@debian.org signature.asc Description: Digital signature
Bug#747232: Ruby should support SystemTap
On Wednesday 7 May 2014 at 20:42, Antonio Terceiro wrote: Just to be sure: did you actually tested it with ruby2.1 and does it work for you? Of course, otherwise I would not have said the patch “worked great”. :) Right now I am not familiar with dtrace/systemtap beyond knowing they exist, so while this is interesting and I will definitively look at it at some point, it would be nice to have an initial input would be nice. If you just want to give SystemTap a spin, it would probably be a good idea to try some of the code examples from the documentation or “SystemTap and ruby 2.0”: https://sourceware.org/systemtap/documentation.html http://avsej.net/2012/systemtap-and-ruby-20/ In order to list the probes in libruby2.1 just try this: stap -L 'process(/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1).mark(*”)' If you want to test some of the examples, make sure to use the libruby path instead of /usr/local/bin/ruby and add your user to the stapdev and stapusr groups or use sudo. (See /usr/share/doc/systemtap/README.Debian.) I have attached a modified version of rubytop.stp/rubyfuntop.stp, which you can use to test systemtap: sudo stap ruby-example.stp -c 'ruby2.1 -e puts \Hello world\”' The current probe selection syntax is rather basic, but if the patch above is accepted, I could add a simple tap file in order to turn process(/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1).mark(method__entry”) into ruby.method.entry I would add another bug report for this, though. ruby-example.stp Description: Binary data
Bug#747232: Ruby should support SystemTap
Package: ruby2.0 Version: 2.0.0.484+really457-3 Ruby 2.0 introduced support for DTrace, a dynamic tracing framework by Sun, which can be used to trace running processes with minimal performance impact. While DTrace support on Linux still seems to be rather basic and burdened by licensing issues, SystemTap is a free (GPL) and mature alternative for GNU/Linux systems. Furthermore, SystemTap supports DTrace probe points such as those already present in upstream Ruby. SystemTap support can be enabled simply by adding systemtap-sdt-dev as a build dependency for Ruby. This would not result in any additional run time dependencies for Ruby; systemtap-sdt-dev is only required at build time. Also, due to SystemTap's design, probes do not have any performance impact when they are not explicitly enabled by the user at run time. Fedora has had SystemTap support enabled since 2.0.0.0-0.1.r39387 (22 Feb 2013) and apparently it has not caused any problems for them. Having Ruby in jessie support SystemTap as well would further enhance the user experience for Ruby developers and admins on Debian. The attached patch enables SystemTap probes in Ruby by adding systemtap-sdt-dev as a build dependency on Linux systems. 0001-Add-systemtap-sdt-dev-as-a-build-dependency.patch Description: Binary data
Bug#747232: Ruby should support SystemTap
Control: reassign -1 ruby2.1 On Tue, May 06, 2014 at 05:33:25PM +0200, Sebastian Boehm wrote: Package: ruby2.0 Version: 2.0.0.484+really457-3 Ruby 2.0 introduced support for DTrace, a dynamic tracing framework by Sun, which can be used to trace running processes with minimal performance impact. While DTrace support on Linux still seems to be rather basic and burdened by licensing issues, SystemTap is a free (GPL) and mature alternative for GNU/Linux systems. Furthermore, SystemTap supports DTrace probe points such as those already present in upstream Ruby. SystemTap support can be enabled simply by adding systemtap-sdt-dev as a build dependency for Ruby. This would not result in any additional run time dependencies for Ruby; systemtap-sdt-dev is only required at build time. Also, due to SystemTap's design, probes do not have any performance impact when they are not explicitly enabled by the user at run time. Fedora has had SystemTap support enabled since 2.0.0.0-0.1.r39387 (22 Feb 2013) and apparently it has not caused any problems for them. Having Ruby in jessie support SystemTap as well would further enhance the user experience for Ruby developers and admins on Debian. The attached patch enables SystemTap probes in Ruby by adding systemtap-sdt-dev as a build dependency on Linux systems. Hello, thanks for your bug report. However I am reassigning to ruby2.1 as ruby2.0 will not be shipped in Jessie. Can you try this on ruby2.1 and let me know? -- Antonio Terceiro terce...@debian.org signature.asc Description: Digital signature