JDK-8368068 : G1: Remove some Remark pause related code in full heap resizing code
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Priority: P4
  • Status: Closed
  • Resolution: Not an Issue
  • Submitted: 2025-09-19
  • Updated: 2025-09-19
  • Resolved: 2025-09-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.
Other
tbdResolved
Related Reports
Causes :  
Description
In G1HeapSizingPolicy::full_collection_resize_amount there is some comment and code related to handling when this method is called in the remark pause.

It is not called in the remark pause any more since JDK-8248324, so this vestigial code should be removed as well.

  const size_t used_after_gc = capacity_after_gc + allocation_bytes -
                               _g1h->unused_committed_regions_in_bytes() -
                               // Discount space used by current Eden to establish a
                               // situation during Remark similar to at the end of full
                               // GC where eden is empty. During Remark there can be an
                               // arbitrary number of eden regions which would skew the
                               // results.
                               _g1h->eden_regions_count() * G1HeapRegion::GrainBytes;

Comments
Remark pauses still call that code in case of periodic gcs. Before this is not changed (i.e. when using periodic gcs for AHS), this can not be removed.
19-09-2025