1313 for (size_t seg_idx = 0; seg_idx < segments.count(); seg_idx++) {
1314 address requested_start = ArchiveHeapWriter::buffered_addr_to_requested_addr(start);
1315 st.print_cr(PTR_FORMAT ": Heap roots segment [%d]",
1316 p2i(requested_start), segments.size_in_elems(seg_idx));
1317 start += segments.size_in_bytes(seg_idx);
1318 }
1319 log_heap_roots();
1320
1321 while (start < end) {
1322 size_t byte_size;
1323 oop source_oop = ArchiveHeapWriter::buffered_addr_to_source_obj(start);
1324 address requested_start = ArchiveHeapWriter::buffered_addr_to_requested_addr(start);
1325 st.print(PTR_FORMAT ": @@ Object ", p2i(requested_start));
1326
1327 if (source_oop != nullptr) {
1328 // This is a regular oop that got archived.
1329 // Don't print the requested addr again as we have just printed it at the beginning of the line.
1330 // Example:
1331 // 0x00000007ffd27938: @@ Object (0xfffa4f27) java.util.HashMap
1332 print_oop_info_cr(&st, source_oop, /*print_requested_addr=*/false);
1333 byte_size = source_oop->size() * BytesPerWord;
1334 } else if ((byte_size = ArchiveHeapWriter::get_filler_size_at(start)) > 0) {
1335 // We have a filler oop, which also does not exist in BufferOffsetToSourceObjectTable.
1336 // Example:
1337 // 0x00000007ffc3ffd8: @@ Object filler 40 bytes
1338 st.print_cr("filler %zu bytes", byte_size);
1339 } else {
1340 ShouldNotReachHere();
1341 }
1342
1343 address oop_end = start + byte_size;
1344 log_as_hex(start, oop_end, requested_start, /*is_heap=*/true);
1345
1346 if (source_oop != nullptr) {
1347 log_oop_details(heap_info, source_oop, /*buffered_addr=*/start);
1348 }
1349 start = oop_end;
1350 }
1351 }
1352
1353 // ArchivedFieldPrinter is used to print the fields of archived objects. We can't
|
1313 for (size_t seg_idx = 0; seg_idx < segments.count(); seg_idx++) {
1314 address requested_start = ArchiveHeapWriter::buffered_addr_to_requested_addr(start);
1315 st.print_cr(PTR_FORMAT ": Heap roots segment [%d]",
1316 p2i(requested_start), segments.size_in_elems(seg_idx));
1317 start += segments.size_in_bytes(seg_idx);
1318 }
1319 log_heap_roots();
1320
1321 while (start < end) {
1322 size_t byte_size;
1323 oop source_oop = ArchiveHeapWriter::buffered_addr_to_source_obj(start);
1324 address requested_start = ArchiveHeapWriter::buffered_addr_to_requested_addr(start);
1325 st.print(PTR_FORMAT ": @@ Object ", p2i(requested_start));
1326
1327 if (source_oop != nullptr) {
1328 // This is a regular oop that got archived.
1329 // Don't print the requested addr again as we have just printed it at the beginning of the line.
1330 // Example:
1331 // 0x00000007ffd27938: @@ Object (0xfffa4f27) java.util.HashMap
1332 print_oop_info_cr(&st, source_oop, /*print_requested_addr=*/false);
1333 size_t old_size = source_oop->size();
1334 size_t new_size = source_oop->copy_size_cds(old_size, source_oop->mark());
1335 byte_size = new_size * BytesPerWord;
1336 } else if ((byte_size = ArchiveHeapWriter::get_filler_size_at(start)) > 0) {
1337 // We have a filler oop, which also does not exist in BufferOffsetToSourceObjectTable.
1338 // Example:
1339 // 0x00000007ffc3ffd8: @@ Object filler 40 bytes
1340 st.print_cr("filler %zu bytes", byte_size);
1341 } else {
1342 ShouldNotReachHere();
1343 }
1344
1345 address oop_end = start + byte_size;
1346 log_as_hex(start, oop_end, requested_start, /*is_heap=*/true);
1347
1348 if (source_oop != nullptr) {
1349 log_oop_details(heap_info, source_oop, /*buffered_addr=*/start);
1350 }
1351 start = oop_end;
1352 }
1353 }
1354
1355 // ArchivedFieldPrinter is used to print the fields of archived objects. We can't
|