java.lang.Object
com.ibm.j9ddr.vm29.view.dtfj.java.DTFJJavaThread
- All Implemented Interfaces:
JavaThread
Adapter for J9VMThreadPointer
-
Field Summary
Fields declared in interface com.ibm.dtfj.java.JavaThread
STATE_ALIVE, STATE_BLOCKED_ON_MONITOR_ENTER, STATE_IN_NATIVE, STATE_IN_OBJECT_WAIT, STATE_INTERRUPTED, STATE_PARKED, STATE_RUNNABLE, STATE_SLEEPING, STATE_SUSPENDED, STATE_TERMINATED, STATE_VENDOR_1, STATE_VENDOR_2, STATE_VENDOR_3, STATE_WAITING, STATE_WAITING_INDEFINITELY, STATE_WAITING_WITH_TIMEOUT
-
Constructor Summary
ConstructorDescriptionDTFJJavaThread
(com.ibm.j9ddr.vm29.pointer.generated.J9VMThreadPointer thread) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.For threads that are in STATE_BLOCKED_ON_MONITOR_ENTER this method returns the JavaObject who's monitor they are blocked on.Represents the joining point between the Java view of execution and the corresponding native view.Get the address of the JNIEnv structure which represents this thread instance in JNI.getName()
Return the name of the thread.Fetch the java.lang.Thread associated with this thread.int
Get the Java priority of the thread.Get the set of stack frames.Get the set of ImageSections which make up the managed stack.int
getState()
Get the state of the thread when the image was created.int
hashCode()
Answers an integer hash code for the receiver.
-
Constructor Details
-
DTFJJavaThread
public DTFJJavaThread(com.ibm.j9ddr.vm29.pointer.generated.J9VMThreadPointer thread)
-
-
Method Details
-
getImageThread
Description copied from interface:JavaThread
Represents the joining point between the Java view of execution and the corresponding native view. This method is where the mapping from Java into native threading resources is provided.- Specified by:
getImageThread
in interfaceJavaThread
- Returns:
- the ImageThread which this ManagedThread is currently bound to.
- Throws:
CorruptDataException
- If the underlying resource describing the native representation of the thread is damagedDataUnavailable
- If no mapping is provided due to missing or limited underlying resources (this exception added in DTFJ 1.1)- See Also:
-
getJNIEnv
Description copied from interface:JavaThread
Get the address of the JNIEnv structure which represents this thread instance in JNI.- Specified by:
getJNIEnv
in interfaceJavaThread
- Returns:
- the address of the JNIEnv structure which represents this thread instance in JNI
- Throws:
CorruptDataException
-
getName
Description copied from interface:JavaThread
Return the name of the thread. Usually this is derived from the object associated with the thread, but if the name cannot be derived this way (e.g. there is no object associated with the thread) DTFJ will synthesize a name for the thread.- Specified by:
getName
in interfaceJavaThread
- Returns:
- the name of the thread
- Throws:
CorruptDataException
-
getObject
Description copied from interface:JavaThread
Fetch the java.lang.Thread associated with this thread. If the thread is in the process of being attached, this may return null.- Specified by:
getObject
in interfaceJavaThread
- Returns:
- the a JavaObject representing the java.lang.Thread associated with this thread
- Throws:
CorruptDataException
- See Also:
-
getPriority
Description copied from interface:JavaThread
Get the Java priority of the thread.- Specified by:
getPriority
in interfaceJavaThread
- Returns:
- the Java priority of the thread (a number between 1 and 10 inclusive)
- Throws:
CorruptDataException
- See Also:
-
getStackFrames
Description copied from interface:JavaThread
Get the set of stack frames.- Specified by:
getStackFrames
in interfaceJavaThread
- Returns:
- an iterator to walk the managed stack frames in order from top-of-stack (that is, the most recent frame) to bottom-of-stack
- See Also:
-
getStackSections
Description copied from interface:JavaThread
Get the set of ImageSections which make up the managed stack.- Specified by:
getStackSections
in interfaceJavaThread
- Returns:
- a collection of ImageSections which make up the managed stack.
Some Runtime implementations may also use parts of the ImageThread's stack for ManagesStackFrames
- See Also:
-
equals
Description copied from class:java.lang.Object
Compares the argument to the receiver, and answers true if they represent the same object using a class specific comparison. The implementation in Object answers true only if the argument is the exact same object as the receiver (==).- Specified by:
equals
in interfaceJavaThread
- Overrides:
equals
in classObject
- Parameters:
object
- Object the object to compare with this object.- Returns:
- boolean
true
if the object is the same as this objectfalse
if it is different from this object. - See Also:
-
hashCode
public int hashCode()Description copied from class:java.lang.Object
Answers an integer hash code for the receiver. Any two objects which answertrue
when passed to.equals
must answer the same value for this method.- Specified by:
hashCode
in interfaceJavaThread
- Overrides:
hashCode
in classObject
- Returns:
- the receiver's hash.
- See Also:
-
getState
Description copied from interface:JavaThread
Get the state of the thread when the image was created.- Specified by:
getState
in interfaceJavaThread
- Returns:
- the state of the thread when the image was created. The result is a bit vector, and uses the states defined by the JVMTI specification.
- Throws:
CorruptDataException
-
getBlockingObject
Description copied from interface:JavaThread
For threads that are in STATE_BLOCKED_ON_MONITOR_ENTER this method returns the JavaObject who's monitor they are blocked on. For threads that are in STATE_IN_OBJECT_WAIT this method returns the JavaObject that Object.wait() was called on. For threads that are in STATE_PARKED this method returns the JavaObject that was passed as the "blocker" object to the java.util.concurrent.LockSupport.park() call. It may return null if no blocker object was passed. For threads in any other state this call will return null. The state of the thread can be determined by calling JavaThread.getState()- Specified by:
getBlockingObject
in interfaceJavaThread
- Returns:
- the object this thread is waiting on or null.
- Throws:
CorruptDataException
DataUnavailable
-