< prev index next >

src/hotspot/share/gc/serial/defNewGeneration.cpp

Print this page
*** 674,11 ***
--- 674,22 ---
    // of objs in young-gen so that no objs are marked (forwarded) when Full GC
    // starts. (The mark word is overloaded: `is_marked()` == `is_forwarded()`.)
    struct ResetForwardedMarkWord : ObjectClosure {
      void do_object(oop obj) override {
        if (obj->is_forwarded()) {
+ #ifdef _LP64
+         oop forwardee = obj->forwardee();
+         markWord header = forwardee->mark();
+         if (header.has_displaced_mark_helper()) {
+           header = header.displaced_mark_helper();
+         }
+         assert(UseCompressedClassPointers, "assume +UseCompressedClassPointers");
+         narrowKlass nklass = header.narrow_klass();
+         obj->set_mark(markWord::prototype().set_narrow_klass(nklass));
+ #else
          obj->init_mark();
+ #endif
        }
      }
    } cl;
    eden()->object_iterate(&cl);
    from()->object_iterate(&cl);

*** 695,11 ***
  
    _promotion_failed = true;
    _promotion_failed_info.register_copy_failure(old->size());
    _preserved_marks_set.get()->push_if_necessary(old, old->mark());
    // forward to self
!   old->forward_to(old);
  
    _promo_failure_scan_stack.push(old);
  
    if (!_promo_failure_drain_in_progress) {
      // prevent recursion in copy_to_survivor_space()
--- 706,11 ---
  
    _promotion_failed = true;
    _promotion_failed_info.register_copy_failure(old->size());
    _preserved_marks_set.get()->push_if_necessary(old, old->mark());
    // forward to self
!   old->forward_to_self();
  
    _promo_failure_scan_stack.push(old);
  
    if (!_promo_failure_drain_in_progress) {
      // prevent recursion in copy_to_survivor_space()
< prev index next >