One DTrace agent library is called the "dvmti" agent. This can be run inside the Java Virtual Machine (JVM) to provide DTrace probes that are specific to the JVM and the Java platform. This agent is available for download from the Java.net project solaris10-dtrace-vm-agents. The dvmti agent uses the Java Virtual Machine Tool Interface (JVM TI). Specifically, the agent library utilizes the JVM TI interface to request various VM events and provide DTrace probes in the callback code for those events. To use these DTrace probes for the JVM and Java code, the Java application has to be started as shown here:
java -Xrundvmti[
ptions] <MainClass>
Where options are:
all same as: unloads,allocs,stats,methods
help print help message
unloads track class unloads
allocs track object allocations and frees
stats generate heap stats after each GC
methods generate method entry exit events
exclude=name exclude class names
default is none of unloads, allocs, stats, or methods.
The dvmti agent will utilize byte code instrumentation (BCI) where needed and will need a jar file called dvmti.jar, which should be located in the same directory as the shared library libdvmti.so. The JDK 5.0 release has an environment variable that can be used to include options in the startup of any Java application:
export JAVA_TOOL_OPTIONS="-Xrundvmti:all"
You could also try jstat & jstatd to check the operations..