JDK-8178105 : Switch mark bitmaps during Remark
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9,10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-04-05
  • Updated: 2018-06-21
  • Resolved: 2018-04-18
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 11
11 b11Fixed
Related Reports
Blocks :  
Blocks :  
Blocks :  
Relates :  
Relates :  
Relates :  
Description
Currently G1 switches the mark bitmaps during the Cleanup pause, making the recent object liveness gathering visible to G1 there.

Since the mark bitmaps are current after Remark, switching them during Cleanup only prolongs the time when already dead objects are kept live.

The only use of the next bitmap between these two phases seems to be gathering summary live data - however it could as easily use the other bitmap for that purpose during that time

This may or may not make a difference particularly in conjunction with eager reclaim, as this would allow releasing humongous objects earlier (noticed e.g. in specjvm2008-sparse.large and fft.large if you artificially lengthen the time between remark and cleanup pause).

Investigate if there are any additional side effects swapping the bitmaps earlier and if possible, switch the mark bitmaps immediately at remark.

This behavior has been this way since day one. However, with JDK-8077144 the pause between Remark and Cleanup has been lengthened significantly (although overall that change decreased the length of the marking cycle).
Implementing this will shorten the time between start of marking and being able to reclaim found dead objects significantly.
Comments
With JDK-8180415 there is no "Create Live Data" phase any more. After that, one could reclaim regions found empty during remark as part of JDK-8154528.
08-03-2018