src/hotspot/share/classfile/systemDictionaryShared.cpp
changeset 58447 319173c62caa
parent 58096 0d97bf7cf8a4
child 58499 d62c7224d5b7
equal deleted inserted replaced
58446:5c83830390ba 58447:319173c62caa
  1027   }
  1027   }
  1028   return _dumptime_table->find_or_allocate_info_for(k);
  1028   return _dumptime_table->find_or_allocate_info_for(k);
  1029 }
  1029 }
  1030 
  1030 
  1031 void SystemDictionaryShared::set_shared_class_misc_info(InstanceKlass* k, ClassFileStream* cfs) {
  1031 void SystemDictionaryShared::set_shared_class_misc_info(InstanceKlass* k, ClassFileStream* cfs) {
  1032   assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "only when dumping");
  1032   Arguments::assert_is_dumping_archive();
  1033   assert(!is_builtin(k), "must be unregistered class");
  1033   assert(!is_builtin(k), "must be unregistered class");
  1034   DumpTimeSharedClassInfo* info = find_or_allocate_info_for(k);
  1034   DumpTimeSharedClassInfo* info = find_or_allocate_info_for(k);
  1035   info->_clsfile_size  = cfs->length();
  1035   info->_clsfile_size  = cfs->length();
  1036   info->_clsfile_crc32 = ClassLoader::crc32(0, (const char*)cfs->buffer(), cfs->length());
  1036   info->_clsfile_crc32 = ClassLoader::crc32(0, (const char*)cfs->buffer(), cfs->length());
  1037 }
  1037 }
  1183   _dumptime_table->update_counts();
  1183   _dumptime_table->update_counts();
  1184 }
  1184 }
  1185 
  1185 
  1186 bool SystemDictionaryShared::is_excluded_class(InstanceKlass* k) {
  1186 bool SystemDictionaryShared::is_excluded_class(InstanceKlass* k) {
  1187   assert(_no_class_loading_should_happen, "sanity");
  1187   assert(_no_class_loading_should_happen, "sanity");
  1188   assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "only when dumping");
  1188   Arguments::assert_is_dumping_archive();
  1189   return find_or_allocate_info_for(k)->is_excluded();
  1189   return find_or_allocate_info_for(k)->is_excluded();
  1190 }
  1190 }
  1191 
  1191 
  1192 class IterateDumpTimeSharedClassTable : StackObj {
  1192 class IterateDumpTimeSharedClassTable : StackObj {
  1193   MetaspaceClosure *_it;
  1193   MetaspaceClosure *_it;
  1207   _dumptime_table->iterate(&iter);
  1207   _dumptime_table->iterate(&iter);
  1208 }
  1208 }
  1209 
  1209 
  1210 bool SystemDictionaryShared::add_verification_constraint(InstanceKlass* k, Symbol* name,
  1210 bool SystemDictionaryShared::add_verification_constraint(InstanceKlass* k, Symbol* name,
  1211          Symbol* from_name, bool from_field_is_protected, bool from_is_array, bool from_is_object) {
  1211          Symbol* from_name, bool from_field_is_protected, bool from_is_array, bool from_is_object) {
  1212   assert(DumpSharedSpaces || DynamicDumpSharedSpaces, "called at dump time only");
  1212   Arguments::assert_is_dumping_archive();
  1213   DumpTimeSharedClassInfo* info = find_or_allocate_info_for(k);
  1213   DumpTimeSharedClassInfo* info = find_or_allocate_info_for(k);
  1214   info->add_verification_constraint(k, name, from_name, from_field_is_protected,
  1214   info->add_verification_constraint(k, name, from_name, from_field_is_protected,
  1215                                     from_is_array, from_is_object);
  1215                                     from_is_array, from_is_object);
  1216 
  1216 
  1217   if (DynamicDumpSharedSpaces) {
  1217   if (DynamicDumpSharedSpaces) {