Skip to main content

Dtrace and mustang

3 replies [Last post]
alanstange
Offline
Joined: 2003-06-12
Points: 0

Hello,

can someone post a simple example of using Dtrace and Mustang (with build 39 or later)? I'm trying to get this to work using the provider syntax from some Javaone 05 notes and I'm missing something.

Is there some command line options which enables the Dtrace providers?

Thanks!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kellyohair
Offline
Joined: 2004-09-03
Points: 0

First off, to use DTrace you need to be logged in as root, or you need dtrace permissions (specified in /etc/user_attr file, which only root can modify). The /etc/user_attr line looks something like:
username::::defaultpriv=basic,dtrace_kernel,dtrace_proc,dtrace_user

Second, the post by delabasse is correct, right now you need to use the Solaris AMD64 build (use java -d64).

The dtrace compiler that takes the probe list and creates the necessary additions to the shared library to have the probes is currently only available on Solaris 10, and by default we build SPARC and X86 on Solaris 8. We are currently working out the issues of being able to create the probes on a Solaris 8 machine, which means we need some kind of DTrace compiler for Solaris 8. Keep in mind that using DTrace is still and will always be a Solaris 10 only feature, we are only talking about the DTrace compiler part of DTrace.

Hopefully we can have this resolved in the next few months and everyone with Solaris 10, SPARC, X86, and AMD64 can use the official Mustang DTrace probes.

Keep in mind that the agent based DTrace probes will still work with Mustang builds now:
https://solaris10-dtrace-vm-agents.dev.java.net/
But these agent based probes will have a slightly higher overhead than the ones built into Mustang.

delabassee
Offline
Joined: 2003-06-16
Points: 0

> can someone post a simple example of using Dtrace and
> Mustang (with build 39 or later)? I'm trying to get
> this to work using the provider syntax from some
> Javaone 05 notes and I'm missing something.
> Is there some command line options which enables the
> Dtrace providers?

On which Sol10 architecture are you ?
Solaris 8 is still the Mustang build platform. That's why you can see Dtrace probes in Mustang sources; but the probes aren't actually in the build. You have 2 options, build Hotspot on Solaris 10 by yourself or use the Sol10/AMD64 build (by default built on Sol10)

Then, when your JVM is running, just do a [i]dtrace -l | grep hotspot[/i] You should see the hotspot and hotspot_jni providers.

--David

ingenthr
Offline
Joined: 2003-06-12
Points: 0