JDK-8274178 : Occupancy value in logging and JFR event is inaccurate in G1IHOPControl
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9,10,11,12,13,14,15,16,17
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2021-09-22
  • Updated: 2022-06-09
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
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
After JDK-8136677 and JDK-8143220, "occupancy" for G1 IHOP is now computed by this formula:

region_size * (num_old_regions + num_humongous_regions) + new_humonogous_alloc_bytes

However, in G1IHOPControl::print(), G1AdaptiveIHOPControl::print(), G1IHOPControl::send_trace_event() and G1AdaptiveIHOPControl::send_trace_event(), the occupancy value is G1CollectedHeap::heap()->used(), which includes used bytes in young regions and does not include wasted space in old regions.

I'll sponsor my colleague Jonathan Joo to fix this.