# building DTrace support (currently broken)

- Thread: https://externals.io/message/50311
- Original archive: https://news-web.php.net/php.internals/50311
- Started by Mike Harsch on 2010-11-17T23:40:03+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #50311 — Mike Harsch — 2010-11-17T23:40:03+00:00

URL: https://externals.io/message/50311#50311

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_provider

For 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.html

I'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

---

## #50316 — Christopher Jones — 2010-11-18T04:46:08+00:00

URL: https://externals.io/message/50311#50316 · In reply to: #50311

> 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
>

Mike,

Can you log a bug for this at http://bugs.php.net/report.php ?

Thanks,

Chris

-- 
Email: christopher.jones@oracle.com
Tel:  +1 650 506 8630
Blog:  http://blogs.oracle.com/opal/

---

## #50321 — Mike Harsch — 2010-11-18T05:41:38+00:00

URL: https://externals.io/message/50311#50321 · In reply to: #50316

> Mike,
>
> Can you log a bug for this at http://bugs.php.net/report.php ?
Certainly.  Here it is:

http://bugs.php.net/bug.php?id=53338

Mike
