< prev index next >

src/hotspot/share/gc/parallel/psPromotionManager.cpp

Print this page

        

*** 36,46 **** --- 36,48 ---- #include "logging/logStream.hpp" #include "memory/allocation.inline.hpp" #include "memory/memRegion.hpp" #include "memory/padded.inline.hpp" #include "memory/resourceArea.hpp" + #include "oops/access.inline.hpp" #include "oops/arrayOop.inline.hpp" + #include "oops/compressedOops.inline.hpp" #include "oops/instanceKlass.inline.hpp" #include "oops/instanceMirrorKlass.inline.hpp" #include "oops/objArrayKlass.inline.hpp" #include "oops/objArrayOop.inline.hpp" #include "oops/oop.inline.hpp"
*** 449,460 **** } } // Treat discovered as normal oop, if ref is not "active", // i.e. if next is non-NULL. T* next_addr = (T*)java_lang_ref_Reference::next_addr_raw(obj); ! T next_oop = oopDesc::load_heap_oop(next_addr); ! if (!oopDesc::is_null(next_oop)) { // i.e. ref is not "active" T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr_raw(obj); log_develop_trace(gc, ref)(" Process discovered as normal " PTR_FORMAT, p2i(discovered_addr)); if (PSScavenge::should_scavenge(discovered_addr)) { pm->claim_or_forward_depth(discovered_addr); } --- 451,462 ---- } } // Treat discovered as normal oop, if ref is not "active", // i.e. if next is non-NULL. T* next_addr = (T*)java_lang_ref_Reference::next_addr_raw(obj); ! T next_oop = RawAccess<>::oop_load(next_addr); ! if (!CompressedOops::is_null(next_oop)) { // i.e. ref is not "active" T* discovered_addr = (T*)java_lang_ref_Reference::discovered_addr_raw(obj); log_develop_trace(gc, ref)(" Process discovered as normal " PTR_FORMAT, p2i(discovered_addr)); if (PSScavenge::should_scavenge(discovered_addr)) { pm->claim_or_forward_depth(discovered_addr); }
< prev index next >