RFR: Account for humongous object waste

William Kemper wkemper at openjdk.org
Sat Apr 15 00:30:05 UTC 2023


On Fri, 14 Apr 2023 23:16:35 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/shenandoahGeneration.hpp line 55:
> 
>> 53:   // Usage
>> 54:   size_t _affiliated_region_count;
>> 55:   size_t _humongous_waste;      // how much waste for padding in humongous objects
> 
> Could you document here whether this is included in `_used` below, or is explicitly excluded from it. From my cursory reading of the code doing the adjustments, it looked like `_used` includes `_humongous_waste`.
> 
> it would also be good to include a line of documentation about where this statistic might be useful (or, if it is, where it is used today).

It isn't included in `used`, but is deducted from `available`. This gives the heuristics a more accurate view of how much memory remains for allocations. I will update the comment.

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

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


More information about the shenandoah-dev mailing list