JDK-8030646 : Track collection set membership in one place
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 8,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-12-17
  • Updated: 2015-06-03
  • Resolved: 2015-03-09
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.
9 b56Fixed
Related Reports
Relates :  
Sub Tasks
JDK-8030647 :  
JDK-8030648 :  
JDK-8030649 :  
JDK-8030650 :  
G1 currently tracks collection set membership in a byte field in the HeapRegion structure and in the _cset_fast_test array (an array of bytes, one per region).  There are also three methods for checking collection set membership:  HeapRegion::in_collection_set(), G1CollectedHeap::obj_in_cs() and G1CollectedHeap::in_cset_fast_test(), along with a number of asserts to ensure the two data structures are in sync.  Remove the HeapRegion byte field and associated accessors and track membership only in the cset array.
Reminder: when changing HeapRegion::in_collection_set make sure to directly check the flag whether it is in the collection set or not (use G1CollectedHeap::is_in_cset()), not G1CollectedHeap::is_in_cset_or_humongous().