RFR: 8286556: Remove EagerInitialization develop option

David Holmes dholmes at openjdk.java.net
Thu May 12 14:01:58 UTC 2022


On Thu, 12 May 2022 13:07:30 GMT, Claes Redestad <redestad 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.
>
> Perhaps someone ran into some bootstrapping issues when it was unconstrained and tried limiting its reach like that to keep it working and still being somewhat useful? Either way I think you're right that removing it is preferable at this point (I'm biased against all the unused/untested diagnostic/develop flags, though).

@cl4es as Coleen explained this was an optimisation for classes with empty clinit, the intent being to mark the class as initialized upfront so that we can skip all those places where we have to check a class is initialized before we use it - that could potentially be of benefit and doesn't lead to the problems you outline. But the eager linking could potentially cause more class loading to occur at the time. 
@coleenp  if I'm reading things right if eager linking got any exceptions it would reset the state so that we'd try to re-link at the regular time. I'm not sure how valid that actually is.
In any case it was unused code so removing it is definitely the right thing.

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

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


More information about the hotspot-dev mailing list