[master] RFR: 8368755: [Lilliput] Fix CompressedClassSpaceSize handling [v2]
Thomas Stuefe
stuefe at openjdk.org
Fri Sep 26 14:56:31 UTC 2025
On Fri, 26 Sep 2025 12:28:10 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> We currently set the default CompressedClassSpaceSize to 128M - much lower than the current upstream default of 1G, and still much lower than the possible encoding range with 4-byte-headers of 512M. I think I did this earlier to make some tests pass and to address a problem with CDS which also wants a smallish share of it, but I have in-fact only hidden a bug.
>>
>> The way it should work is to set the CompressedClassSpaceSize to 512M and let CDS take its share and use the rest for class-space. This is infact implemented by [JDK-8332514](https://bugs.openjdk.org/browse/JDK-8332514) since a while. However, there is a bug there that prevents it from working with 4-byte-headers: it has 4G encoding range hard-coded.
>>
>> This change fixes:
>> - It reverts the default CCSS to 1G
>> - It sets CCSS to 512M when running with COH
>> - It makes the auto-sizing work by setting the correct encoding range
>> - It fixes a test that tries to use CCSS*2. I changed it to use CCSS/2, I think this is still in the spirit of the test ('use a different CCSS and see if it still works')
>>
>> Testing:
>> - [x] tier1
>> - [x] tier2
>> - [x] gc/arguments/TestUseCompressedOopsErgoTools.java (affected by the change)
>> - [x] runtime/cds/appcds/dynamicArchive/DynamicLotsOfClasses.java (failed before, fixed by this change)
>> - [x] runtime/cds/appcds/LotsOfJRTClasses.java (failed before, fixed by this change)
>
> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>
> Avoid hard-coding encoding range
good
-------------
Marked as reviewed by stuefe (Reviewer).
PR Review: https://git.openjdk.org/lilliput/pull/203#pullrequestreview-3272636650
More information about the lilliput-dev
mailing list