JDK-8287024 : G1: Improve the API boundary between HeapRegionRemSet and G1CardSet
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-05-19
  • Updated: 2022-05-23
  • Resolved: 2022-05-23
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 19
19 masterFixed
Related Reports
Relates :  
Description
There are some improvements that could be made to make the boundary between HeapRegionRemSet and G1CardSet more clear:

HeapRegionRemSet deals with addresses, heap regions
G1CardSet deals with card indexes in the heap, card regions and cards within card regions

The G1CardSet::add_card() and G1CardSet::contains_card() methods are fuzzy about that, they require the caller (HeapRegionRemSet) to know about card regions and cards within regions.

It is better to let these two methods take card indexes and the splitting and such is done by G1CardSet.

Also look at the iteration API to see whether improvements in that regard could be made.

If split_card() is moved to G1CardSet, the assert at the end of the method can be tightened.
Comments
Changeset: cb08b4e8 Author: Thomas Schatzl <tschatzl@openjdk.org> Date: 2022-05-23 08:31:03 +0000 URL: https://git.openjdk.java.net/jdk/commit/cb08b4e86a8b79b886beebe482be6d842d79c517
23-05-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/8790 Date: 2022-05-19 14:53:59 +0000
19-05-2022