RFR: Usage tracking cleanup
William Kemper
wkemper at openjdk.org
Tue Apr 18 23:19:21 UTC 2023
On Tue, 18 Apr 2023 00:41:10 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> There are many nuances to tracing memory utilization. Shenandoah track's usage, waste by humongous objects, padding for promotion LABs alignment and all this is also tracked by generation, the heap and feeds into the heuristics and the pacer. The code to update all of these values and route them to the right places was spread across the allocation call stack. This change consolidates all of the logic into one method, invoked near the end of the allocation.
>
> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 746:
>
>> 744: assert(req.is_mutator_alloc(), "Expected mutator alloc here");
>> 745: // padding and actual size both count towards allocation counter
>> 746: generation->increase_allocated(actual_bytes + wasted_bytes);
>
> Here waste is included into allocation, as well as used for heap & generation below.
No, here waste is only used to update the allocation rate and below it is only used for similar purposes with the pacer. It isn't included in the `used` memory for mutator allocations.
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/260#discussion_r1170656172
More information about the shenandoah-dev
mailing list