Class DTFJJavaThread

java.lang.Object
com.ibm.j9ddr.vm29.view.dtfj.java.DTFJJavaThread
All Implemented Interfaces:
JavaThread

public class DTFJJavaThread extends Object implements JavaThread
Adapter for J9VMThreadPointer
  • Constructor Details

    • DTFJJavaThread

      public DTFJJavaThread(com.ibm.j9ddr.vm29.pointer.generated.J9VMThreadPointer thread)
  • Method Details

    • getImageThread

      public ImageThread getImageThread() throws CorruptDataException, DataUnavailable
      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 interface JavaThread
      Returns:
      the ImageThread which this ManagedThread is currently bound to.
      Throws:
      CorruptDataException - If the underlying resource describing the native representation of the thread is damaged
      DataUnavailable - If no mapping is provided due to missing or limited underlying resources (this exception added in DTFJ 1.1)
      See Also:
    • getJNIEnv

      public ImagePointer getJNIEnv() throws CorruptDataException
      Description copied from interface: JavaThread
      Get the address of the JNIEnv structure which represents this thread instance in JNI.
      Specified by:
      getJNIEnv in interface JavaThread
      Returns:
      the address of the JNIEnv structure which represents this thread instance in JNI
      Throws:
      CorruptDataException
    • getName

      public String getName() throws CorruptDataException
      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 interface JavaThread
      Returns:
      the name of the thread
      Throws:
      CorruptDataException
    • getObject

      public JavaObject getObject() throws CorruptDataException
      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 interface JavaThread
      Returns:
      the a JavaObject representing the java.lang.Thread associated with this thread
      Throws:
      CorruptDataException
      See Also:
    • getPriority

      public int getPriority() throws CorruptDataException
      Description copied from interface: JavaThread
      Get the Java priority of the thread.
      Specified by:
      getPriority in interface JavaThread
      Returns:
      the Java priority of the thread (a number between 1 and 10 inclusive)
      Throws:
      CorruptDataException
      See Also:
    • getStackFrames

      public Iterator getStackFrames()
      Description copied from interface: JavaThread
      Get the set of stack frames.
      Specified by:
      getStackFrames in interface JavaThread
      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

      public Iterator getStackSections()
      Description copied from interface: JavaThread
      Get the set of ImageSections which make up the managed stack.
      Specified by:
      getStackSections in interface JavaThread
      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

      public boolean equals(Object object)
      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 interface JavaThread
      Overrides:
      equals in class Object
      Parameters:
      object -
      Returns:
      True if the given object refers to the same Java Thread in the image
      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 answer true when passed to .equals must answer the same value for this method.
      Specified by:
      hashCode in interface JavaThread
      Overrides:
      hashCode in class Object
      Returns:
      the receiver's hash.
      See Also:
    • getState

      public int getState() throws CorruptDataException
      Description copied from interface: JavaThread
      Get the state of the thread when the image was created.
      Specified by:
      getState in interface JavaThread
      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

      public JavaObject getBlockingObject() throws CorruptDataException, DataUnavailable
      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 interface JavaThread
      Returns:
      the object this thread is waiting on or null.
      Throws:
      CorruptDataException
      DataUnavailable