[master] RFR: 8368755: [Lilliput] Fix CompressedClassSpaceSize handling [v2]
Roman Kennke
rkennke at openjdk.org
Fri Sep 26 12:28:10 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)
Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
Avoid hard-coding encoding range
-------------
Changes:
- all: https://git.openjdk.org/lilliput/pull/203/files
- new: https://git.openjdk.org/lilliput/pull/203/files/66ae0a2e..5cc6d531
Webrevs:
- full: https://webrevs.openjdk.org/?repo=lilliput&pr=203&range=01
- incr: https://webrevs.openjdk.org/?repo=lilliput&pr=203&range=00-01
Stats: 17 lines in 3 files changed: 10 ins; 0 del; 7 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