[master] RFR: 8368755: [Lilliput] Fix CompressedClassSpaceSize handling
Roman Kennke
rkennke at openjdk.org
Fri Sep 26 09:43:15 UTC 2025
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)
-------------
Commit messages:
- 8368755: [Lilliput] Fix CompressedClassSpaceSize handling
Changes: https://git.openjdk.org/lilliput/pull/203/files
Webrev: https://webrevs.openjdk.org/?repo=lilliput&pr=203&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8368755
Stats: 8 lines in 4 files changed: 4 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/lilliput/pull/203.diff
Fetch: git fetch https://git.openjdk.org/lilliput.git pull/203/head:pull/203
PR: https://git.openjdk.org/lilliput/pull/203
More information about the lilliput-dev
mailing list