-
- All Known Implementing Classes:
JavaRuntimeBuilder
public interface IJavaRuntimeBuilder
Factory for building a com.ibm.dtfj.java.JavaRuntime object. Only one java runtime factory must be associated with a java runtime object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addBlockedThread(JavaMonitor monitor, long threadID)
JavaClass
addClass(JavaClassLoader jClassLoader, String name, long classID, long superClassID, String fileName)
Adds a com.ibm.dtfj.java.JavaClass into DTFJ.JavaClassLoader
addClassLoader(String name, long clID, long objectID)
Adds a com.ibm.dtfj.java.JavaClassLoader into DTFJ.JavaMonitor
addJavaMonitor(String name, long monitorID, long objectID, String className, long owningThread)
Adds a java monitor or modifies an existing one.JavaStackFrame
addJavaStackFrame(JavaThread javaThread, String className, String classFileName, String methodName, String methodType, String compilationLevel, int lineNumber)
Adds a java stack frame to a javathread.JavaThread
addJavaThread(ImageThread imageThread, String name, long tid, long j9thread_t, long javaObjID, long jniEnv, String state, int priority, long blockingObjectAddress, String blockingObjectClassName)
Not available in a javacore: object ID and the java.lang.Thread class name associated with a thread.void
addJITProperty(String name, String value)
Add a property with which the JIT was running for this runtimeJavaRuntimeMemoryCategory
addMemoryCategory(String name, long deepBytes, long deepAllocations, JavaRuntimeMemoryCategory parent)
Adds a runtime memory category to the JavaRuntimevoid
addVMInitArgs()
Adds a (empty) JavaVMInitArgsvoid
addVMOption(String option)
Adds an individual Java VM option to JavaVMInitArgsvoid
addVMOption(String option, long extraInfo)
Adds an individual Java VM option to JavaVMInitArgs, with 'extra information' fieldvoid
addWaitOnNotifyThread(JavaMonitor monitor, long threadID)
void
setJavaVersion(String version)
Sets the Java versionvoid
setJITEnabled(boolean enabled)
Sets if the JIT was enabled for this runtimevoid
setShallowCountersForCategory(JavaRuntimeMemoryCategory category, long shallowBytes, long shallowAllocations)
Sets the shallow memory categories for an existing memory categoryvoid
setStartTime(long startTime)
Set the time the JVM startedvoid
setStartTimeNanos(long nanoTime)
Set the nanotime the JVM was started
-
-
-
Method Detail
-
addClass
JavaClass addClass(JavaClassLoader jClassLoader, String name, long classID, long superClassID, String fileName) throws BuilderFailureException
Adds a com.ibm.dtfj.java.JavaClass into DTFJ. If class already exists, it updates any missing information. The updated/added class is returned. If error occurs during class generation/update, throw exception- Parameters:
jClassLoader
- that loads the classname
- of classclassID
- valid addresssuperClassID
- valid address- Returns:
- generated/modified java class.
- Throws:
BuilderFailureException
-
addClassLoader
JavaClassLoader addClassLoader(String name, long clID, long objectID) throws BuilderFailureException
Adds a com.ibm.dtfj.java.JavaClassLoader into DTFJ. If the class already exists, it updates missing information. Returns added/updated classloader. IF error occurs, throw exception.- Parameters:
name
- of classloaderclID
- address classloaderobjectID
- address of class loader object instance- Returns:
- added/modified classLoader
- Throws:
BuilderFailureException
- if failed to add/update classloader
-
addJavaThread
JavaThread addJavaThread(ImageThread imageThread, String name, long tid, long j9thread_t, long javaObjID, long jniEnv, String state, int priority, long blockingObjectAddress, String blockingObjectClassName) throws BuilderFailureException
Not available in a javacore: object ID and the java.lang.Thread class name associated with a thread. Adds a javathread, or modifies an existing one with information being passed into the method. Returns the updated/modified javathread.- Parameters:
imageThread
- associated with javathreadname
- for now, just the string name parsed directly from the javacore.tid
- = JNIENV or J9JVMThread, i.e., it equals the internal VM data structure for a java threadj9thread_t
- = a thread model at a lower level than a tid, which models a native thread: not represented in DTFJ, but pass it anyway as a possible ImageThread propertyjavaObjID
- The thread object seen from JavajniEnv
- The JNIENVstate
-priority
-blockingObjectClassName
-blockingObjectAddress
-- Returns:
- added/modified JavaThread.
- Throws:
BuilderFailureException
- if failed to add/update java thread
-
addJavaStackFrame
JavaStackFrame addJavaStackFrame(JavaThread javaThread, String className, String classFileName, String methodName, String methodType, String compilationLevel, int lineNumber) throws BuilderFailureException
Adds a java stack frame to a javathread. It does not check if a stack frame has already been added or not, so it is possible to added the same stack frame multiple times. Returns the java stack frame added. Throws exception if it failed to generate and add the stack frame to the java thread specified in the argument.- Parameters:
javaThread
- where java stack trace is to be addedclassName
-classFileName
-methodName
-methodType
- whether native or interpreted method.compilationLevel
-lineNumber
- as it appears in the javacore- Throws:
BuilderFailureException
-
addJavaMonitor
JavaMonitor addJavaMonitor(String name, long monitorID, long objectID, String className, long owningThread) throws BuilderFailureException
Adds a java monitor or modifies an existing one. Returns the updated/modified monitor. Throws exception if error occurs during monitor generation or update.- Parameters:
name
- of monitormonitorID
-objectID
-className
-owningThread
-- Returns:
- added/modified
- Throws:
BuilderFailureException
-
addWaitOnNotifyThread
void addWaitOnNotifyThread(JavaMonitor monitor, long threadID) throws BuilderFailureException
- Parameters:
monitor
-thread
-- Throws:
BuilderFailureException
-
addBlockedThread
void addBlockedThread(JavaMonitor monitor, long threadID) throws BuilderFailureException
- Parameters:
monitor
-thread
-- Throws:
BuilderFailureException
-
addVMInitArgs
void addVMInitArgs() throws BuilderFailureException
Adds a (empty) JavaVMInitArgs- Parameters:
option
-- Throws:
BuilderFailureException
-
addVMOption
void addVMOption(String option) throws BuilderFailureException
Adds an individual Java VM option to JavaVMInitArgs- Parameters:
option
-- Throws:
BuilderFailureException
-
addVMOption
void addVMOption(String option, long extraInfo) throws BuilderFailureException
Adds an individual Java VM option to JavaVMInitArgs, with 'extra information' field- Parameters:
option
-extraInfo
-- Throws:
BuilderFailureException
-
setJavaVersion
void setJavaVersion(String version)
Sets the Java version- Parameters:
version
-
-
addMemoryCategory
JavaRuntimeMemoryCategory addMemoryCategory(String name, long deepBytes, long deepAllocations, JavaRuntimeMemoryCategory parent)
Adds a runtime memory category to the JavaRuntime- Parameters:
name
-deepBytes
-deepAllocations
-parent
- The parent category, or NULL if this category is a root- Returns:
-
setShallowCountersForCategory
void setShallowCountersForCategory(JavaRuntimeMemoryCategory category, long shallowBytes, long shallowAllocations)
Sets the shallow memory categories for an existing memory category
-
setJITEnabled
void setJITEnabled(boolean enabled)
Sets if the JIT was enabled for this runtime- Parameters:
enabled
- true if it was enabled
-
addJITProperty
void addJITProperty(String name, String value)
Add a property with which the JIT was running for this runtime- Parameters:
name
- property namevalue
- value
-
setStartTime
void setStartTime(long startTime)
Set the time the JVM started- Parameters:
startTime
- the time
-
setStartTimeNanos
void setStartTimeNanos(long nanoTime)
Set the nanotime the JVM was started- Parameters:
nanoTime
- the time
-
-