< prev index next >

src/hotspot/share/cds/archiveBuilder.cpp

Print this page
*** 1296,11 ***
          // This is a regular oop that got archived.
          // Don't print the requested addr again as we have just printed it at the beginning of the line.
          // Example:
          // 0x00000007ffd27938: @@ Object (0xfffa4f27) java.util.HashMap
          print_oop_info_cr(&st, source_oop, /*print_requested_addr=*/false);
!         byte_size = source_oop->size() * BytesPerWord;
        } else if ((byte_size = ArchiveHeapWriter::get_filler_size_at(start)) > 0) {
          // We have a filler oop, which also does not exist in BufferOffsetToSourceObjectTable.
          // Example:
          // 0x00000007ffc3ffd8: @@ Object filler 40 bytes
          st.print_cr("filler " SIZE_FORMAT " bytes", byte_size);
--- 1296,13 ---
          // This is a regular oop that got archived.
          // Don't print the requested addr again as we have just printed it at the beginning of the line.
          // Example:
          // 0x00000007ffd27938: @@ Object (0xfffa4f27) java.util.HashMap
          print_oop_info_cr(&st, source_oop, /*print_requested_addr=*/false);
!         size_t old_size = source_oop->size();
+         size_t new_size = source_oop->copy_size_cds(old_size, source_oop->mark());
+         byte_size = new_size * BytesPerWord;
        } else if ((byte_size = ArchiveHeapWriter::get_filler_size_at(start)) > 0) {
          // We have a filler oop, which also does not exist in BufferOffsetToSourceObjectTable.
          // Example:
          // 0x00000007ffc3ffd8: @@ Object filler 40 bytes
          st.print_cr("filler " SIZE_FORMAT " bytes", byte_size);
< prev index next >