- 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 voidaddClass(JavaAbstractClass theClass)voidaddClassLoader(JavaClassLoader loader)voidaddHeap(JavaHeap heap)voidaddHeapRoot(JavaReference heapRoot)voidaddMethodForID(JavaMethod method, long id)voidaddMonitor(JavaMonitor monitor)voidaddSpecialObject(JavaObject obj)voidaddThread(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 onintbytesPerPointer()A helper method required by some of the structures hanging off of the VM.JavaVMInitArgscreateJavaVMInitArgs(int version, boolean ignoreUnrecognized)protected IteratorgetClasses()JavaClassgetClassForID(long classID)JavaClassLoadergetClassLoaderForID(long loaderID)JavaObjectgetSpecialObject(ImagePointer address)StringgetSystemProperty(String key, String defaultValue)JavaMethodmethodForID(long method)ImageThreadnativeThreadForID(long nativeID)ImagePointerpointerInAddressSpace(long id)Since a JavaVM cannot span address spaces, use the VM's container address space to build this pointer, given the raw IDvoidsetSystemProperty(String key, String value)voidsetTraceBufferForName(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)
-
-