RFR: Account for humongous object waste

William Kemper wkemper at openjdk.org
Sat Apr 15 00:23:11 UTC 2023


On Fri, 14 Apr 2023 23:20:46 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> The unused portion of the last region in a humongous object is now tracked and logged.
>
> src/hotspot/share/gc/shenandoah/shenandoahVerifier.cpp line 359:
> 
>> 357:     _committed += r->is_committed() ? ShenandoahHeapRegion::region_size_bytes() : 0;
>> 358:     if (r->is_humongous()) {
>> 359:       _humongous_waste += r->free();
> 
> Wouldn't this be the case only when `_used > 0` (i.e. the HR is in use and isn't free? Otherwise, is there an implicit assumption of the regions over which this closure is working that wants to appear as an assertion check here?)

I'm not sure I follow. This closure visits every region. We don't want to count the `free` portions of regular/in-use regions as humongous waste.

-------------

PR Review Comment: https://git.openjdk.org/shenandoah/pull/255#discussion_r1167343484


More information about the shenandoah-dev mailing list