Withdrawn: 8342283: CDS cannot handle a large number of classes

duke duke at openjdk.org
Thu Dec 26 13:02:40 UTC 2024


On Thu, 31 Oct 2024 03:52:16 GMT, Ioi Lam <iklam at openjdk.org> wrote:

> When lots of classes are loaded during `java -Xshare:dump`, the internal arrays used by some of the HashMaps and ArrayLists become too large to be archived by CDS (> 256KB).
> 
> At the very end of Java bytecode execution during `java -Xshare:dump`, we used to call `clear()` on these tables to free their elements (*) -- these tables are repopulated at run time when classes are loaded incrementally. However, the `clear()` call doesn't resize the internal arrays.
> 
> The fix is to re-ininitialize these tables to new, empty tables that have small internal arrays.
> 
> ===
> (*) the call to `resetArchivedStates()` is made from [HeapShared::reset_archived_object_states()](https://github.com/openjdk/jdk/blob/688e92e7f5febddd2935cb7f500dd3f10fbd9401/src/hotspot/share/cds/metaspaceShared.cpp#L799)

This pull request has been closed without being integrated.

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

PR: https://git.openjdk.org/jdk/pull/21797


More information about the core-libs-dev mailing list