160 void delete_reads();
161
162 // Special handling for unnamed module, one per class loader
163 static ModuleEntry* create_unnamed_module(ClassLoaderData* cld);
164 static ModuleEntry* create_boot_unnamed_module(ClassLoaderData* cld);
165 static ModuleEntry* new_unnamed_module_entry(Handle module_handle, ClassLoaderData* cld);
166
167 void print(outputStream* st = tty);
168 void verify();
169
170 CDS_ONLY(int shared_path_index() { return _shared_path_index;})
171
172 JFR_ONLY(DEFINE_TRACE_ID_METHODS;)
173
174 #if INCLUDE_CDS_JAVA_HEAP
175 void iterate_symbols(MetaspaceClosure* closure);
176 ModuleEntry* allocate_archived_entry() const;
177 void init_as_archived_entry();
178 static ModuleEntry* get_archived_entry(ModuleEntry* orig_entry);
179 bool has_been_archived();
180 static Array<ModuleEntry*>* write_growable_array(GrowableArray<ModuleEntry*>* array);
181 static GrowableArray<ModuleEntry*>* restore_growable_array(Array<ModuleEntry*>* archived_array);
182 void load_from_archive(ClassLoaderData* loader_data);
183 void restore_archived_oops(ClassLoaderData* loader_data);
184 void clear_archived_oops();
185 void update_oops_in_archived_module(int root_oop_index);
186 static void verify_archived_module_entries() PRODUCT_RETURN;
187 #endif
188 };
189
190 // Iterator interface
191 class ModuleClosure: public StackObj {
192 public:
193 virtual void do_module(ModuleEntry* module) = 0;
194 };
195
196
197 // The ModuleEntryTable is a Hashtable containing a list of all modules defined
198 // by a particular class loader. Each module is represented as a ModuleEntry node.
199 //
200 // Each ModuleEntryTable contains a _javabase_module field which allows for the
|
160 void delete_reads();
161
162 // Special handling for unnamed module, one per class loader
163 static ModuleEntry* create_unnamed_module(ClassLoaderData* cld);
164 static ModuleEntry* create_boot_unnamed_module(ClassLoaderData* cld);
165 static ModuleEntry* new_unnamed_module_entry(Handle module_handle, ClassLoaderData* cld);
166
167 void print(outputStream* st = tty);
168 void verify();
169
170 CDS_ONLY(int shared_path_index() { return _shared_path_index;})
171
172 JFR_ONLY(DEFINE_TRACE_ID_METHODS;)
173
174 #if INCLUDE_CDS_JAVA_HEAP
175 void iterate_symbols(MetaspaceClosure* closure);
176 ModuleEntry* allocate_archived_entry() const;
177 void init_as_archived_entry();
178 static ModuleEntry* get_archived_entry(ModuleEntry* orig_entry);
179 bool has_been_archived();
180 static Array<ModuleEntry*>* write_growable_array(ModuleEntry* module, GrowableArray<ModuleEntry*>* array);
181 static GrowableArray<ModuleEntry*>* restore_growable_array(Array<ModuleEntry*>* archived_array);
182 void load_from_archive(ClassLoaderData* loader_data);
183 void restore_archived_oops(ClassLoaderData* loader_data);
184 void clear_archived_oops();
185 void update_oops_in_archived_module(int root_oop_index);
186 static void verify_archived_module_entries() PRODUCT_RETURN;
187 #endif
188 };
189
190 // Iterator interface
191 class ModuleClosure: public StackObj {
192 public:
193 virtual void do_module(ModuleEntry* module) = 0;
194 };
195
196
197 // The ModuleEntryTable is a Hashtable containing a list of all modules defined
198 // by a particular class loader. Each module is represented as a ModuleEntry node.
199 //
200 // Each ModuleEntryTable contains a _javabase_module field which allows for the
|