1260 for (size_t seg_idx = 0; seg_idx < segments.count(); seg_idx++) {
1261 address requested_start = ArchiveHeapWriter::buffered_addr_to_requested_addr(start);
1262 st.print_cr(PTR_FORMAT ": Heap roots segment [%d]",
1263 p2i(requested_start), segments.size_in_elems(seg_idx));
1264 start += segments.size_in_bytes(seg_idx);
1265 }
1266 log_heap_roots();
1267
1268 while (start < end) {
1269 size_t byte_size;
1270 oop source_oop = ArchiveHeapWriter::buffered_addr_to_source_obj(start);
1271 address requested_start = ArchiveHeapWriter::buffered_addr_to_requested_addr(start);
1272 st.print(PTR_FORMAT ": @@ Object ", p2i(requested_start));
1273
1274 if (source_oop != nullptr) {
1275 // This is a regular oop that got archived.
1276 // Don't print the requested addr again as we have just printed it at the beginning of the line.
1277 // Example:
1278 // 0x00000007ffd27938: @@ Object (0xfffa4f27) java.util.HashMap
1279 print_oop_info_cr(&st, source_oop, /*print_requested_addr=*/false);
1280 byte_size = source_oop->size() * BytesPerWord;
1281 } else if ((byte_size = ArchiveHeapWriter::get_filler_size_at(start)) > 0) {
1282 // We have a filler oop, which also does not exist in BufferOffsetToSourceObjectTable.
1283 // Example:
1284 // 0x00000007ffc3ffd8: @@ Object filler 40 bytes
1285 st.print_cr("filler %zu bytes", byte_size);
1286 } else {
1287 ShouldNotReachHere();
1288 }
1289
1290 address oop_end = start + byte_size;
1291 log_as_hex(start, oop_end, requested_start, /*is_heap=*/true);
1292
1293 if (source_oop != nullptr) {
1294 log_oop_details(heap_info, source_oop, /*buffered_addr=*/start);
1295 }
1296 start = oop_end;
1297 }
1298 }
1299
1300 // ArchivedFieldPrinter is used to print the fields of archived objects. We can't
|
1260 for (size_t seg_idx = 0; seg_idx < segments.count(); seg_idx++) {
1261 address requested_start = ArchiveHeapWriter::buffered_addr_to_requested_addr(start);
1262 st.print_cr(PTR_FORMAT ": Heap roots segment [%d]",
1263 p2i(requested_start), segments.size_in_elems(seg_idx));
1264 start += segments.size_in_bytes(seg_idx);
1265 }
1266 log_heap_roots();
1267
1268 while (start < end) {
1269 size_t byte_size;
1270 oop source_oop = ArchiveHeapWriter::buffered_addr_to_source_obj(start);
1271 address requested_start = ArchiveHeapWriter::buffered_addr_to_requested_addr(start);
1272 st.print(PTR_FORMAT ": @@ Object ", p2i(requested_start));
1273
1274 if (source_oop != nullptr) {
1275 // This is a regular oop that got archived.
1276 // Don't print the requested addr again as we have just printed it at the beginning of the line.
1277 // Example:
1278 // 0x00000007ffd27938: @@ Object (0xfffa4f27) java.util.HashMap
1279 print_oop_info_cr(&st, source_oop, /*print_requested_addr=*/false);
1280 size_t old_size = source_oop->size();
1281 size_t new_size = source_oop->copy_size_cds(old_size, source_oop->mark());
1282 byte_size = new_size * BytesPerWord;
1283 } else if ((byte_size = ArchiveHeapWriter::get_filler_size_at(start)) > 0) {
1284 // We have a filler oop, which also does not exist in BufferOffsetToSourceObjectTable.
1285 // Example:
1286 // 0x00000007ffc3ffd8: @@ Object filler 40 bytes
1287 st.print_cr("filler %zu bytes", byte_size);
1288 } else {
1289 ShouldNotReachHere();
1290 }
1291
1292 address oop_end = start + byte_size;
1293 log_as_hex(start, oop_end, requested_start, /*is_heap=*/true);
1294
1295 if (source_oop != nullptr) {
1296 log_oop_details(heap_info, source_oop, /*buffered_addr=*/start);
1297 }
1298 start = oop_end;
1299 }
1300 }
1301
1302 // ArchivedFieldPrinter is used to print the fields of archived objects. We can't
|