JDK-8075210 : Refactor strong root processing in order to allow G1 to evolve separately from GenCollectedHeap
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-03-16
  • Updated: 2015-10-20
  • Resolved: 2015-03-19
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 8 JDK 9
8u45Fixed 9 b59Fixed
Related Reports
Relates :  
Relates :  
Description
Currently SharedHeap::process_strong_roots is called both by the GenCollectedHeap based collectors (CMS, Serial) and G1.

Since G1 needs special cases for several pieces of the root processing SharedHeap needs to allow for that while attempting to maintain some layer of abstraction. This makes the SharedHeap code unnecessarily complex and makes it very difficult to reason about which combination of parameters are valid and possible.

As a first step to improve the code I suggest that we copy the root processing code to a separate class for G1 and move the SharedHeap root processing to GenCollectedHeap. Future refactorings to unify the root processing at a different level of abstraction can hopefully be done using the new G1 root processor class.