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 static void verify_archived_module_entries() PRODUCT_RETURN;
211 #endif
212 };
213
214 // Iterator interface
215 class ModuleClosure: public StackObj {
216 public:
217 virtual void do_module(ModuleEntry* module) = 0;
218 };
219
220
221 // The ModuleEntryTable is a Hashtable containing a list of all modules defined
222 // by a particular class loader. Each module is represented as a ModuleEntry node.
223 //
224 // Each ModuleEntryTable contains a _javabase_module field which allows for the
225 // creation of java.base's ModuleEntry very early in bootstrapping before 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 static void verify_archived_module_entries() PRODUCT_RETURN;
211 #endif
212 };
213
214 // Iterator interface
215 class ModuleClosure: public StackObj {
216 public:
217 virtual void do_module(ModuleEntry* module) = 0;
218 };
219
220
221 // The ModuleEntryTable is a Hashtable containing a list of all modules defined
222 // by a particular class loader. Each module is represented as a ModuleEntry node.
223 //
224 // Each ModuleEntryTable contains a _javabase_module field which allows for the
225 // creation of java.base's ModuleEntry very early in bootstrapping before the
|