--- old/src/hotspot/share/classfile/classLoaderData.hpp 2018-03-26 13:40:53.440957145 -0400 +++ new/src/hotspot/share/classfile/classLoaderData.hpp 2018-03-26 13:40:53.057921758 -0400 @@ -30,6 +30,7 @@ #include "memory/metaspace.hpp" #include "memory/metaspaceCounters.hpp" #include "oops/oopHandle.hpp" +#include "oops/weakHandle.hpp" #include "runtime/mutex.hpp" #include "trace/traceMacros.hpp" #include "utilities/growableArray.hpp" @@ -113,7 +114,7 @@ static void packages_unloading_do(void f(PackageEntry*)); static void loaded_classes_do(KlassClosure* klass_closure); static void classes_unloading_do(void f(Klass* const)); - static bool do_unloading(BoolObjectClosure* is_alive, bool clean_previous_versions); + static bool do_unloading(BoolObjectClosure* is_alive_closure, bool clean_previous_versions); // dictionary do // Iterate over all klasses in dictionary, but @@ -219,6 +220,7 @@ static ClassLoaderData * _the_null_class_loader_data; + WeakHandle _holder; // The oop that determines lifetime of this class loader oop _class_loader; // oop used to uniquely identify a class loader // class loader or a canonical class path @@ -308,7 +310,7 @@ bool claimed() const { return _claimed == 1; } bool claim(); - bool is_alive(BoolObjectClosure* is_alive_closure) const; + bool is_alive() const; // Accessors ClassLoaderMetaspace* metaspace_or_null() const { return _metaspace; } @@ -364,6 +366,8 @@ void inc_keep_alive(); void dec_keep_alive(); + void update_holder(Handle holder); + inline unsigned int identity_hash() const { return (unsigned int)(((intptr_t)this) >> 3); } void oops_do(OopClosure* f, bool must_claim, bool clear_modified_oops = false);