
Profile Ruby 2.0 apps using DTrace – Part 1 - gnufied
http://crypt.codemancers.com/posts/2013-04-16-profile-ruby-apps-dtrace-part1/
======
jonathanwallace
Mark Dalrymple recently wrote a great series of posts at Big Nerd Ranch's blog
on dtrace:
[https://www.google.com/search?q=dtrace+site%3Ablog.bignerdra...](https://www.google.com/search?q=dtrace+site%3Ablog.bignerdranch.com&aq=f&oq=dtrace+site%3Ablog.bignerdranch.com&aqs=chrome.0.57.8616j0&sourceid=chrome&ie=UTF-8).

Full disclosure: I work at Big Nerd Ranch.

------
profquail
If anyone is interested in learning DTrace in detail, Amazon has a fairly
comprehensive text:

[http://www.amazon.com/DTrace-Dynamic-Tracing-Solaris-
FreeBSD...](http://www.amazon.com/DTrace-Dynamic-Tracing-Solaris-
FreeBSD/dp/0132091518/)

~~~
profquail
I found the book's website -- it has the errata and you can download all of
the scripts from the book:

<http://www.dtracebook.com/index.php/Main_Page>

There's another very detailed book available for free from illumos (the
OpenSolaris fork):

<http://dtrace.org/guide/preface.html>

------
profquail
DTrace is a great tool that doesn't get enough attention. I'm glad to see
articles like this that show off the basics of how to use it.

DTrace support is also one reason I'd _really_ like to see FreeBSD supported
as a first-class platform on AWS and/or Azure. Maybe this'll be the year...

~~~
iffyuva
thanks for your input. indeed, we are going to follow it up with some live
examples.

------
doublerebel
Really great to see more articles on dtrace recently. The one feature I was
missing from them all, is a way to sort and parse dtrace logs
programmatically. Since dtrace can dump method calls out-of-order, some
sorting is necessary to see the correct program flow.

So here's a start: dtrace-json

<https://github.com/doublerebel/dtrace-json>

It's in IcedCoffeeScript but could easily be adapted to Ruby or another
language. I used it to debug a native iOS module for a Titanium Mobile app.
HTH others as much as it did me!

------
pron
For the JVM we have btrace (<https://kenai.com/projects/btrace>), which also
integrates nicely with dtrace. It also has a good VisualVM plugin
(<http://visualvm.java.net/plugins.html>).

~~~
profquail
Mono also supports DTrace on Mac OS X and FreeBSD:

<http://www.mono-project.com/DTrace>

<http://www.mono-project.com/SGen_DTrace>

~~~
pron
btrace is a complete DTrace-like implementation for the JVM that doesn't
require DTrace (but can integrate with it if you want). It allows complete
runtime instrumentation of the code - you can profile specific methods, trace
argument values and much more.

------
wazari972
I don't see any info about the version they're running, commands "dtrace -l"
and "dtrace -f write" just fail and print the usage on my Fedora 18 (package
systemtap-sdt-devel-2.1-2.fc18.x86_64). Too bad, DTrace seems interesting !

~~~
wereHamster
You are using SystemTap and not DTrace. It probably has different and
incompatible CLI.

~~~
wazari972
oh you're certainly right ! I just queried yum for a bin/dtrace binary, got
this package, and assumed dtrace was part of systemtap!

