RFR: 8327097: GenShen: Align PLAB sizes down rather than up [v6]
Kelvin Nilsen
kdnilsen at openjdk.org
Fri Mar 22 18:27:43 UTC 2024
On Wed, 20 Mar 2024 23:30:42 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> src/hotspot/share/gc/shenandoah/shenandoahHeapRegion.inline.hpp line 54:
>>
>>> 52: HeapWord* aligned_obj = (HeapWord*) align_up(orig_top, alignment_in_bytes);
>>> 53: size_t pad_words = aligned_obj - orig_top;
>>> 54: if (pad_words > 0) {
>>
>> Can probably just && and fold together the two if tests.
>
> if (pad_words > 0 && pad_words < ShenandoahHeap::min_fill_size()) {
> // shift allocation right by another unit of alignment to accommodate pad for filler
> pad_words += alignment_in_words;
> aligned_obj += alignment_in_words;
> }
Thanks. Done.
-------------
PR Review Comment: https://git.openjdk.org/shenandoah/pull/401#discussion_r1536016414
More information about the shenandoah-dev
mailing list