RFR: 8286556: Remove EagerInitialization develop option

Claes Redestad redestad at openjdk.java.net
Thu May 12 12:19:05 UTC 2022


On Thu, 12 May 2022 00:57:12 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> This is a long unused option which interferes with code I'm trying to replace, so removing it.
>> Tested with tier1-4.
>
> Interesting - for some reason I thought eager initialization was always on as it seemed a useful optimization. Though technically it might violate the spec if we have an API that exposes only initialized classes ...

@dholmes-ora: If this eager initialization mechanism lead to the initialization of every class that gets loaded, say for the purpose of class verification, then it could - or rather would - lead to fascinating cascades of a lot of things getting eagerly loaded (and initialized) in turn - things that would typically never be loaded or initialized otherwise. Doesn't seem very helpful as an optimization. 

Not to mention that we have roped off some initialization to inner Holder classes in tricky places of the libraries to defer the initialization of certain things until things are up and running to avoid bootstrap issues, which means forced and eager initialization might lead to any number of bootstrapping bugs.

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

PR: https://git.openjdk.java.net/jdk/pull/8653


More information about the hotspot-dev mailing list