[master] Integrated: Eliminate Klass* word

Roman Kennke rkennke at openjdk.java.net
Wed Feb 23 12:28:25 UTC 2022


On Thu, 17 Feb 2022 17:48:16 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

> This change removes the dedicated Klass* word in the oop structure, at least in 64 bit builds. It has been usused, except for verification, since integration of #29.
> 
> The change makes regular objects smaller, the field layouter can now use the extra space and start laying out fields at offset 8 (instead of 12 or 16, depending on class-compression). However, arrays remain unchanged because they still store the array length in offset 8, and current array code expects the array elements to start at 64bit aligned address, even for smaller data types. I will address this in a subsequent change.
> 
> Much of the change is reverting the klass_offset -> nklass_offset change by #29, as promised. I also disabled s390x and ppc64le GHA builds, because they are broken by this change.
> 
> I problem-listed a number of SA tests. The SA is broken by this change because it needs to load the Klass* from a regular field. I tried to change it, but it looks very difficult: it doesn't have a way to safely access the object mark word in the face of concurrent activity by the locking subsystem. Fixing the SA is not very high priority at this point, it may ultimately not even be necessary when/if the locking subsystem doesn't use the mark word anymore (or at least, does no longer displace the header).
> 
> Testing:
>  - [x] tier1 (x86_64, x86_32, aarch64)
>  - [x] tier2 (x86_64, x86_32, aarch64)
>  - [ ] tier3 (x86_64, x86_32, aarch64)

This pull request has now been integrated.

Changeset: 35980384
Author:    Roman Kennke <rkennke at openjdk.org>
URL:       https://git.openjdk.java.net/lilliput/commit/35980384ef2b78b38190233bb2a54aeb21f12abe
Stats:     259 lines in 45 files changed: 62 ins; 129 del; 68 mod

Eliminate Klass* word

Reviewed-by: shade

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

PR: https://git.openjdk.java.net/lilliput/pull/40


More information about the lilliput-dev mailing list