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

Refactor the TaskTerminator

    XMLWordPrintable

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b12

      Description

      The JVM's task terminator is a complicated piece of code that is very hard to follow.

      - many levels of conditional code, two nested infinite loops which are exit at several places, and use of non-scoped locking.
      - the algorithm is spread and partially duplicated across two methods (offer_termination() and do_spin_master_work()), one calling the other.

      By separating the spinning code (currently in do_spin_master_work()) and the termination condition checking currently distributed across both methods the code can be simplified significantly, and duplicate code eliminated.

      Initial tests with a prototype of this change showed no performance regressions, but more performance testing is needed.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              tschatzl Thomas Schatzl
              Reporter:
              tschatzl Thomas Schatzl
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: