< prev index next >
src/hotspot/share/classfile/javaClasses.cpp
Print this page
@@ -1253,21 +1253,21 @@
}
}
}
void java_lang_Class::update_archived_mirror_native_pointers(oop archived_mirror) {
- if (MetaspaceShared::relocation_delta() != 0) {
+ assert(MetaspaceShared::relocation_delta() != 0, "must be");
+
Klass* k = ((Klass*)archived_mirror->metadata_field(_klass_offset));
archived_mirror->metadata_field_put(_klass_offset,
(Klass*)(address(k) + MetaspaceShared::relocation_delta()));
Klass* ak = ((Klass*)archived_mirror->metadata_field(_array_klass_offset));
if (ak != NULL) {
archived_mirror->metadata_field_put(_array_klass_offset,
(Klass*)(address(ak) + MetaspaceShared::relocation_delta()));
}
- }
}
// Returns true if the mirror is updated, false if no archived mirror
// data is present. After the archived mirror object is restored, the
@@ -1289,11 +1289,10 @@
}
// mirror is archived, restore
log_debug(cds, mirror)("Archived mirror is: " PTR_FORMAT, p2i(m));
assert(HeapShared::is_archived_object(m), "must be archived mirror object");
- update_archived_mirror_native_pointers(m);
assert(as_Klass(m) == k, "must be");
Handle mirror(THREAD, m);
if (!k->is_array_klass()) {
// - local static final fields with initial values were initialized at dump time
< prev index next >