[master] RFR: 8301562: [Lilliput] Runtime flag to enable Lilliput
Roman Kennke
rkennke at openjdk.org
Fri Feb 24 18:53:34 UTC 2023
On Wed, 8 Feb 2023 15:27:26 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
>> This change introduces an experimental runtime flag -XX:[+/-]UseCompactObjectHeaders which can be used to disable Lilliput. The flag guards all the relevant places that directly affect the object layout and the accesses to Klass* etc. The change also restores the previous behaviour when -UseCompactObjectHeaders is selected.
>>
>> Testing:
>> - [x] tier1 (x86_64, x86_32, aarch64) +UseCompactObjectHeaders
>> - [x] tier2 (x86_64, x86_32, aarch64) +UseCompactObjectHeaders
>> - [x] tier1 (x86_64, x86_32, aarch64) -UseCompactObjectHeaders
>> - [x] tier2 (x86_64, x86_32, aarch64) -UseCompactObjectHeaders
>
> Hi Roman,
>
> Some fixes from my side, see branch https://github.com/tstuefe/lilliput/commits/fixes-to-usecompactobjectheader
>
> Suggested changes:
>
> 1) https://github.com/tstuefe/lilliput/commit/38dcba1d06a56b01cf7c9a593656f1ae5109b9b0
>
> this makes KlassAlignmentInBytes and friends runtime-controlled. This is really ugly, but the whole ccs- and compressed klass pointer encoding initialization deserves an overhaul, and this is the least intrusive fix possible.
>
> 2) https://github.com/tstuefe/lilliput/commit/ad929fafbb4f7c5785e5627b53f0de33dafd2501
>
> Needed to fix a crash when compact headers are enabled.
>
> 3) https://github.com/tstuefe/lilliput/commit/e854428c077e596f81e1349107bc37c2b80c5237
>
> Expands gtests to also test all permutations of CCS and CompactHeaders
>
> 4) https://github.com/tstuefe/lilliput/commit/4c01e6a017bda54e6cdee62ef8814756829fb489
>
> Needed to move constraint check for CompressedClassPointerSize to after ergo
>
> Cheers, thomas
@tstuefe thanks for you contributions! Unfortunately, I am still getting failures when building on aarch64:
Optimizing the exploded image
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/metaspace.cpp:621
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/rkennke/src/openjdk/lilliput/src/hotspot/share/memory/metaspace.cpp:621), pid=10318, tid=10323
# assert(CompressedKlassPointers::is_valid_base(a)) failed: Sanity
#
# JRE version: (21.0) (fastdebug build )
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 21-internal-adhoc.rkennke.lilliput, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# V [libjvm.so+0x12f2050] Metaspace::reserve_address_space_for_compressed_classes(unsigned long)+0x190
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /local/home/rkennke/src/openjdk/lilliput/make/hs_err_pid10318.log
#
#
-------------
PR: https://git.openjdk.org/lilliput/pull/70
More information about the lilliput-dev
mailing list