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.
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.
- relates to
-
JDK-8371635 G1: Young gen allocations should never be considered when comparing against IHOP threshold
-
- Resolved
-
-
JDK-8371791 G1: Improve accuracy of G1CollectedHeap::non_young_occupancy_after_allocation()
-
- Resolved
-
-
JDK-8136677 Adaptive sizing for IHOP in G1
-
- Resolved
-
-
JDK-8143220 Fix documentation of InitiatingHeapOccupancyPercent
-
- Resolved
-
- links to
-
Commit(master)
openjdk/jdk/7d78818a
-
Review
openjdk/jdk/5762
-
Review(master)
openjdk/jdk/28175
(2 links to)