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

G1: Do not clear the next marking bitmap at the start of a Full GC

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P4 P4
    • tbd
    • hs23
    • hotspot
    • gc
    • generic
    • generic

      At the start of a Full GC we call ConcurrentMark::abort() to notify the concurrent marking operation that might be in progress to stop what it's doing. CM::abort() clears the next marking bitmap:

      // abandon current marking iteration due to a Full GC
      void ConcurrentMark::abort() {
        // Clear all marks to force marking thread to do nothing
        _nextMarkBitMap->clearAll();
        ...
      }

      This is not really necessary, at least not because of the explanation in the method. The CM workers should have yielded before the Full GC safepoint could start, therefore they will not observe that the bitmap was cleared.

      Having said that, not doing the clearing does introduce infrequent failures during the first GC pause after a Full GC that aborts a CM cycle. So, we should first get to the bottom of why this is. But, it will be good to avoid the bitmap clearing at the start of the Full GC and let the CM thread do it concurrently.

            Unassigned Unassigned
            tonyp Tony Printezis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: