< prev index next >

src/hotspot/share/classfile/stringTable.cpp

Print this page

915 
916       assert(secondary != nullptr && secondary->is_objArray(), "must be");
917       assert(secondary_index < secondary->length(), "no strings should have been added");
918       secondary->obj_at_put(secondary_index, string);
919     }
920 
921     index ++;
922   };
923   dumped_interned_strings->iterate_all(copy_into_array);
924 
925   writer.dump(&_shared_table, "string");
926 
927   return array;
928 }
929 
930 void StringTable::set_shared_strings_array_index(int root_index) {
931   _shared_strings_array_root_index = root_index;
932 }
933 
934 void StringTable::serialize_shared_table_header(SerializeClosure* soc) {






935   _shared_table.serialize_header(soc);
936 
937   if (soc->writing()) {
938     // Sanity. Make sure we don't use the shared table at dump time
939     _shared_table.reset();
940   } else if (!ArchiveHeapLoader::is_in_use()) {
941     _shared_table.reset();
942   }
943 
944   soc->do_bool(&_is_two_dimensional_shared_strings_array);
945   soc->do_int(&_shared_strings_array_root_index);
946 }
947 #endif //INCLUDE_CDS_JAVA_HEAP

915 
916       assert(secondary != nullptr && secondary->is_objArray(), "must be");
917       assert(secondary_index < secondary->length(), "no strings should have been added");
918       secondary->obj_at_put(secondary_index, string);
919     }
920 
921     index ++;
922   };
923   dumped_interned_strings->iterate_all(copy_into_array);
924 
925   writer.dump(&_shared_table, "string");
926 
927   return array;
928 }
929 
930 void StringTable::set_shared_strings_array_index(int root_index) {
931   _shared_strings_array_root_index = root_index;
932 }
933 
934 void StringTable::serialize_shared_table_header(SerializeClosure* soc) {
935   if (soc->writing() && !HeapShared::can_write()) {
936     _shared_table.reset();
937     _is_two_dimensional_shared_strings_array = false;
938     _shared_strings_array_root_index = -1;
939   }
940 
941   _shared_table.serialize_header(soc);
942 
943   if (soc->writing()) {
944     // Sanity. Make sure we don't use the shared table at dump time
945     _shared_table.reset();
946   } else if (!ArchiveHeapLoader::is_in_use()) {
947     _shared_table.reset();
948   }
949 
950   soc->do_bool(&_is_two_dimensional_shared_strings_array);
951   soc->do_int(&_shared_strings_array_root_index);
952 }
953 #endif //INCLUDE_CDS_JAVA_HEAP
< prev index next >