< prev index next >

src/hotspot/share/classfile/classLoaderData.cpp

Print this page

        

*** 149,163 **** _class_loader_klass = h_class_loader->klass(); initialize_name(h_class_loader); } if (!has_class_mirror_holder) { ! // The holder is initialized later for weak hidden and unsafe anonymous classes, // and before calling anything that call class_loader(). initialize_holder(h_class_loader); ! // A ClassLoaderData created solely for an weak hidden or unsafe anonymous class should // never have a ModuleEntryTable or PackageEntryTable created for it. The defining package // and module for an unsafe anonymous class will be found in its host class. _packages = new PackageEntryTable(PackageEntryTable::_packagetable_entry_size); if (h_class_loader.is_null()) { // Create unnamed module for boot loader --- 149,163 ---- _class_loader_klass = h_class_loader->klass(); initialize_name(h_class_loader); } if (!has_class_mirror_holder) { ! // The holder is initialized later for non-strong hidden classes and unsafe anonymous classes, // and before calling anything that call class_loader(). initialize_holder(h_class_loader); ! // A ClassLoaderData created solely for a non-strong hidden class or unsafe anonymous class should // never have a ModuleEntryTable or PackageEntryTable created for it. The defining package // and module for an unsafe anonymous class will be found in its host class. _packages = new PackageEntryTable(PackageEntryTable::_packagetable_entry_size); if (h_class_loader.is_null()) { // Create unnamed module for boot loader
*** 416,427 **** return; } oop to; if (to_cld->has_class_mirror_holder()) { ! // Just return if a weak hidden or unsafe anonymous class is attempting to record a dependency ! // to itself. (Note that every weak hidden or unsafe anonymous class has its own unique class // loader data.) if (to_cld == from_cld) { return; } // Hidden and unsafe anonymous class dependencies are through the mirror. --- 416,427 ---- return; } oop to; if (to_cld->has_class_mirror_holder()) { ! // Just return if a non-strong hidden class or unsafe anonymous class is attempting to record a dependency ! // to itself. (Note that every non-strong hidden class or unsafe anonymous class has its own unique class // loader data.) if (to_cld == from_cld) { return; } // Hidden and unsafe anonymous class dependencies are through the mirror.
*** 616,626 **** } } // Unloading support bool ClassLoaderData::is_alive() const { ! bool alive = keep_alive() // null class loader and incomplete weak hidden or unsafe anonymous klasses. || (_holder.peek() != NULL); // and not cleaned by the GC weak handle processing. return alive; } --- 616,626 ---- } } // Unloading support bool ClassLoaderData::is_alive() const { ! bool alive = keep_alive() // null class loader and incomplete non-strong hidden class or unsafe anonymous class. || (_holder.peek() != NULL); // and not cleaned by the GC weak handle processing. return alive; }
*** 728,748 **** } // Returns true if the class loader for this class loader data is one of // the 3 builtin (boot application/system or platform) class loaders, // including a user-defined system class loader. Note that if the class ! // loader data is for a weak hidden or unsafe anonymous class then it may // get freed by a GC even if its class loader is one of these loaders. bool ClassLoaderData::is_builtin_class_loader_data() const { return (is_boot_class_loader_data() || SystemDictionary::is_system_class_loader(class_loader()) || SystemDictionary::is_platform_class_loader(class_loader())); } // Returns true if this class loader data is a class loader data // that is not ever freed by a GC. It must be the CLD for one of the builtin ! // class loaders and not the CLD for a weak hidden or unsafe anonymous class. bool ClassLoaderData::is_permanent_class_loader_data() const { return is_builtin_class_loader_data() && !has_class_mirror_holder(); } ClassLoaderMetaspace* ClassLoaderData::metaspace_non_null() { --- 728,748 ---- } // Returns true if the class loader for this class loader data is one of // the 3 builtin (boot application/system or platform) class loaders, // including a user-defined system class loader. Note that if the class ! // loader data is for a non-strong hidden class or unsafe anonymous class then it may // get freed by a GC even if its class loader is one of these loaders. bool ClassLoaderData::is_builtin_class_loader_data() const { return (is_boot_class_loader_data() || SystemDictionary::is_system_class_loader(class_loader()) || SystemDictionary::is_platform_class_loader(class_loader())); } // Returns true if this class loader data is a class loader data // that is not ever freed by a GC. It must be the CLD for one of the builtin ! // class loaders and not the CLD for a non-strong hidden class or unsafe anonymous class. bool ClassLoaderData::is_permanent_class_loader_data() const { return is_builtin_class_loader_data() && !has_class_mirror_holder(); } ClassLoaderMetaspace* ClassLoaderData::metaspace_non_null() {
*** 875,885 **** remove_class(ik); } } } ! // These CLDs are to contain weak hidden or unsafe anonymous classes used for JSR292 ClassLoaderData* ClassLoaderData::has_class_mirror_holder_cld(Handle loader) { // Add a new class loader data to the graph. return ClassLoaderDataGraph::add(loader, true); } --- 875,885 ---- remove_class(ik); } } } ! // These CLDs are to contain non-strong hidden classes or unsafe anonymous classes used for JSR292 ClassLoaderData* ClassLoaderData::has_class_mirror_holder_cld(Handle loader) { // Add a new class loader data to the graph. return ClassLoaderDataGraph::add(loader, true); }
< prev index next >