com.ibm.dtfj.java

Interface JavaRuntime

All Superinterfaces:
ManagedRuntime

  1. public interface JavaRuntime
  2. extends ManagedRuntime
Represents a Java runtime.

Method Summary

Modifier and Type Method and Description
  1. boolean
equals(java.lang.Object obj)
  1. java.util.Iterator
getCompiledMethods()
This is short cut method.
  1. java.util.Iterator
getHeapRoots()
Get the set of object and class roots known to the VM.
  1. java.util.Iterator
getHeaps()
Get the set of heaps known by the VM
  1. java.util.Iterator
getJavaClassLoaders()
Get the set of class loaders active in this VM
  1. ImagePointer
getJavaVM()
Get the object that represents the virtual machine
  1. JavaVMInitArgs
getJavaVMInitArgs()
Fetch the JavaVMInitArgs which were used to create this VM.
  1. java.util.Iterator
getMemoryCategories()
Returns iterator of the top-level memory categories used by this Java runtime.
  1. java.util.Iterator
getMemorySections(boolean includeFreed)
Returns an iterator of JavaRuntimeMemorySection objects corresponding to the blocks of memory allocated by the JavaRuntime.
  1. java.util.Iterator
getMonitors()
Provides access to the collection of monitors used in the JavaVM.
  1. JavaObject
getObjectAtAddress(ImagePointer address)
Gets the object located at address address in the heap.
  1. java.util.Iterator
getThreads()
Get the set of Java threads known by the VM
  1. java.lang.Object
getTraceBuffer(java.lang.String bufferName,boolean formatted)
Fetches implementation specific trace buffers, like the verbose GC buffer or the Universal Trace Engine (UTE) buffer
  1. int
hashCode()
Methods inherited from interface com.ibm.dtfj.runtime.ManagedRuntime
getFullVersion, getVersion

Method Detail

getJavaVM

  1. ImagePointer getJavaVM()
  2. throws CorruptDataException
Get the object that represents the virtual machine
Returns:
the address of the JavaVM structure which represents this JVM instance in JNI
Throws:

getJavaVMInitArgs

  1. JavaVMInitArgs getJavaVMInitArgs( )
  2. throws DataUnavailable
  3. CorruptDataException
Fetch the JavaVMInitArgs which were used to create this VM. See JNI_CreateJavaVM in the JNI Specification for more details.
Returns:
the JavaVMInitArgs which were used to create this VM.
Throws:
DataUnavailable - if the arguments are not available

getJavaClassLoaders

  1. java.util.Iterator getJavaClassLoaders( )
Get the set of class loaders active in this VM
Returns:
an iterator of all of the class loaders within this JavaVM
See Also:

getThreads

  1. java.util.Iterator getThreads()
Get the set of Java threads known by the VM
Returns:
an iterator of the JavaThreads in the runtime
See Also:

getCompiledMethods

  1. java.util.Iterator getCompiledMethods( )
This is short cut method. The same result can be found by iterating over all methods in all class loaders in all classes.
Returns:
an iterator over all of the JavaMethods in the JavaRuntime which have been compiled
See Also:

getMonitors

  1. java.util.Iterator getMonitors( )
Provides access to the collection of monitors used in the JavaVM. This collection includes both monitors associated with managed objects (e.g. object monitors) and monitors associated with internal control structures (e.g. raw monitors)
Returns:
an iterator over the collection of monitors
See Also:

getHeaps

  1. java.util.Iterator getHeaps()
Get the set of heaps known by the VM
Returns:
an iterator for all of the Java heaps within this runtime. Heaps may be specific to this JavaVM instance, or may be shared between multiple JavaVM instances
See Also:

getHeapRoots

  1. java.util.Iterator getHeapRoots( )
Get the set of object and class roots known to the VM. Stack frame roots are not included in the set, they can be retrieved using JavaStackFrame.getHeapRoots().
Returns:
an iterator over the collection of JavaReferences representing the known global heap roots within this runtime.
See Also:

getTraceBuffer

  1. java.lang.Object getTraceBuffer( java.lang.String bufferName,
  2. boolean formatted)
  3. throws CorruptDataException
Fetches implementation specific trace buffers, like the verbose GC buffer or the Universal Trace Engine (UTE) buffer
Parameters:
bufferName - a String naming the buffer to be fetched
formatted - true if formatting should be performed on the buffer, or false if the raw buffer contents should be returned
Returns:
an implementation specific result, depending on the parameters
Throws:

getObjectAtAddress

  1. JavaObject getObjectAtAddress(ImagePointer address)
  2. throws CorruptDataException
  3. java.lang.IllegalArgumentException
  4. MemoryAccessException
  5. DataUnavailable
Gets the object located at address address in the heap.
Parameters:
address - the ImagePointer instance representing the start address of object in the heap;
Returns:
the JavaObject instance representing the located object.
Throws:
java.lang.IllegalArgumentException - if address is outside the heap's boundaries, or if it doesn't point to the start location of an object;
MemoryAccessException - if address is is in the heap but it's not accessible from the dump;
CorruptDataException - if any data needed to build the returned instance of JavaObject is corrupt.
DataUnavailable - if any data needed to build the returned instance of JavaObject is not available.
See Also:

getMemoryCategories

  1. java.util.Iterator getMemoryCategories( )
  2. throws DataUnavailable
Returns iterator of the top-level memory categories used by this Java runtime.
Returns:
Iterator of memory categories
Throws:
Since:
1.5
See Also:

getMemorySections

  1. java.util.Iterator getMemorySections( boolean includeFreed)
  2. throws DataUnavailable
Returns an iterator of JavaRuntimeMemorySection objects corresponding to the blocks of memory allocated by the JavaRuntime.
Parameters:
includeFreed - If true, iterator will iterate over blocks of memory that have been freed, but haven't been re-used yet.
Returns:
Iterator of memory sections.
Throws:
Since:
1.5
See Also:

equals

  1. boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
Parameters:
obj -
Returns:
True if the given object refers to the same Java Runtime in the image

hashCode

  1. int hashCode()
Overrides:
hashCode in class java.lang.Object