G1: Occupancy value in IHOP logging and JFR event is inaccurate

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 26
    • Affects Version/s: 9, 10, 11, 12, 13, 14, 15, 16, 17, 23
    • Component/s: hotspot
    • gc
    • 9
    • b25

      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.

            Assignee:
            Thomas Schatzl
            Reporter:
            Man Cao
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: