On Mon, 28 Apr 2025 09:20:38 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:

>> CDS cannot handle large number of classes, because `ClassLoader` data 
>> structures get too large for CDS archival. The new test captures such an 
>> occasion. We do `clear()`-s, but that is not enough to trim the backing 
>> storages for the affected collections.
>> 
>> In contrast with previous attempts to fix this 
>> (https://github.com/openjdk/jdk/pull/21797 and my VM-side field overwrite), 
>> we can just reinitialize the fields using `Unsafe`, which bypasses normal 
>> `final` field write restriction. `ClassLoader` already does a similar thing 
>> nearby! This allows us to stay fully in Java, and makes the patch fairly 
>> straightforward.
>> 
>> Additional testing:
>>  - [x] Linux x86_64 server fastdebug, new test reliably fails without the 
>> fix, passes with it
>>  - [x] Linux x86_64 server fastdebug, `runtime/cds`
>
> Aleksey Shipilev has updated the pull request with a new target base due to a 
> merge or a rebase. The incremental webrev excludes the unrelated changes 
> brought in by the merge/rebase. The pull request contains four additional 
> commits since the last revision:
> 
>  - Minor touchup
>  - Merge branch 'master' into JDK-8342283-cds-many-classes
>  - Adjust TEST.groups
>  - Fix

Thank you! I am running final `tier{1,2,3}` testing before integration, and 
will integrate when those turn green.

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

PR Comment: https://git.openjdk.org/jdk/pull/24877#issuecomment-2839269179

Reply via email to