hotspot/src/share/vm/memory/filemap.cpp
changeset 42876 ff8ff9dcccec
parent 41667 4a349512fde1
child 46522 86b13b03a053
equal deleted inserted replaced
42875:bac62054c0b6 42876:ff8ff9dcccec
   177   _narrow_klass_base = Universe::narrow_klass_base();
   177   _narrow_klass_base = Universe::narrow_klass_base();
   178   _narrow_klass_shift = Universe::narrow_klass_shift();
   178   _narrow_klass_shift = Universe::narrow_klass_shift();
   179   _classpath_entry_table_size = mapinfo->_classpath_entry_table_size;
   179   _classpath_entry_table_size = mapinfo->_classpath_entry_table_size;
   180   _classpath_entry_table = mapinfo->_classpath_entry_table;
   180   _classpath_entry_table = mapinfo->_classpath_entry_table;
   181   _classpath_entry_size = mapinfo->_classpath_entry_size;
   181   _classpath_entry_size = mapinfo->_classpath_entry_size;
   182   _num_patch_mod_prefixes = ClassLoader::num_patch_mod_prefixes();
       
   183 
   182 
   184   // The following fields are for sanity checks for whether this archive
   183   // The following fields are for sanity checks for whether this archive
   185   // will function correctly with this JVM and the bootclasspath it's
   184   // will function correctly with this JVM and the bootclasspath it's
   186   // invoked with.
   185   // invoked with.
   187 
   186 
   946                   _compact_strings ? "enabled" : "disabled",
   945                   _compact_strings ? "enabled" : "disabled",
   947                   CompactStrings   ? "enabled" : "disabled");
   946                   CompactStrings   ? "enabled" : "disabled");
   948     return false;
   947     return false;
   949   }
   948   }
   950 
   949 
   951   // Check if there is a mismatch in --patch-module entry counts between dump time and run time.
       
   952   // More checks will be performed on individual --patch-module entry in the
       
   953   // SharedPathsMiscInfo::check() function.
       
   954   GrowableArray<ModulePatchPath*>* patch_mod_args = Arguments::get_patch_mod_prefix();
       
   955   if (patch_mod_args != NULL) {
       
   956     if (_num_patch_mod_prefixes == 0) {
       
   957       FileMapInfo::fail_stop("--patch-module found in run time but none was specified in dump time");
       
   958     }
       
   959     if (patch_mod_args->length() != _num_patch_mod_prefixes) {
       
   960       FileMapInfo::fail_stop("mismatched --patch-module entry counts between dump time and run time");
       
   961     }
       
   962   } else {
       
   963     if (_num_patch_mod_prefixes > 0) {
       
   964       FileMapInfo::fail_stop("--patch-module specified in dump time but none was specified in run time");
       
   965     }
       
   966   }
       
   967 
       
   968   return true;
   950   return true;
   969 }
   951 }
   970 
   952 
   971 bool FileMapInfo::validate_header() {
   953 bool FileMapInfo::validate_header() {
   972   bool status = _header->validate();
   954   bool status = _header->validate();