Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4950589

JVMTI spec: thread status constants - normalize names, renumber, add park

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 5.0
    • hotspot
    • generic
    • generic

      The rfe 4937022 (for adding I/O wait status) included much of the below,
      but I/O wait status will not be implemented, so that rfe is being pulled.

      JSR-166 adds a park concept (LockSupport.park) which needs a corresponding
      thread status -- PARKED will be added (the JVMTI_THREAD_STATUS_
      prefix is omitted here for readability)..

      The ordering and numbering of thread status constants does not allow for the
      logical addition of more constants, thus the constants need to be reordered
      and renumbered.

      The constant names are inconsistent and do not match common usage or the
      java.lang.management.ThreadState API. The following renamings will be made:

          ZOMBIE ==> TERMINATED
          MONITOR ==> BLOCKED
          WAIT ==> WAITING

      The old names will be available as synonyms during a transition period.

      The BLOCKED state is specified as:

          Thread is waiting to enter a synchronization block.

      and will be clarified to:

          Thread is waiting to enter a synchronization block or waiting to
      re-enter
          a synchronization block after an Object.wait()

      Also, a thread status flag willed added to indicate timed waits and
      timed parks:

          JVMTI_THREAD_STATUS_FLAG_TIMED

            rfield Robert Field (Inactive)
            rfield Robert Field (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: