Posted by kellyohair
on August 23, 2005 at 9:19 PM PDT
Creation of Virtual Machine agents improved with the new Java Virtual Machine (tm) Tool Interface (JVM TI) in JDK 5.0. If you are curious how VM agents work read on, but beware, native code lurks here.
JDK 5.0 (Tiger)
JDK 6.0 (Mustang)
binary images include the source and binaries of quite a few
Java Virtual Machine Tool Interface (JVM TI)
agents (native libraries) in the demo/jvmti directory.
The more curious people might be interested in the
in my blogs.sun.com site on
using VM agents .
Certainly writing VM Agents is not something that we want thousands
of people doing, besides everyone wants to write in Java anyway,
But for anyone that needs the tool functionality we certainly
have it now in JDK 5.0.
DVM Agent for use with Solaris Dynamic Tracing (DTrace)
is a good example of the capabilities of JVM TI.
Heap Profiling Agent (HPROF)
in JDK 5.0 uses JVM TI
as does the debugger backend that implements the
Java Debugger Wire Protocol (JDWP) .
JVM TI in combination with
Java Native Interface (JNI)
creates a very robust and complete
set of native interfaces for agent development.
Tools written in Java can use the
Java Debug Interface (JDI)
(which was added in JDK 5.0 and uses JVM TI under the covers).
In the future expect to see extensions to both these Java
level interfaces, all courtesy of the basic functionality of JVM TI
We are also interested in adding useful tool demos to the JDK
or improving the ones we have, so if you have an idea for a useful agent or tool,
consider creating a java.net project and/or contributing it to
For anyone converting older JVMPI agents to JVM TI, there is an article on
The JVMPI Transition to JVM TI .