Package: libruby2.1
Version: 2.1.3-1

While Ruby supports SystemTap, a dynamic tracing framework for Linux
(see #747232), at the moment the Debian package does not ship with a
tapfile to facilitate tracing Ruby programs.

The attached patch adds the tapfile used in Fedora and modifies the
packaging to set the correct library path and install the tapfile to
/usr/share/systemtap/tapset.

The Fedora tapfile introduces proper probe names and named parameters,
making Ruby programs significantly simpler to trace via SystemTap so
that code like this:

  probe
process("/usr/lib/x86_64-linux-gnu/libruby-2.1.so.2.1").mark("method__entry")
{
    classname = user_string($arg1)
    methodname = user_string($arg2)
    file = user_string($arg3)
    line = $arg4
    printf("%s => %s.%s in %s:%d\n", thread_indent(1), classname,
methodname, file, line);
  }

could be rewritten like that:

  probe ruby.method.entry {
    printf("%s => %s.%s in %s:%d\n", thread_indent(1), classname,
methodname, file, line);
  }

The tapfile was originally written by Vít Ondruch in 2012 and has been used
in Fedora since:
https://lists.fedoraproject.org/pipermail/scm-commits/2012-December/917388.html

It would be great to see this in Jessie.

Attachment: 0001-Install-SysytemTap-tap-file.patch
Description: Binary data

Reply via email to