The following functionality has been added to the
JVM tool interface (JVM TI) between its initial release in JDK 5.0 and JDK 6.
Support for transformation of class files - To
facilitate dynamic transformation of classes which have already
been loaded, the RetransformClasses
function has been added. It is suited to operations such as adding
instrumentation to methods. Support for retransformation means that
access to the original class file is no longer required in order to
instrument loaded classes. It can easily remove the applied
transformation and it is designed to work in a multi-agent
Enhanced heap walking support - More powerful and
functionality has been added. The new functionality:
allows access to primitive values (the value of Strings,
arrays, and primitive fields)
allows the tag of the referrer to be set, thus enabling more
efficient localized reference graph building
provides more extensive filtering abilities
is extensible, allowing abilities to grow in future versions of
functions have been added along with supporting types and
constants. The previous functionality is still supported but its
use is discouraged.
Enhanced support for instrumentation under the system class
loader - The new
AddToSystemClassLoaderSearch function allows
instrumentation support classes to be defined by the system class
Support for early return from a method - The new
early return functions allow debugger-like tools to force a
method to return from any point in its execution.
Monitor stack depth information - The new
GetOwnedMonitorStackDepthInfo function provides
information about the monitors owned by the specified thread and
the depth of the stack frame which locked them.
Support for resource exhaustion notification - The new
ResourceExhaustedevent notifies the JVM when a critical resource (such as the Java platform heap) has been exhausted.
Other changes between JDK 5.0 and JDK 6 include new error codes, a
revised definition for field index, allowing AddToBootstrapClassLoaderSearch to be called in
the live phase, and considerable specification clean-up and
clarification. For detailed information about the changes, see the