185 static ModuleEntry* create_boot_unnamed_module(ClassLoaderData* cld);
186 static ModuleEntry* new_unnamed_module_entry(Handle module_handle, ClassLoaderData* cld);
187
188 // Note caller requires ResourceMark
189 const char* name_as_C_string() {
190 return is_named() ? name()->as_C_string() : UNNAMED_MODULE;
191 }
192 void print(outputStream* st = tty);
193 void verify();
194
195 CDS_ONLY(int shared_path_index() { return _shared_path_index;})
196
197 JFR_ONLY(DEFINE_TRACE_ID_METHODS;)
198
199 #if INCLUDE_CDS_JAVA_HEAP
200 void iterate_symbols(MetaspaceClosure* closure);
201 ModuleEntry* allocate_archived_entry() const;
202 void init_as_archived_entry();
203 static ModuleEntry* get_archived_entry(ModuleEntry* orig_entry);
204 bool has_been_archived();
205 static Array<ModuleEntry*>* write_growable_array(GrowableArray<ModuleEntry*>* array);
206 static GrowableArray<ModuleEntry*>* restore_growable_array(Array<ModuleEntry*>* archived_array);
207 void load_from_archive(ClassLoaderData* loader_data);
208 void restore_archived_oops(ClassLoaderData* loader_data);
209 void clear_archived_oops();
210 void update_oops_in_archived_module(int root_oop_index);
211 static void verify_archived_module_entries() PRODUCT_RETURN;
212 #endif
213 };
214
215 // Iterator interface
216 class ModuleClosure: public StackObj {
217 public:
218 virtual void do_module(ModuleEntry* module) = 0;
219 };
220
221
222 // The ModuleEntryTable is a Hashtable containing a list of all modules defined
223 // by a particular class loader. Each module is represented as a ModuleEntry node.
224 //
225 // Each ModuleEntryTable contains a _javabase_module field which allows for the
|
185 static ModuleEntry* create_boot_unnamed_module(ClassLoaderData* cld);
186 static ModuleEntry* new_unnamed_module_entry(Handle module_handle, ClassLoaderData* cld);
187
188 // Note caller requires ResourceMark
189 const char* name_as_C_string() {
190 return is_named() ? name()->as_C_string() : UNNAMED_MODULE;
191 }
192 void print(outputStream* st = tty);
193 void verify();
194
195 CDS_ONLY(int shared_path_index() { return _shared_path_index;})
196
197 JFR_ONLY(DEFINE_TRACE_ID_METHODS;)
198
199 #if INCLUDE_CDS_JAVA_HEAP
200 void iterate_symbols(MetaspaceClosure* closure);
201 ModuleEntry* allocate_archived_entry() const;
202 void init_as_archived_entry();
203 static ModuleEntry* get_archived_entry(ModuleEntry* orig_entry);
204 bool has_been_archived();
205 static Array<ModuleEntry*>* write_growable_array(ModuleEntry* module, GrowableArray<ModuleEntry*>* array);
206 static GrowableArray<ModuleEntry*>* restore_growable_array(Array<ModuleEntry*>* archived_array);
207 void load_from_archive(ClassLoaderData* loader_data);
208 void restore_archived_oops(ClassLoaderData* loader_data);
209 void clear_archived_oops();
210 void update_oops_in_archived_module(int root_oop_index);
211 static void verify_archived_module_entries() PRODUCT_RETURN;
212 #endif
213 };
214
215 // Iterator interface
216 class ModuleClosure: public StackObj {
217 public:
218 virtual void do_module(ModuleEntry* module) = 0;
219 };
220
221
222 // The ModuleEntryTable is a Hashtable containing a list of all modules defined
223 // by a particular class loader. Each module is represented as a ModuleEntry node.
224 //
225 // Each ModuleEntryTable contains a _javabase_module field which allows for the
|