

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
19 messages in org.opensolaris.dtrace-discuss[dtrace-discuss] Missing -G flag in O...| From | Sent On | Attachments |
|---|---|---|
| Robert Lor | Oct 26, 2007 8:27 am | |
| Adam Leventhal | Oct 26, 2007 8:44 am | |
| Steve Peters | Oct 26, 2007 10:08 am | |
| Adam Leventhal | Oct 26, 2007 10:37 am | |
| Jarod Jenson | Oct 26, 2007 11:57 am | |
| Robert Lor | Oct 26, 2007 1:37 pm | |
| Adam Leventhal | Oct 26, 2007 2:25 pm | |
| Robert Lor | Oct 26, 2007 2:51 pm | |
| Adam Leventhal | Oct 26, 2007 3:27 pm | |
| Adam Leventhal | Oct 27, 2007 9:39 am | |
| James McIlree | Oct 29, 2007 1:42 pm | |
| Adam Leventhal | Oct 29, 2007 4:48 pm | |
| James McIlree | Oct 29, 2007 5:44 pm | |
| Adam Leventhal | Oct 30, 2007 6:16 pm | |
| Steve Peters | Oct 31, 2007 9:17 am | |
| Adam Leventhal | Oct 31, 2007 9:21 am | |
| Robert Lor | Nov 2, 2007 1:36 pm | |
| James McIlree | Nov 5, 2007 11:50 am | |
| Robert Lor | Nov 5, 2007 2:36 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [dtrace-discuss] Missing -G flag in OSX Dtrace port | Actions... |
|---|---|---|
| From: | James McIlree (jmci...@apple.com) | |
| Date: | Oct 29, 2007 1:42:56 pm | |
| List: | org.opensolaris.dtrace-discuss | |
On Oct 26, 2007, at 3:27 PM, Adam Leventhal wrote:
On Fri, Oct 26, 2007 at 04:51:44PM -0500, Robert Lor wrote:
We're not using 'dtrace -h' now, so I'm not following how the 'dtrace -G..." step can be removed. Maybe I'm missing something!
Ah. I thought that Apple might have added <sys/dtrace.h> and kept the output of 'dtrace -h' compatible with the macros. In fact, they've done something sort of clever. The generated header file contains a slightly different reference to the private symbol names; Apple them must have modified their compiler or linker to do the work of 'dtrace -G'.
I say sort of clever because the probes themselves contain the stability information whereas we use 'dtrace -G' to transmit the stability into the final DOF object. I've included an example here for the probe foo*:::bar. Note that is-enabled probes don't have the stability magic so I'm not sure how things would work if only is-enabled probes were used.
To all USDT developers: you should definitely start using 'dtrace -h' To Apple: you should make dtrace -G a no-op so that said developers don't have to change their Makefiles
Adam
It looks like you've worked out most of the details already, but just for clarification :-).
OS X doesn't support the older DTRACE_PROBE style macros, only the newer (and much safer!) typechecked generated header files.
We did actually look at trying to support a compatibility mode with -G being a no-op, but that turned out to be something of a slippery slope. The harder I pulled on that thread, the more corner cases I found where it fell over. As Steve mentioned, we know its an issue, and I filed:
<rdar://problem/5566030> Emulate dtrace -G for compatibility
Your insight about the is-enabled probes is on target, if you attempt to only use is-enabled probes, and never reference the actual dtrace probe, you'll get link time errors.
James M







