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

G1: Next mark bitmap clear not cancelled after marking abort

XMLWordPrintable

    • gc
    • b21

      Next mark bitmap clearing is supposed to abort after a concurrent mark abort. It does not because the condition is wrong.

      I.e. the current code

              // Abort iteration if after yielding the marking has been aborted.
              if (_cm != NULL && _cm->do_yield_check() && _cm->has_aborted()) {
                return true;
              }

      is wrong. Correct code is:

      if (_cm != NULL) {
        _cm->do_yield_check();
        if (_cm->has_aborted) {
          return true;
        }
      }

      Currently this has no impact except for wasted time. However with JDK-8253600 it will clear the prev bitmap containing liveness information (previously passed as next bitmap into the task) as the full gc will first update the next bitmap and then swap bitmaps.

            tschatzl Thomas Schatzl
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: