Monday, October 10, 2005

SystemTap -- DTrace for Linux?

DTrace absolutely rocks. It is easily the most powerful general-purpose facility to come along in a long, long while. Skeptical? Give Adam's DTrace Bootcamp a quick glance. It's worth your time.

To badly summarize, DTrace makes it painless and safe to carry out surprisingly deep and wide experiments on a running system, from TLB miss code all the way up to Java method invocations. The improvement in system visibility that DTrace represents is comparable to the improvement of a source-level debugger over printf. I'm serious. If you don't believe me, give it a try. (Full disclosure: I went to school with DTrace's founding trio, but believe me, DTrace is so wig-flippingly great that I'd be just as effusive if I didn't know Adam from Adam).

The only unfortunate thing about DTrace is that it is part of Solaris. Nothing against Solaris, mind you. Most of my colleagues regard me as a Solaris zealot, in fact. It's where I came of age as a programmer, and when I have the all too rare pleasure of using it, Solaris still feels like home (/usr/proc/bin!), even after five years of continuous Linux usage.

But let's not kid ourselves. Solaris is in trouble. Not technically; I still believe it's the gold standard for UNIX excellence in design and implementation, and I'll take the bait from any Linux zealot who'd like to argue this. No, Solaris is troubled because it has been losing users. In spite of its recent reincarnation as opensource software, people still perceive Solaris as Sun's house UNIX. And, for those who've been in North Korea for the last five years, Sun is not a fiscally healthy organism.

So, I was pleased today to learn that RedHat, IBM and Intel are doing the only sensible thing, namely ripping off DTrace with total abandon. More power to them; reimplementing good ideas from industry has a long tradition in OSS and Linux in particular. There are, of course, some differences between DTrace and SystemTap; I haven't gotten deeply enough into the available SystemTap documentation to say just what they are.

Godspeed you, SystemTap! I hope to be using something with all the convenience and power of DTrace on a viable operating system sooner rather than later! In the meantime, I'll fire up my gentoo VM, pull down the CVS sources, and cross my fingers that I can get this all to work...

2 Comments:

Blogger Sandip said...

Oops...I was about to make dtrace for Linux my undergrad project. But someone has already built it

4:39 AM  
Blogger Keith Adams said...

I don't know where to begin. "DTrace for Linux" is not tractable as an undergrad project. But then again, nobody has built it...

9:15 PM  

Post a Comment

<< Home