[dtrace-discuss] Using dtrace to monitor native calls into Java code

Eric Bodden
Wed, 10 Feb 2010 10:24:16 -0000

Hello everybody.

I am trying to use dtrace to monitor native calls (from the Hotspot
VM) into Java code. Such calls occur, for instance, when invoking a
method using reflection.

I found this web page about dtrace probes in hotspot:
http://java.sun.com/javase/6/docs/technotes/guides/vm/dtrace.html

I tried out the probes. Especially, the Call*Method*-entry probes of
hotspot_jni looked promising. However, they do not seem to be
triggering, e.g. for reflective calls. Could the problem be that these
probes only monitor calls through JNI but Hotspot does not actually
use JNI to dispatch these calls into Java code? If so, does anybody
else have an idea of how to monitor reflective calls into Java code?

Best wishes,
Eric

--
Eric Bodden
Software Technology Group, Technische Universit?t Darmstadt, Germany
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstra?e 10, 64289 Darmstadt