JDK-7163196 : G1: Use two arrays for the fast cset test, put region type information in the arrays
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs24
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-04-20
  • Updated: 2018-03-28
  • Resolved: 2018-03-28
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.
Other
tbd_majorFixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
The "is in CSet" queries during G1 use a bool array, with one entry per region, which specifies whether the region is in the cset or not.

This can be extended in a couple of ways. First, it will be beneficial to use two arrays: one that's being built and one that has the previous CSet information. So, at the start of a pause we make the "being built" array as the "current one" which remains static during the pause while we're tagging the new survivor regions in the other array (which is not the one that's "being built").

Additionally, we can add more information to these arrays. Instead of just a true / false bool on whether the region is in the CSet we can actually have values which show the actual region type (eden, survivor, etc.). This can help us in the future in order to optimize the GC operation: when we read the entry for a region, not only we'll be able to tell whether the region is in the CSet or not (entry != 0) but also whether it's young in order to know whether to checks its age bits, etc.

For this we can use the "heap spanning table" data structure introduced in JDK-7163191.