< prev index next >

src/hotspot/share/cds/archiveHeapWriter.cpp

Print this page
*** 561,13 ***
    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();
!     fake_oop->set_mark(markWord::prototype().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);
    }
--- 561,13 ---
    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();
!     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 >