@@ -92,7 +92,7 @@ void ArchiveBuilder::SourceObjList::remember_embedded_pointer(SourceObjInfo* src
9292 // To mark the f->ptr pointer on 64-bit platform, this function is called with
9393 // src_info()->obj() == 0x100
9494 // ref->addr() == 0x108
95- address src_obj = src_info->obj ();
95+ address src_obj = src_info->source_addr ();
9696 address* field_addr = ref->addr ();
9797 assert (src_info->ptrmap_start () < _total_bytes, " sanity" );
9898 assert (src_info->ptrmap_end () <= _total_bytes, " sanity" );
@@ -176,8 +176,6 @@ ArchiveBuilder::~ArchiveBuilder() {
176176 assert (_current == this , " must be" );
177177 _current = nullptr ;
178178
179- clean_up_src_obj_table ();
180-
181179 for (int i = 0 ; i < _symbols->length (); i++) {
182180 _symbols->at (i)->decrement_refcount ();
183181 }
@@ -427,7 +425,6 @@ bool ArchiveBuilder::gather_one_source_obj(MetaspaceClosure::Ref* enclosing_ref,
427425 if (src_obj == nullptr ) {
428426 return false ;
429427 }
430- ref->set_keep_after_pushing ();
431428 remember_embedded_pointer_in_gathered_obj (enclosing_ref, ref);
432429
433430 FollowMode follow_mode = get_follow_mode (ref);
@@ -589,15 +586,14 @@ void ArchiveBuilder::make_shallow_copies(DumpRegion *dump_region,
589586}
590587
591588void ArchiveBuilder::make_shallow_copy (DumpRegion *dump_region, SourceObjInfo* src_info) {
592- MetaspaceClosure::Ref* ref = src_info->ref ();
593- address src = ref->obj ();
589+ address src = src_info->source_addr ();
594590 int bytes = src_info->size_in_bytes ();
595591 char * dest;
596592 char * oldtop;
597593 char * newtop;
598594
599595 oldtop = dump_region->top ();
600- if (ref ->msotype () == MetaspaceObj::ClassType) {
596+ if (src_info ->msotype () == MetaspaceObj::ClassType) {
601597 // Save a pointer immediate in front of an InstanceKlass, so
602598 // we can do a quick lookup from InstanceKlass* -> RunTimeClassInfo*
603599 // without building another hashtable. See RunTimeClassInfo::get_for()
@@ -621,7 +617,7 @@ void ArchiveBuilder::make_shallow_copy(DumpRegion *dump_region, SourceObjInfo* s
621617 }
622618 }
623619
624- intptr_t * archived_vtable = CppVtables::get_archived_vtable (ref ->msotype (), (address)dest);
620+ intptr_t * archived_vtable = CppVtables::get_archived_vtable (src_info ->msotype (), (address)dest);
625621 if (archived_vtable != nullptr ) {
626622 *(address*)dest = (address)archived_vtable;
627623 ArchivePtrMarker::mark_pointer ((address*)dest);
@@ -630,7 +626,7 @@ void ArchiveBuilder::make_shallow_copy(DumpRegion *dump_region, SourceObjInfo* s
630626 log_trace (cds)(" Copy: " PTR_FORMAT " ==> " PTR_FORMAT " %d" , p2i (src), p2i (dest), bytes);
631627 src_info->set_buffered_addr ((address)dest);
632628
633- _alloc_stats.record (ref ->msotype (), int (newtop - oldtop), src_info->read_only ());
629+ _alloc_stats.record (src_info ->msotype (), int (newtop - oldtop), src_info->read_only ());
634630}
635631
636632// This is used by code that hand-assemble data structures, such as the LambdaProxyClassKey, that are
@@ -1097,11 +1093,6 @@ void ArchiveBuilder::print_stats() {
10971093 _alloc_stats.print_stats (int (_ro_region.used ()), int (_rw_region.used ()));
10981094}
10991095
1100- void ArchiveBuilder::clean_up_src_obj_table () {
1101- SrcObjTableCleaner cleaner;
1102- _src_obj_table.iterate(&cleaner);
1103- }
1104-
11051096void ArchiveBuilder::write_archive (FileMapInfo* mapinfo, ArchiveHeapInfo* heap_info) {
11061097 // Make sure NUM_CDS_REGIONS (exported in cds.h) agrees with
11071098 // MetaspaceShared::n_regions (internal to hotspot).
0 commit comments