RFR(XL): JDK-8228441 Field layout requires complete overhaul to efficiently support inline classes

Frederic Parain frederic.parain at oracle.com
Fri Jul 19 15:26:45 UTC 2019


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