< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahClosures.inline.hpp

Print this page
*** 44,11 ***
    if (CompressedOops::is_null(obj)) {
      return false;
    }
    obj = ShenandoahBarrierSet::resolve_forwarded_not_null(obj);
    shenandoah_assert_not_forwarded_if(NULL, obj, ShenandoahHeap::heap()->is_concurrent_mark_in_progress());
!   return _mark_context->is_marked(obj);
  }
  
  ShenandoahIsAliveClosure::ShenandoahIsAliveClosure() :
    _mark_context(ShenandoahHeap::heap()->marking_context()) {
  }
--- 44,11 ---
    if (CompressedOops::is_null(obj)) {
      return false;
    }
    obj = ShenandoahBarrierSet::resolve_forwarded_not_null(obj);
    shenandoah_assert_not_forwarded_if(NULL, obj, ShenandoahHeap::heap()->is_concurrent_mark_in_progress());
!   return _mark_context->is_marked_or_old(obj);
  }
  
  ShenandoahIsAliveClosure::ShenandoahIsAliveClosure() :
    _mark_context(ShenandoahHeap::heap()->marking_context()) {
  }

*** 56,11 ***
  bool ShenandoahIsAliveClosure::do_object_b(oop obj) {
    if (CompressedOops::is_null(obj)) {
      return false;
    }
    shenandoah_assert_not_forwarded(NULL, obj);
!   return _mark_context->is_marked(obj);
  }
  
  BoolObjectClosure* ShenandoahIsAliveSelector::is_alive_closure() {
    return ShenandoahHeap::heap()->has_forwarded_objects() ?
           reinterpret_cast<BoolObjectClosure*>(&_fwd_alive_cl) :
--- 56,11 ---
  bool ShenandoahIsAliveClosure::do_object_b(oop obj) {
    if (CompressedOops::is_null(obj)) {
      return false;
    }
    shenandoah_assert_not_forwarded(NULL, obj);
!   return _mark_context->is_marked_or_old(obj);
  }
  
  BoolObjectClosure* ShenandoahIsAliveSelector::is_alive_closure() {
    return ShenandoahHeap::heap()->has_forwarded_objects() ?
           reinterpret_cast<BoolObjectClosure*>(&_fwd_alive_cl) :

*** 80,11 ***
  }
  
  template <typename T>
  void ShenandoahKeepAliveClosure::do_oop_work(T* p) {
    assert(ShenandoahHeap::heap()->is_concurrent_mark_in_progress(), "Only for concurrent marking phase");
!   assert(!ShenandoahHeap::heap()->has_forwarded_objects(), "Not expected");
  
    T o = RawAccess<>::oop_load(p);
    if (!CompressedOops::is_null(o)) {
      oop obj = CompressedOops::decode_not_null(o);
      _bs->enqueue(obj);
--- 80,11 ---
  }
  
  template <typename T>
  void ShenandoahKeepAliveClosure::do_oop_work(T* p) {
    assert(ShenandoahHeap::heap()->is_concurrent_mark_in_progress(), "Only for concurrent marking phase");
!   assert(ShenandoahHeap::heap()->is_concurrent_old_mark_in_progress() || !ShenandoahHeap::heap()->has_forwarded_objects(), "Not expected");
  
    T o = RawAccess<>::oop_load(p);
    if (!CompressedOops::is_null(o)) {
      oop obj = CompressedOops::decode_not_null(o);
      _bs->enqueue(obj);
< prev index next >