JDK-8242847 : G1 should not clear mark bitmaps with no marks
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 15
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-04-15
  • Updated: 2021-09-02
  • Resolved: 2021-08-25
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 18
18 b13Fixed
Related Reports
Relates :  
Relates :  
Description
Currently G1 clears the whole (next) mark bitmaps of the regions of the entire (committed) heap.

This is unnecessary, only bitmaps of regions that were dirtied need clearing. Since JDK-8197850 we track how much live data has been encountered during mark for every region, corresponding to the live objects we set a mark between bottom and ntams.

I.e. first, we only need to clear between [bottom, ntams[, and second only clear bitmaps which regions had at least one bit set (i.e. have some live data).

This is also a very interesting optimization for JDK-8240556
Comments
Changeset: e36cbd8e Author: Ivan Walulya <iwalulya@openjdk.org> Date: 2021-08-25 14:33:34 +0000 URL: https://git.openjdk.java.net/jdk/commit/e36cbd8e05774ea9847c69f9987a2242589acf7e
25-08-2021