< prev index next >

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

Print this page

        

*** 44,53 **** --- 44,64 ---- #include "runtime/prefetch.inline.hpp" #include "runtime/thread.hpp" #include "utilities/copy.hpp" #include "utilities/globalDefinitions.hpp" + template <class T> + void ShenandoahUpdateRefsClosure::do_oop_work(T* p) { + T o = RawAccess<>::oop_load(p); + if (!CompressedOops::is_null(o)) { + oop obj = CompressedOops::decode_not_null(o); + _heap->update_with_forwarded_not_null(p, obj); + } + } + + void ShenandoahUpdateRefsClosure::do_oop(oop* p) { do_oop_work(p); } + void ShenandoahUpdateRefsClosure::do_oop(narrowOop* p) { do_oop_work(p); } inline ShenandoahHeapRegion* ShenandoahRegionIterator::next() { size_t new_index = Atomic::add((size_t) 1, &_index); // get_region() provides the bounds-check and returns NULL on OOB. return _heap->get_region(new_index - 1);
< prev index next >