hotspot/src/share/vm/classfile/classLoader.hpp
changeset 40244 b3055c216762
parent 40013 943cf01a6b82
child 40887 8d35e19f5548
equal deleted inserted replaced
40238:4d2a15091124 40244:b3055c216762
   148   NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);)
   148   NOT_PRODUCT(void compile_the_world(Handle loader, TRAPS);)
   149 };
   149 };
   150 
   150 
   151 // ModuleClassPathList contains a linked list of ClassPathEntry's
   151 // ModuleClassPathList contains a linked list of ClassPathEntry's
   152 // that have been specified for a specific module.  Currently,
   152 // that have been specified for a specific module.  Currently,
   153 // the only way to specify a module/path pair is via the -Xpatch
   153 // the only way to specify a module/path pair is via the --patch-module
   154 // command line option.
   154 // command line option.
   155 class ModuleClassPathList : public CHeapObj<mtClass> {
   155 class ModuleClassPathList : public CHeapObj<mtClass> {
   156 private:
   156 private:
   157   Symbol* _module_name;
   157   Symbol* _module_name;
   158   // First and last entries of class path entries for a specific module
   158   // First and last entries of class path entries for a specific module
   211   static PerfCounter* _unsafe_defineClassCallCounter;
   211   static PerfCounter* _unsafe_defineClassCallCounter;
   212   static PerfCounter* _isUnsyncloadClass;
   212   static PerfCounter* _isUnsyncloadClass;
   213   static PerfCounter* _load_instance_class_failCounter;
   213   static PerfCounter* _load_instance_class_failCounter;
   214 
   214 
   215   // The boot class path consists of 3 ordered pieces:
   215   // The boot class path consists of 3 ordered pieces:
   216   //  1. the module/path pairs specified to -Xpatch
   216   //  1. the module/path pairs specified to --patch-module
   217   //    -Xpatch:<module>=<file>(<pathsep><file>)*
   217   //    --patch-module=<module>=<file>(<pathsep><file>)*
   218   //  2. the base piece
   218   //  2. the base piece
   219   //    [jimage | build with exploded modules]
   219   //    [jimage | build with exploded modules]
   220   //  3. boot loader append path
   220   //  3. boot loader append path
   221   //    [-Xbootclasspath/a]; [jvmti appended entries]
   221   //    [-Xbootclasspath/a]; [jvmti appended entries]
   222   //
   222   //
   223   // The boot loader must obey this order when attempting
   223   // The boot loader must obey this order when attempting
   224   // to load a class.
   224   // to load a class.
   225 
   225 
   226   // 1. Contains the module/path pairs specified to -Xpatch
   226   // 1. Contains the module/path pairs specified to --patch-module
   227   static GrowableArray<ModuleClassPathList*>* _xpatch_entries;
   227   static GrowableArray<ModuleClassPathList*>* _patch_mod_entries;
   228 
   228 
   229   // 2. the base piece
   229   // 2. the base piece
   230   //    Contains the ClassPathEntry of the modular java runtime image.
   230   //    Contains the ClassPathEntry of the modular java runtime image.
   231   //    If no java runtime image is present, this indicates a
   231   //    If no java runtime image is present, this indicates a
   232   //    build with exploded modules is being used instead.
   232   //    build with exploded modules is being used instead.
   254   // Info used by CDS
   254   // Info used by CDS
   255   CDS_ONLY(static SharedPathsMiscInfo * _shared_paths_misc_info;)
   255   CDS_ONLY(static SharedPathsMiscInfo * _shared_paths_misc_info;)
   256 
   256 
   257   // Initialization:
   257   // Initialization:
   258   //   - setup the boot loader's system class path
   258   //   - setup the boot loader's system class path
   259   //   - setup the boot loader's xpatch entries, if present
   259   //   - setup the boot loader's patch mod entries, if present
   260   //   - create the ModuleEntry for java.base
   260   //   - create the ModuleEntry for java.base
   261   static void setup_bootstrap_search_path();
   261   static void setup_bootstrap_search_path();
   262   static void setup_search_path(const char *class_path, bool setting_bootstrap);
   262   static void setup_search_path(const char *class_path, bool setting_bootstrap);
   263   static void setup_xpatch_entries();
   263   static void setup_patch_mod_entries();
   264   static void create_javabase();
   264   static void create_javabase();
   265 
   265 
   266   static void load_zip_library();
   266   static void load_zip_library();
   267   static void load_jimage_library();
   267   static void load_jimage_library();
   268   static ClassPathEntry* create_class_path_entry(const char *path, const struct stat* st,
   268   static ClassPathEntry* create_class_path_entry(const char *path, const struct stat* st,
   361   static ClassPathEntry* get_jrt_entry() { return _jrt_entry; }
   361   static ClassPathEntry* get_jrt_entry() { return _jrt_entry; }
   362 
   362 
   363   // Add a module's exploded directory to the boot loader's exploded module build list
   363   // Add a module's exploded directory to the boot loader's exploded module build list
   364   static void add_to_exploded_build_list(Symbol* module_name, TRAPS);
   364   static void add_to_exploded_build_list(Symbol* module_name, TRAPS);
   365 
   365 
   366   // Attempt load of individual class from either the xpatch or exploded modules build lists
   366   // Attempt load of individual class from either the patched or exploded modules build lists
   367   static ClassFileStream* search_module_entries(const GrowableArray<ModuleClassPathList*>* const module_list,
   367   static ClassFileStream* search_module_entries(const GrowableArray<ModuleClassPathList*>* const module_list,
   368                                                 const char* const class_name,
   368                                                 const char* const class_name,
   369                                                 const char* const file_name, TRAPS);
   369                                                 const char* const file_name, TRAPS);
   370 
   370 
   371   // Load individual .class file
   371   // Load individual .class file