- java.lang.Object
-
- com.ibm.dtfj.java.j9.JavaRuntime
-
- All Implemented Interfaces:
JavaRuntime
,ManagedRuntime
public class JavaRuntime extends Object implements JavaRuntime
-
-
Constructor Summary
Constructors Constructor Description JavaRuntime(ImageProcess containingProc, ImagePointer baseAddress, String runtimeVersion)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addClass(JavaAbstractClass theClass)
void
addClassLoader(JavaClassLoader loader)
void
addHeap(JavaHeap heap)
void
addHeapRoot(JavaReference heapRoot)
void
addMethodForID(JavaMethod method, long id)
void
addMonitor(JavaMonitor monitor)
void
addSpecialObject(JavaObject obj)
void
addThread(JavaThread thread, long blockedOnMonitor, long waitingOnMonitor)
Adds a JavaThread to the runtime along with optional IDs of monitors that it is blocked on or waiting onint
bytesPerPointer()
A helper method required by some of the structures hanging off of the VM.JavaVMInitArgs
createJavaVMInitArgs(int version, boolean ignoreUnrecognized)
protected Iterator
getClasses()
JavaClass
getClassForID(long classID)
JavaClassLoader
getClassLoaderForID(long loaderID)
JavaObject
getSpecialObject(ImagePointer address)
String
getSystemProperty(String key, String defaultValue)
JavaMethod
methodForID(long method)
ImageThread
nativeThreadForID(long nativeID)
ImagePointer
pointerInAddressSpace(long id)
Since a JavaVM cannot span address spaces, use the VM's container address space to build this pointer, given the raw IDvoid
setSystemProperty(String key, String value)
void
setTraceBufferForName(TraceBuffer buffer, String key)
-
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods declared in interface com.ibm.dtfj.java.JavaRuntime
equals, getCompiledMethods, getHeapRoots, getHeaps, getJavaClassLoaders, getJavaVM, getJavaVMInitArgs, getJITProperties, getMemoryCategories, getMemorySections, getMonitors, getObjectAtAddress, getStartTime, getStartTimeNanos, getSystemProperty, getThreads, getTraceBuffer, hashCode, isJITEnabled
-
Methods declared in interface com.ibm.dtfj.runtime.ManagedRuntime
getFullVersion, getVersion
-
-
-
-
Constructor Detail
-
JavaRuntime
public JavaRuntime(ImageProcess containingProc, ImagePointer baseAddress, String runtimeVersion)
-
-
Method Detail
-
addClass
public void addClass(JavaAbstractClass theClass)
-
addClassLoader
public void addClassLoader(JavaClassLoader loader)
-
getClassForID
public JavaClass getClassForID(long classID)
-
getClassLoaderForID
public JavaClassLoader getClassLoaderForID(long loaderID)
-
addMonitor
public void addMonitor(JavaMonitor monitor)
-
addHeap
public void addHeap(JavaHeap heap)
-
addHeapRoot
public void addHeapRoot(JavaReference heapRoot)
-
addThread
public void addThread(JavaThread thread, long blockedOnMonitor, long waitingOnMonitor)
Adds a JavaThread to the runtime along with optional IDs of monitors that it is blocked on or waiting on- Parameters:
thread
- The JavaThread to add to the runtimeblockedOnMonitor
- The ID of the monitor that this thread is blocked on (0 if it is not blocked)waitingOnMonitor
- The ID of the monitor that this thread is waiting on (0 if it is not waiting)
-
setTraceBufferForName
public void setTraceBufferForName(TraceBuffer buffer, String key)
-
pointerInAddressSpace
public ImagePointer pointerInAddressSpace(long id)
Since a JavaVM cannot span address spaces, use the VM's container address space to build this pointer, given the raw ID- Parameters:
id
-- Returns:
-
nativeThreadForID
public ImageThread nativeThreadForID(long nativeID)
-
methodForID
public JavaMethod methodForID(long method)
-
addMethodForID
public void addMethodForID(JavaMethod method, long id)
-
createJavaVMInitArgs
public JavaVMInitArgs createJavaVMInitArgs(int version, boolean ignoreUnrecognized)
-
bytesPerPointer
public int bytesPerPointer()
A helper method required by some of the structures hanging off of the VM. Returns the number of bytes required to express a native pointer on the VM target platform- Returns:
- 4 or 8, depending on the pointer size of the target platform
-
getClasses
protected Iterator getClasses()
-
addSpecialObject
public void addSpecialObject(JavaObject obj)
-
getSpecialObject
public JavaObject getSpecialObject(ImagePointer address)
-
-