I have added USDT probes to my application, and when I try to compile the source with -xO2 dtrace -G is no longer able to instrument the code.
It seems to me that the problem is that I try to trigger a dtrace probe as the last statement in my function (if I add an extra statement beneath where I call the probe, the problem disappears). I have attached a small test-case to reproduce the problem.
I have not seen this problem with Sun Studio 11.
[ahl 3.21.2008]
Yes, it appears that the DTrace object file processing is being stymied by the tail-call. This shouldn't be hard to fix.