RFR: Usage tracking cleanup
Y. Srinivas Ramakrishna
ysr at openjdk.org
Tue Apr 18 21:54:36 UTC 2023
On Tue, 18 Apr 2023 21:34:19 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/shenandoahFreeSet.cpp line 358:
>
>> 356: size_t usable_free = get_usable_free_words(r->free());
>> 357: if (size <= usable_free) {
>> 358: result = allocated_aligned_plab(size, req, r);
>
> `allocate_..`
Isn't this likely to fail -- at least in the general case -- the alignment checks in assertions in `allocate_aligned_plab()`?
I am not sure I understand the difference between `ShenandoahElasticPLAB` and not, since the documentation comment isn't very helpful:
product(bool, ShenandoahElasticTLAB, true, DIAGNOSTIC, \
"Use Elastic TLABs with Shenandoah") \
> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 727:
>
>> 725: // * The bottom of a PLAB must be aligned on card size. In some cases this will
>> 726: // require padding in front of the PLAB (a filler object). Because this padding
>> 727: // is included in the region's used memory we include the padding in the accounting.
>
> ... in the accounting as waste.
So, for humongous objects waste isn't included in used, but for non-humongous objects waste is included in used?
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/260#discussion_r1170597160
PR Review Comment: https://git.openjdk.org/shenandoah/pull/260#discussion_r1169365556
More information about the shenandoah-dev
mailing list