When compiling Node with --with-dtrace configure prints the following message:
Exception: DTrace is currently only supported on SunOS systems.
While I understand that ustack() helpers don't work with DTrace on any platform other than solaris, it would be nice to have the old DTrace probs exposed to other OSes. In particular, it would be awesome to be able to use node-dtrace-provider and the gc-start and gc-stop probes on OS-X with instruments.
Is it not possible to allow limited (just probe) support without giving full ustack() helper support?
(Currently on OS-X running dtrace on node looking for gc-start gives: :::gc-start does not match any probes)
@davepacheco You're probably in the best position to answer this.
Yeah, it should be possible to have --with-dtrace include the Node USDT probes (e.g., gc-start, gc-done) on OS X. The process is a little different than on SmartOS, but it should be doable.
FYI, --with-dtrace just controls whether we build those probes and the ustack helper. You should be able to use node-dtrace-provider without --with-dtrace, though I haven't tried that.
@davepacheco Thanks, I'll see if node-dtrace-provider works with the default OS-X build. The gc-start and gc-done probes would be awesome as we're tracking down memory issues.
Update: I looked into adding the probes to OS X. The actual build change was pretty straightforward. However, the provider makes use of USDT with translated arguments, which apparently doesn't work at all on OS X. For the GC probes, that's not a big deal, since the arguments aren't critical for making sense of what's going on. But the HTTP and net probes are much less valuable without additional information. I'm leaning toward an option where we pass raw strings and integers in addition to structured arguments, which will work on both systems without breaking compatibility.
That sounds like a good idea, do any OSes other than SmartOS/Solaris support the USDT feature?
@EchoAbstract I only really know about OS X and illumos. I'd expect the BSD port to support both USDT and translated arguments, but I've never used it, and I've been surprised before.
DTrace provider support for non-illumos systems
I've updated @davepacheco's patch for master, the probes show up on osx, I need to make sure I didn't break anything else
Landed in fe7440c and 7634069.