< prev index next >

src/hotspot/share/classfile/classLoaderData.hpp

Print this page

        

*** 114,134 **** ClassLoaderMetaspace * volatile _metaspace; // Meta-space where meta-data defined by the // classes in the class loader are allocated. Mutex* _metaspace_lock; // Locks the metaspace for allocations and setup. bool _unloading; // true if this class loader goes away ! bool _is_unsafe_anonymous; // CLD is dedicated to one class and that class determines the CLDs lifecycle. ! // For example, an unsafe anonymous class. // Remembered sets support for the oops in the class loader data. bool _modified_oops; // Card Table Equivalent (YC/CMS support) bool _accumulated_modified_oops; // Mod Union Equivalent (CMS support) s2 _keep_alive; // if this CLD is kept alive. ! // Used for unsafe anonymous classes and the boot class ! // loader. _keep_alive does not need to be volatile or ! // atomic since there is one unique CLD per unsafe anonymous class. volatile int _claim; // non-zero if claimed, for example during GC traces. // To avoid applying oop closure more than once. ChunkedHandleList _handles; // Handles to constant pool arrays, Modules, etc, which // have the same life cycle of the corresponding ClassLoader. --- 114,134 ---- ClassLoaderMetaspace * volatile _metaspace; // Meta-space where meta-data defined by the // classes in the class loader are allocated. Mutex* _metaspace_lock; // Locks the metaspace for allocations and setup. bool _unloading; // true if this class loader goes away ! bool _is_shortlived; // CLD is dedicated to one class and that class determines the CLDs lifecycle. ! // For example, a weak nonfindable or an unsafe anonymous class. // Remembered sets support for the oops in the class loader data. bool _modified_oops; // Card Table Equivalent (YC/CMS support) bool _accumulated_modified_oops; // Mod Union Equivalent (CMS support) s2 _keep_alive; // if this CLD is kept alive. ! // Used for weak nonfindable classes, unsafe anonymous classes and the ! // boot class loader. _keep_alive does not need to be volatile or ! // atomic since there is one unique CLD per weak nonfindable or unsafe anonymous class. volatile int _claim; // non-zero if claimed, for example during GC traces. // To avoid applying oop closure more than once. ChunkedHandleList _handles; // Handles to constant pool arrays, Modules, etc, which // have the same life cycle of the corresponding ClassLoader.
*** 159,169 **** JFR_ONLY(DEFINE_TRACE_ID_FIELD;) void set_next(ClassLoaderData* next) { _next = next; } ClassLoaderData* next() const { return _next; } ! ClassLoaderData(Handle h_class_loader, bool is_unsafe_anonymous); ~ClassLoaderData(); // The CLD are not placed in the Heap, so the Card Table or // the Mod Union Table can't be used to mark when CLD have modified oops. // The CT and MUT bits saves this information for the whole class loader data. --- 159,169 ---- JFR_ONLY(DEFINE_TRACE_ID_FIELD;) void set_next(ClassLoaderData* next) { _next = next; } ClassLoaderData* next() const { return _next; } ! ClassLoaderData(Handle h_class_loader, bool is_shortlived); ~ClassLoaderData(); // The CLD are not placed in the Heap, so the Card Table or // the Mod Union Table can't be used to mark when CLD have modified oops. // The CT and MUT bits saves this information for the whole class loader data.
*** 227,254 **** return _the_null_class_loader_data; } Mutex* metaspace_lock() const { return _metaspace_lock; } ! bool is_unsafe_anonymous() const { return _is_unsafe_anonymous; } static void init_null_class_loader_data(); bool is_the_null_class_loader_data() const { return this == _the_null_class_loader_data; } // Returns true if this class loader data is for the system class loader. ! // (Note that the class loader data may be unsafe anonymous.) bool is_system_class_loader_data() const; // Returns true if this class loader data is for the platform class loader. ! // (Note that the class loader data may be unsafe anonymous.) bool is_platform_class_loader_data() const; // Returns true if this class loader data is for the boot class loader. ! // (Note that the class loader data may be unsafe anonymous.) inline bool is_boot_class_loader_data() const; bool is_builtin_class_loader_data() const; bool is_permanent_class_loader_data() const; --- 227,254 ---- return _the_null_class_loader_data; } Mutex* metaspace_lock() const { return _metaspace_lock; } ! bool is_shortlived() const { return _is_shortlived; } static void init_null_class_loader_data(); bool is_the_null_class_loader_data() const { return this == _the_null_class_loader_data; } // Returns true if this class loader data is for the system class loader. ! // (Note that the class loader data may be for an weak nonfindable or unsafe anonymous class) bool is_system_class_loader_data() const; // Returns true if this class loader data is for the platform class loader. ! // (Note that the class loader data may be for an weak nonfindable or unsafe anonymous class) bool is_platform_class_loader_data() const; // Returns true if this class loader data is for the boot class loader. ! // (Note that the class loader data may be for an weak nonfindable unsafe anonymous class) inline bool is_boot_class_loader_data() const; bool is_builtin_class_loader_data() const; bool is_permanent_class_loader_data() const;
*** 265,275 **** bool is_unloading() const { assert(!(is_the_null_class_loader_data() && _unloading), "The null class loader can never be unloaded"); return _unloading; } ! // Used to refcount an unsafe anonymous class's CLD in order to // indicate their aliveness. void inc_keep_alive(); void dec_keep_alive(); void initialize_holder(Handle holder); --- 265,275 ---- bool is_unloading() const { assert(!(is_the_null_class_loader_data() && _unloading), "The null class loader can never be unloaded"); return _unloading; } ! // Used to refcount an weak nonfindable or unsafe anonymous class's CLD in order to // indicate their aliveness. void inc_keep_alive(); void dec_keep_alive(); void initialize_holder(Handle holder);
*** 305,315 **** void add_to_deallocate_list(Metadata* m); static ClassLoaderData* class_loader_data(oop loader); static ClassLoaderData* class_loader_data_or_null(oop loader); ! static ClassLoaderData* unsafe_anonymous_class_loader_data(Handle loader); // Returns Klass* of associated class loader, or NULL if associated loader is 'bootstrap'. // Also works if unloading. Klass* class_loader_klass() const { return _class_loader_klass; } --- 305,315 ---- void add_to_deallocate_list(Metadata* m); static ClassLoaderData* class_loader_data(oop loader); static ClassLoaderData* class_loader_data_or_null(oop loader); ! static ClassLoaderData* shortlived_class_loader_data(Handle loader); // Returns Klass* of associated class loader, or NULL if associated loader is 'bootstrap'. // Also works if unloading. Klass* class_loader_klass() const { return _class_loader_klass; }
< prev index next >