RFR: 8331609: GenShen: Refactor generational mode allocations [v4]

Y. Srinivas Ramakrishna ysr at openjdk.org
Fri May 10 00:31:17 UTC 2024


On Thu, 9 May 2024 23:01:14 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:

>> William Kemper has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - Improve comments, remove too strong assert
>>  - Initialize _evacuation_reserve member
>>  - Modify test fixture to avoid accessing ShenandoahHeap before we know if UseShenandoahGC is set
>
> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 1123:
> 
>> 1121: 
>> 1122:   // If TLAB request size is greater than available, allocate() will attempt to downsize request to fit within available
>> 1123:   // memory.
> 
> I am confused. Why do we need this comment here? Could this not be a non-TLAB allocation request? Why are we specifically talking about TLABs here?
> 
> If we believe this can only be a TLAB, we should assert that `req.type() == _alloc_tlab` ?

Indeed, we see below at line 1129 that this could be a "shared" allocation of a single object(?) in which case, the comment above singling out TLAB allocations appears confusing and misplaced here.

> src/hotspot/share/gc/shenandoah/shenandoahThreadLocalData.hpp line 64:
> 
>> 62:   PLAB* _plab;
>> 63: 
>> 64:   // Heuristics will grow the desired size of plabs.
> 
> ~"grow" or "adjust" (i.e. are downwards adjustments also done?)~ Scratch that, I see that it only grows starting at initial size.

Thank you for the good documentation below!

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

PR Review Comment: https://git.openjdk.org/shenandoah/pull/427#discussion_r1596091811
PR Review Comment: https://git.openjdk.org/shenandoah/pull/427#discussion_r1596024871


More information about the shenandoah-dev mailing list