JDK-6814437 : G1: remove the _new_refs array
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs15
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-03-06
  • Updated: 2013-09-18
  • Resolved: 2011-04-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u21pFixed 7Fixed hs19Fixed
Description
While we're scanning update buffers during a G1 GC, we find two types of cross-region references:

- references to inside the CSet, which we add to an array called _new_refs
- references to outside the CSet, for which we create RSet entries

After the update buffers are processed we scan the _new_refs array to find roots into the CSet. If an evacuation failure happens, we also scan _new_refs to recreate the RSets of the CSet (given that we skip creating those while we're scanning update buffers).

It'd be nice to get rid off the need to maintain the _new_refs array, to have less data structures that grow during a GC. The plan of action (discussed with Igor) is:

- while we're scanning the update buffers, we should not add entries to the _new_refs array but, instead, we'll process and references into the CSet there and then (and deal with the rest in the way we do now)
- we should also retain the update buffers we just processed, so that we can iterate over them to recreate the RSet entries of the CSet, if an evacuation failure happens.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/2d160770d2e5
02-08-2010

EVALUATION Replace the new_refs array(s) with DirtyCardQueues. Instead of recording the reference in the new_refs array, immediately push the reference into the approperiate scan array in the ParScanThreadState. Record the card containing the reference in a DirtyCardQueue linked with a distinct DirtyCardQueueSet. In the event of an evacuation failure we will process the buffers in the DirtyCardQueue set and update the remembered sets.
25-06-2010