< prev index next >

src/hotspot/share/cds/archiveHeapWriter.cpp

Print this page
@@ -475,13 +475,13 @@
  
    // We need to retain the identity_hash, because it may have been used by some hashtables
    // in the shared heap. This also has the side effect of pre-initializing the
    // identity_hash for all shared objects, so they are less likely to be written
    // into during run time, increasing the potential of memory sharing.
-   if (src_obj != nullptr) {
+   if (src_obj != nullptr && (!(EnableValhalla && src_obj->mark().is_inline_type()))) {
      intptr_t src_hash = src_obj->identity_hash();
-     fake_oop->set_mark(markWord::prototype().copy_set_hash(src_hash));
+     fake_oop->set_mark(src_klass->prototype_header().copy_set_hash(src_hash));
      assert(fake_oop->mark().is_unlocked(), "sanity");
  
      DEBUG_ONLY(intptr_t archived_hash = fake_oop->identity_hash());
      assert(src_hash == archived_hash, "Different hash codes: original " INTPTR_FORMAT ", archived " INTPTR_FORMAT, src_hash, archived_hash);
    }
< prev index next >