“Instruments” walk through

No – this isn’t about music or learning how to play anything. Well, anything musical anyway. Instruments is the name for Mac OS X’s UI overlay to the mighty DTrace.

Corbin has up a nice Instruments walk through on his blog, including a nice bit of “download the project” to support you following exactly what he was doing. It’s practically a how to that is the first play in a debugging playbook that involves DTrace for helping nail an allocation error: Figure out how to reproduce the bug, enable Zombies, fire up the tools, and make it go boom. The example is simple, but the “how to make it work” is really worthwhile. I’m hoping (and rather expecting) that this next year’s WWDC will have a session dedicated to debugging goodness using DTrace, er – I mean instruments.

To be fair, this was a really light use of the tool with a simple example. There’s a hell of a lot more you can do with it…
Doing a little digging (which means reading the output of sudo dtrace -l | less), shows that Apple additionally instrumented up the CoreData and Spotlight components very extensively.

One thought on ““Instruments” walk through

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s