building DTrace support (currently broken)
| From: | Mike Harsch | Date: | Wed, 17 Nov 2010 23:40:03 +0000 |
| Subject: | building DTrace support (currently broken) | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-50311@lists.php.net to get a copy of this message | ||
Hello php internals list,
My name is Mike Harsch. I'm new here, so please set me straight on matters of etiquette and protocol.
I've recently been spending a lot of time using the DTrace feature in the 5.3.99-dev code base (--enable-dtrace). I was disappointed to find out that Revision 305329 broke this feature severely. I have a patch (http://pastebin.com/SZnvz3L0) that fixes the problem by re-inserting some of the necessary functionality that was removed in 305329. This patch should be applied to Rev 305455 (very recent).
I believe the primary confusion here is the platform-specific way in which DTrace USDT probes are compiled on the various platforms that have DTrace. Specifically, Solaris requires an intermediate compilation step, while Mac OS X does not. For details on how this is done on Solaris, see:
http://dtrace.org/blogs/ahl/2006/05/08/user-land-tracing-gets-better-and-better/and
http://blogs.sun.com/dap/entry/writing_a_dtrace_usdt_providerFor the Mac OS X way of doing this (much simpler), see the section "Building code containing USDT Probes" in the dtrace(1M) man page for Darwin:
http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/dtrace.1.htmlI've heard that FreeBSD has DTrace also, but I don't have any experience on that platform, so I can't comment on the procedure for building USDT probes there. I'm happy to help however I can to get this feature working again. I don't have much experience with autoconf, so it's likely that my patch is sub-optimal, but I've tested it on Solaris and Mac OS X and I know it works (conversely, I can assure you that --enable-dtrace is completely broken on both platforms as of 305329). Cheers, Mike