Using the JVMTI

JVMTI is a two-way interface that allows communication between the JVM and a native agent. It replaces the JVMDI and JVMPI interfaces.

JVMTI allows third parties to develop debugging, profiling, and monitoring tools for the JVM. The interface contains mechanisms for the agent to notify the JVM about the kinds of information it requires. The interface also provides a means of receiving the relevant notifications. Several agents can be attached to a JVM at any one time. A number of tools are based on this interface, such as Hyades, JProfiler, and Ariadna. These are third-party tools, therefore IBM® cannot make any guarantees or recommendations regarding them. IBM does provide a simple profiling agent based on this interface, HPROF.

JVMTI agents can be loaded at startup using short or long forms of the command-line option:
-agentlib:<agent-lib-name>=<options>
or
-agentpath:<path-to-agent>=<options>
For example:
-agentlib:hprof=<options>
assumes that a folder containing hprof.dll is on the library path, or
-agentpath:C:\sdk\jre\bin\hprof.dll=<options>

For more information about JVMTI, see http://java.sun.com/javase/6/docs/technotes/guides/jvmti/.

For advice on porting JVMPI-based profilers to JVMTI, see http://java.sun.com/developer/technicalArticles/Programming/jvmpitransition.

For a guide about writing a JVMTI agent, see http://java.sun.com/developer/technicalArticles/Programming/jvmti.



© Copyright IBM Corporation 2005, 2010. All Rights Reserved.
© Copyright Sun Microsystems, Inc. 1997, 2007, 901 San Antonio Rd., Palo Alto, CA 94303 USA. All rights reserved.
US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
This information center is powered by Eclipse technology. (http://www.eclipse.org/)