RFR(XL): JDK-8228441 Field layout requires complete overhaul to efficiently support inline classes
Frederic Parain
frederic.parain at oracle.com
Fri Jul 26 13:36:13 UTC 2019
Oops, debug code that definitively must be removed.
Thank you for spotting it.
FYI, Coleen and Mary asked me to port this code to the main line.
I’ve prepared a version of it without dependencies to the Valhalla code,
and added some missing features (notably, handling of classes with hard
coded field offsets, using the hard coded offsets directly instead of
tricking the layout algorithm to produce the same offsets).
I’ll update the Valhalla webrev to include these changes, so both versions
will be mostly in sync.
Regards,
Fred
> On Jul 26, 2019, at 08:50, Tobias Hartmann <tobias.hartmann at oracle.com> wrote:
>
> Hi Fred,
>
> just wondering, did you intentionally include the change in compile.cpp? If so, it should be guarded
> by #ifdef ASSERT but I would suggest to just remove it.
>
> Best regards,
> Tobias
>
> On 19.07.19 17:26, Frederic Parain wrote:
>> Greetings,
>>
>> This is the initial request for review for a new code to layout fields.
>> The current code to compute field layouts is especially ugly and
>> not fitted to efficiently flatten inline classes.
>>
>> This changeset is an almost complete overhaul of the field layout code,
>> with a new framework to compute layouts and two different allocation
>> strategies (one for identity classes and one for inline classes).
>>
>> CR: https://bugs.openjdk.java.net/browse/JDK-8228441
>> Webrev: http://cr.openjdk.java.net/~fparain/layout/webrev.00/
>>
>> This changeset also includes some options and DCMD to ease inspection
>> of layouts, especially when flattenable fields are involved.
>>
>> The changeset doesn’t remove the old layout code, meaning that either
>> the old code or the new code can be used (controlled by VM flag).
>>
>> This code passed tiers 1 to 3 on Valhalla supported platforms.
>> Some failures have been identified in higher tiers with some @Contended
>> tests, but they are due to test bugs (tests making relying on wrong
>> assumptions about field layouts).
>>
>> The code contains a lot of comments about the new framework and the
>> different allocation strategies. Feel free to complain if comments
>> are not clear enough or if some code need more comments.
>>
>> Regarding the huge size of this changeset, and people being in summer
>> vacation, I’m not planning to push this code in the short term.
>>
>> Thank you,
>>
>> Fred
>>
More information about the valhalla-dev
mailing list