< prev index next >

src/share/vm/classfile/stringTable.cpp

Print this page

@@ -741,12 +741,11 @@
   assert(string_space->length() <= 2, "sanity");
 #endif
   return true;
 }
 
-void StringTable::write_to_archive(GrowableArray<MemRegion> *string_space,
-                                   size_t* space_size) {
+void StringTable::write_to_archive(GrowableArray<MemRegion> *string_space) {
 #if INCLUDE_CDS
   _shared_table.reset();
   if (!(UseG1GC && UseCompressedOops && UseCompressedClassPointers)) {
       log_info(cds)(
         "Shared strings are excluded from the archive as UseG1GC, "

@@ -761,13 +760,10 @@
     CompactStringTableWriter writer(num_buckets > 1 ? num_buckets : 1,
                                     &MetaspaceShared::stats()->string);
 
     // Copy the interned strings into the "string space" within the java heap
     if (copy_shared_string(string_space, &writer)) {
-      for (int i = 0; i < string_space->length(); i++) {
-        *space_size += string_space->at(i).byte_size();
-      }
       writer.dump(&_shared_table);
     }
   }
 #endif
 }
< prev index next >