equal
deleted
inserted
replaced
189 _narrow_klass_base = Universe::narrow_klass_base(); |
189 _narrow_klass_base = Universe::narrow_klass_base(); |
190 _narrow_klass_shift = Universe::narrow_klass_shift(); |
190 _narrow_klass_shift = Universe::narrow_klass_shift(); |
191 _shared_path_table_size = mapinfo->_shared_path_table_size; |
191 _shared_path_table_size = mapinfo->_shared_path_table_size; |
192 _shared_path_table = mapinfo->_shared_path_table; |
192 _shared_path_table = mapinfo->_shared_path_table; |
193 _shared_path_entry_size = mapinfo->_shared_path_entry_size; |
193 _shared_path_entry_size = mapinfo->_shared_path_entry_size; |
194 if (MetaspaceShared::is_heap_object_archiving_allowed()) { |
194 if (HeapShared::is_heap_object_archiving_allowed()) { |
195 _heap_reserved = Universe::heap()->reserved_region(); |
195 _heap_reserved = Universe::heap()->reserved_region(); |
196 } |
196 } |
197 |
197 |
198 // The following fields are for sanity checks for whether this archive |
198 // The following fields are for sanity checks for whether this archive |
199 // will function correctly with this JVM and the bootclasspath it's |
199 // will function correctly with this JVM and the bootclasspath it's |
906 // references to the shared strings and open archive objects initially. |
906 // references to the shared strings and open archive objects initially. |
907 // During runtime execution, out-going references to any other java heap |
907 // During runtime execution, out-going references to any other java heap |
908 // regions may be added. GC may mark and update references in the mapped |
908 // regions may be added. GC may mark and update references in the mapped |
909 // open archive objects. |
909 // open archive objects. |
910 void FileMapInfo::map_heap_regions_impl() { |
910 void FileMapInfo::map_heap_regions_impl() { |
911 if (!MetaspaceShared::is_heap_object_archiving_allowed()) { |
911 if (!HeapShared::is_heap_object_archiving_allowed()) { |
912 log_info(cds)("CDS heap data is being ignored. UseG1GC, " |
912 log_info(cds)("CDS heap data is being ignored. UseG1GC, " |
913 "UseCompressedOops and UseCompressedClassPointers are required."); |
913 "UseCompressedOops and UseCompressedClassPointers are required."); |
914 return; |
914 return; |
915 } |
915 } |
916 |
916 |
998 if (map_heap_data(&open_archive_heap_ranges, |
998 if (map_heap_data(&open_archive_heap_ranges, |
999 MetaspaceShared::first_open_archive_heap_region, |
999 MetaspaceShared::first_open_archive_heap_region, |
1000 MetaspaceShared::max_open_archive_heap_region, |
1000 MetaspaceShared::max_open_archive_heap_region, |
1001 &num_open_archive_heap_ranges, |
1001 &num_open_archive_heap_ranges, |
1002 true /* open */)) { |
1002 true /* open */)) { |
1003 MetaspaceShared::set_open_archive_heap_region_mapped(); |
1003 HeapShared::set_open_archive_heap_region_mapped(); |
1004 } |
1004 } |
1005 } |
1005 } |
1006 } |
1006 } |
1007 |
1007 |
1008 void FileMapInfo::map_heap_regions() { |
1008 void FileMapInfo::map_heap_regions() { |
1012 |
1012 |
1013 if (!StringTable::shared_string_mapped()) { |
1013 if (!StringTable::shared_string_mapped()) { |
1014 assert(string_ranges == NULL && num_string_ranges == 0, "sanity"); |
1014 assert(string_ranges == NULL && num_string_ranges == 0, "sanity"); |
1015 } |
1015 } |
1016 |
1016 |
1017 if (!MetaspaceShared::open_archive_heap_region_mapped()) { |
1017 if (!HeapShared::open_archive_heap_region_mapped()) { |
1018 assert(open_archive_heap_ranges == NULL && num_open_archive_heap_ranges == 0, "sanity"); |
1018 assert(open_archive_heap_ranges == NULL && num_open_archive_heap_ranges == 0, "sanity"); |
1019 } |
1019 } |
1020 } |
1020 } |
1021 |
1021 |
1022 bool FileMapInfo::map_heap_data(MemRegion **heap_mem, int first, |
1022 bool FileMapInfo::map_heap_data(MemRegion **heap_mem, int first, |
1158 return true; // no data |
1158 return true; // no data |
1159 } |
1159 } |
1160 if ((MetaspaceShared::is_string_region(i) && |
1160 if ((MetaspaceShared::is_string_region(i) && |
1161 !StringTable::shared_string_mapped()) || |
1161 !StringTable::shared_string_mapped()) || |
1162 (MetaspaceShared::is_open_archive_heap_region(i) && |
1162 (MetaspaceShared::is_open_archive_heap_region(i) && |
1163 !MetaspaceShared::open_archive_heap_region_mapped())) { |
1163 !HeapShared::open_archive_heap_region_mapped())) { |
1164 return true; // archived heap data is not mapped |
1164 return true; // archived heap data is not mapped |
1165 } |
1165 } |
1166 const char* buf = region_addr(i); |
1166 const char* buf = region_addr(i); |
1167 int crc = ClassLoader::crc32(0, buf, (jint)sz); |
1167 int crc = ClassLoader::crc32(0, buf, (jint)sz); |
1168 if (crc != space_at(i)->_crc) { |
1168 if (crc != space_at(i)->_crc) { |