RFR(XS): Fix live data accounting for humongous region

Aleksey Shipilev shade at redhat.com
Thu Jun 15 18:44:38 UTC 2017


On 06/15/2017 08:27 PM, Zhengyu Gu wrote:
> We count a humongous region's live data in humongous start region, which can
> well exceed the size of the region. When calculating the region's garbage (used
> - live data), can result scary numbers.
> 
> Also, consolidated logic for finding humongous start region.
> 
> Webrev: http://cr.openjdk.java.net/~zgu/shenandoah/humongous_ld_acct/webrev.00/

Ah, intended to do this some time later! So now it should report "used" for
humongous continuations.

 *) Please do parentheses to stick the evaluation order:

 105       return (live_data == 0) ? 0 : used() / HeapWordSize;
 108       return start->get_live_data_words() == 0 ? 0 : used() / HeapWordSize;

 *) Move this assert to humongous_start_region(), and remove at uses:

 542       assert(region->is_humongous_start(), "Must be humongous start region");

 *) Move out the decrement to a separate line:

 257     r = _heap->regions()->get(-- reg_num);

 *) Drop the "humongous" part of the check in Verifier:

    verify(r, (r->get_live_data_bytes() <= r->capacity()) ||
(r->is_humongous_start()), "Live data cannot be larger than capacity");

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list