Skip to content

Commit 70e7861

Browse files
committed
8370248: AOTMapLogger should check if pointer is in AOTMetaspace
Reviewed-by: kvn, adinn
1 parent 94c0611 commit 70e7861

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/hotspot/share/cds/aotMapLogger.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,14 @@ class AOTMapLogger::RuntimeGatherArchivedMetaspaceObjs : public UniqueMetaspaceC
135135

136136
virtual bool do_unique_ref(Ref* ref, bool read_only) {
137137
ArchivedObjInfo info;
138-
info._src_addr = ref->obj();
139-
info._buffered_addr = ref->obj();
140-
info._requested_addr = ref->obj();
141-
info._bytes = ref->size() * BytesPerWord;
142-
info._type = ref->msotype();
143-
_objs.append(info);
138+
if (AOTMetaspace::in_aot_cache(ref->obj())) {
139+
info._src_addr = ref->obj();
140+
info._buffered_addr = ref->obj();
141+
info._requested_addr = ref->obj();
142+
info._bytes = ref->size() * BytesPerWord;
143+
info._type = ref->msotype();
144+
_objs.append(info);
145+
}
144146

145147
return true; // keep iterating
146148
}

0 commit comments

Comments
 (0)