RFR(XS) 8189140 - SystemDictionaryShared::initialize() should be renamed to be more meaningful
david.holmes at oracle.com
Tue May 15 06:25:25 UTC 2018
On 15/05/2018 4:07 PM, Ioi Lam wrote:
> 1. Removed the forced initialization of a few classes used by AppCDS at
> JVM start-up.
> Instead, initialize these class on demand by calling
> InstanceKlass::initialize, which
> is a quick no-op if the class is already initialized.
Any reason not to just add them to the set of pre-loaded and
pre-initialized classes used with shared spaces in
Aside: It looks a little odd to lazy-init a couple of classes but then
assume/expect others (like SecureClassLoader) are already initialized.
But this seems functionally fine and a good tidy up (the class init
stuff really didn't belong as a side-effect). The only thing I'd be
double checking is that the same thread (presumably the main thread) is
guaranteed to be the one doing the initialization.
> 2. The only initialization left is that of a global lock. So I renamed
> the function
> to SystemDictionaryShared::initialize_locks().
> 3. I moved the call of this function from
> SystemDictionary::compute_java_loaders() to
> SystemDictionary::initialize() where it seems to fit.
> Testing with hs-tiers 1 and 2.
> - Ioi
More information about the hotspot-runtime-dev