RFR: Use PLABs for old gen allocations, including promotions. [v2]

Bernd Mathiske bmathiske at openjdk.java.net
Wed Apr 21 20:50:46 UTC 2021


On Wed, 21 Apr 2021 20:34:39 GMT, Bernd Mathiske <bmathiske at openjdk.org> wrote:

>> Yes, this is a full copy. Will refactor.
>
> I tried to refactor: it quickly gets quite ugly. A lot of gclab values are hardwired into identifier names. For example, check out the upper part of allocate_from_gclab_slow()!  How can we abstract over ShenandoahThreadLocalData::gclab_size() vs. ShenandoahThreadLocalData::plab_size()? This issues repeats with other tags/labels/identifers, e.g., when creating a ShenandoahAllocRequest(). I'd have to come up with a whole new way of addressing LABs generically and that would touch a lot of code.

A template with 4 parameters might work, but I have doubts that methods as template parameters would increase readability.

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

PR: https://git.openjdk.java.net/shenandoah/pull/30


More information about the shenandoah-dev mailing list