JDK-8289538 : Make G1BlockOffsetTablePart unaware of block sizes
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 20
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-06-30
  • Updated: 2022-07-11
  • Resolved: 2022-07-07
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 20
20 masterFixed
Related Reports
Blocks :  
Relates :  
Description
G1BlockOffsetTablePart is currently aware of block starts (i.e. the block offset table field), and for various operations the size of the blocks.

The size of a block seems unnecessary information; it's always gathered via the associated HeapRegion. At the same time G1BlockOffsetTablePart is a part of HeapRegion, so there typically is a back-and-forth between HeapRegion and G1BlockOffsetTablePart when calling methods.

I.e. calls are often of the type HeapRegion->G1BlockOffsetTablePart->HeapRegion which seems unnecessary, as the only user of its associated G1BlockOffsetTablePart is the HeapRegion anyway.

Instead of this call sequence, HeapRegion could always ask G1BlockOffsetTablePart for the start of the block spanning into the card, and then do the rest of the operations within HeapRegion.
Comments
Changeset: f7b18305 Author: Thomas Schatzl <tschatzl@openjdk.org> Date: 2022-07-07 18:08:43 +0000 URL: https://git.openjdk.org/jdk/commit/f7b183059a3023f8da73859f1577d08a807749b2
07-07-2022

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/9395 Date: 2022-07-06 11:56:47 +0000
06-07-2022