1235 for (size_t seg_idx = 0; seg_idx < segments.count(); seg_idx++) {
1236 address requested_start = ArchiveHeapWriter::buffered_addr_to_requested_addr(start);
1237 st.print_cr(PTR_FORMAT ": Heap roots segment [%d]",
1238 p2i(requested_start), segments.size_in_elems(seg_idx));
1239 start += segments.size_in_bytes(seg_idx);
1240 }
1241 log_heap_roots();
1242
1243 while (start < end) {
1244 size_t byte_size;
1245 oop source_oop = ArchiveHeapWriter::buffered_addr_to_source_obj(start);
1246 address requested_start = ArchiveHeapWriter::buffered_addr_to_requested_addr(start);
1247 st.print(PTR_FORMAT ": @@ Object ", p2i(requested_start));
1248
1249 if (source_oop != nullptr) {
1250 // This is a regular oop that got archived.
1251 // Don't print the requested addr again as we have just printed it at the beginning of the line.
1252 // Example:
1253 // 0x00000007ffd27938: @@ Object (0xfffa4f27) java.util.HashMap
1254 print_oop_info_cr(&st, source_oop, /*print_requested_addr=*/false);
1255 byte_size = source_oop->size() * BytesPerWord;
1256 } else if ((byte_size = ArchiveHeapWriter::get_filler_size_at(start)) > 0) {
1257 // We have a filler oop, which also does not exist in BufferOffsetToSourceObjectTable.
1258 // Example:
1259 // 0x00000007ffc3ffd8: @@ Object filler 40 bytes
1260 st.print_cr("filler %zu bytes", byte_size);
1261 } else {
1262 ShouldNotReachHere();
1263 }
1264
1265 address oop_end = start + byte_size;
1266 log_as_hex(start, oop_end, requested_start, /*is_heap=*/true);
1267
1268 if (source_oop != nullptr) {
1269 log_oop_details(heap_info, source_oop, /*buffered_addr=*/start);
1270 }
1271 start = oop_end;
1272 }
1273 }
1274
1275 // ArchivedFieldPrinter is used to print the fields of archived objects. We can't
|
1235 for (size_t seg_idx = 0; seg_idx < segments.count(); seg_idx++) {
1236 address requested_start = ArchiveHeapWriter::buffered_addr_to_requested_addr(start);
1237 st.print_cr(PTR_FORMAT ": Heap roots segment [%d]",
1238 p2i(requested_start), segments.size_in_elems(seg_idx));
1239 start += segments.size_in_bytes(seg_idx);
1240 }
1241 log_heap_roots();
1242
1243 while (start < end) {
1244 size_t byte_size;
1245 oop source_oop = ArchiveHeapWriter::buffered_addr_to_source_obj(start);
1246 address requested_start = ArchiveHeapWriter::buffered_addr_to_requested_addr(start);
1247 st.print(PTR_FORMAT ": @@ Object ", p2i(requested_start));
1248
1249 if (source_oop != nullptr) {
1250 // This is a regular oop that got archived.
1251 // Don't print the requested addr again as we have just printed it at the beginning of the line.
1252 // Example:
1253 // 0x00000007ffd27938: @@ Object (0xfffa4f27) java.util.HashMap
1254 print_oop_info_cr(&st, source_oop, /*print_requested_addr=*/false);
1255 size_t old_size = source_oop->size();
1256 size_t new_size = source_oop->copy_size_cds(old_size, source_oop->mark());
1257 byte_size = new_size * BytesPerWord;
1258 } else if ((byte_size = ArchiveHeapWriter::get_filler_size_at(start)) > 0) {
1259 // We have a filler oop, which also does not exist in BufferOffsetToSourceObjectTable.
1260 // Example:
1261 // 0x00000007ffc3ffd8: @@ Object filler 40 bytes
1262 st.print_cr("filler %zu bytes", byte_size);
1263 } else {
1264 ShouldNotReachHere();
1265 }
1266
1267 address oop_end = start + byte_size;
1268 log_as_hex(start, oop_end, requested_start, /*is_heap=*/true);
1269
1270 if (source_oop != nullptr) {
1271 log_oop_details(heap_info, source_oop, /*buffered_addr=*/start);
1272 }
1273 start = oop_end;
1274 }
1275 }
1276
1277 // ArchivedFieldPrinter is used to print the fields of archived objects. We can't
|