DTrace on MacOS X at WWDC

This morning I attended the first day of Apple's WWDC in San Francisco to see Apple announce, among other things, support for DTrace on Mac OS X Leopard. Apple's engineering team has been working hard on this for some time leading up to this announcement, and it was incredibly gratifying for us to see how much they have working already on both PowerPC and the new x86 Macs, how it has already begun to help their engineering teams, and how this is going to really expand the DTrace community to include a whole new family of application developers. Here are the particulars:
  • The base DTrace framework, including the command-line utility, our compiler, and the kernel support is essentially all running on MacOS X and is bundled with the Leopard preview DVD that was given away at the WWDC. dtrace(1M) even appears in /usr/sbin, so scripts that use common interfaces can literally be run as-is on MacOS.
  • Work on our various providers is in progress at various points, but suffice it to say that fbt, syscall, and pid are all happening on the x86 Macs, and SDT work is under development as well.
  • In addition to work on standard pid, Apple is providing an Objective C front-end for the pid provider whereby one can specify Objective C probes using the class name in place of module and then a pid probe will be created in the corresponding location.
  • The DTrace type system (CTF) is present under the hood. That is, there was a mach_kernel compiled with CTF, generated by ctfconvert-ing DWARF emitted by gcc just like we do. (Note to myself and Matt: did not imagine this ever happening during those frantic five weeks in February 2001).
  • As described on Apple's preview page above, their new performance utility XRay is using DTrace under the hood. It appears to provide support for creating DTrace scripts and capturing their output; more will be announced about this to WWDC attendees later this week.
After the show, Adam, Bryan, and I joined the Apple DTrace team (Steve Peters, James McIlree, Terry Lambert, Tom Duffy, Sean Callanan, and John Wright) for some Thai food and a fun discussion of kernel engineering at Apple and Sun and how to continue to enrich their DTrace experience and what changes in our broader community might help them. Some of the things that stood out for me were how much value Apple can bring to their developers by offering semantic USDT probes in their higher-level programming frameworks like Cocoa, Core Audio, etc., and also how the need to interface with Objective C might provide another good source of input for us to think about better integration for the naming schemes and data representation for multiple high-level languages including Objective C, C++, Java, and so forth.

So no matter whether your first love is sys_trap or an A-trap, join us at the DTrace community and get involved!

$q
Comments:

I am wondering if this porting was done from scratch or if it uses some of John Birrell's work in FreeBSD.

Posted by Ananth on August 07, 2006 at 11:01 PM PDT #

According to the Apple engineers we spoke with, they did their own port, but are now aware of John's efforts. I would hope that the result of their two ports can be combined into something that gets rolled back into base FreeBSD. Hopefully John and the Apple team can explain more about their plans on the DTrace discussion alias.

Posted by Mike Shapiro on August 08, 2006 at 02:04 AM PDT #

[Trackback] A Sun developer has posted more information on DTrace which is now included with Leopard. DTrace is an awesome debugging tool for debugging system issues. Many example scripts already exist, and should apparently work as is. Even better: Apple has adde...

Posted by ansemond.com on August 09, 2006 at 01:12 PM PDT #

I have started merging DTrace support into the current FreeBSD source tree. This will be ongoing over the next 4 months (probably) because things need to be reviewed. Since receiving the T2000 from Sun, I've been working on helping to improve the sun4v support in FreeBSD. The plan is to have both DTrace and sun4v merged into FreeBSD-current by the end of this year. This will give 6 months before the release engineering phase of FreeBSD 7.0 starts.

Posted by John Birrell on August 10, 2006 at 09:34 AM PDT #

Post a Comment:
Comments are closed for this entry.
About

mws

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks