< prev index next >

src/hotspot/share/cds/archiveHeapWriter.cpp

Print this page
*** 585,14 ***
    if (src_obj == nullptr) {
      return;
    }
    // We need to retain the identity_hash, because it may have been used by some hashtables
    // in the shared heap.
!   if (!src_obj->fast_no_hash_check()) {
      intptr_t src_hash = src_obj->identity_hash();
      if (UseCompactObjectHeaders) {
        fake_oop->set_mark(markWord::prototype().set_narrow_klass(nk).copy_set_hash(src_hash));
      } else {
        fake_oop->set_mark(markWord::prototype().copy_set_hash(src_hash));
      }
      assert(fake_oop->mark().is_unlocked(), "sanity");
  
--- 585,16 ---
    if (src_obj == nullptr) {
      return;
    }
    // We need to retain the identity_hash, because it may have been used by some hashtables
    // in the shared heap.
!   if (!src_obj->fast_no_hash_check() && (!(EnableValhalla && src_obj->mark().is_inline_type()))) {
      intptr_t src_hash = src_obj->identity_hash();
      if (UseCompactObjectHeaders) {
        fake_oop->set_mark(markWord::prototype().set_narrow_klass(nk).copy_set_hash(src_hash));
+     } else if (EnableValhalla) {
+       fake_oop->set_mark(src_klass->prototype_header().copy_set_hash(src_hash));
      } else {
        fake_oop->set_mark(markWord::prototype().copy_set_hash(src_hash));
      }
      assert(fake_oop->mark().is_unlocked(), "sanity");
  
< prev index next >