United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6814437 G1: remove the _new_refs array
JDK-6814437 : G1: remove the _new_refs array

Details
Type:
Enhancement
Submit Date:
2009-03-06
Status:
Closed
Updated Date:
2011-04-23
Project Name:
JDK
Resolved Date:
2011-04-23
Component:
hotspot
OS:
generic
Sub-Component:
gc
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs15
Fixed Versions:
hs19 (b06)

Related Reports
Backport:
Backport:
Backport:
Backport:

Sub Tasks

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

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.
                                     
2010-06-25
EVALUATION

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



Hardware and Software, Engineered to Work Together