< prev index next >

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

Print this page

        

*** 28,37 **** --- 28,39 ---- #include "gc/shared/collectedHeap.inline.hpp" #include "gc/shared/gcTimer.hpp" #include "gc/shared/gcTrace.hpp" #include "gc/shared/specialized_oop_closures.hpp" #include "memory/iterator.inline.hpp" + #include "oops/access.inline.hpp" + #include "oops/compressedOops.inline.hpp" #include "oops/instanceClassLoaderKlass.inline.hpp" #include "oops/instanceKlass.inline.hpp" #include "oops/instanceMirrorKlass.inline.hpp" #include "oops/instanceRefKlass.inline.hpp" #include "oops/methodData.hpp"
*** 71,83 **** preserve_mark(obj, mark); } } template <class T> inline void MarkSweep::mark_and_push(T* p) { ! T heap_oop = oopDesc::load_heap_oop(p); ! if (!oopDesc::is_null(heap_oop)) { ! oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); if (!obj->mark()->is_marked()) { mark_object(obj); _marking_stack.push(obj); } } --- 73,85 ---- preserve_mark(obj, mark); } } template <class T> inline void MarkSweep::mark_and_push(T* p) { ! T heap_oop = RawAccess<>::oop_load(p); ! if (!CompressedOops::is_null(heap_oop)) { ! oop obj = CompressedOops::decode_not_null(heap_oop); if (!obj->mark()->is_marked()) { mark_object(obj); _marking_stack.push(obj); } }
*** 167,179 **** void MarkSweep::FollowStackClosure::do_void() { follow_stack(); } template <class T> inline void MarkSweep::follow_root(T* p) { assert(!Universe::heap()->is_in_reserved(p), "roots shouldn't be things within the heap"); ! T heap_oop = oopDesc::load_heap_oop(p); ! if (!oopDesc::is_null(heap_oop)) { ! oop obj = oopDesc::decode_heap_oop_not_null(heap_oop); if (!obj->mark()->is_marked()) { mark_object(obj); follow_object(obj); } } --- 169,181 ---- void MarkSweep::FollowStackClosure::do_void() { follow_stack(); } template <class T> inline void MarkSweep::follow_root(T* p) { assert(!Universe::heap()->is_in_reserved(p), "roots shouldn't be things within the heap"); ! T heap_oop = RawAccess<>::oop_load(p); ! if (!CompressedOops::is_null(heap_oop)) { ! oop obj = CompressedOops::decode_not_null(heap_oop); if (!obj->mark()->is_marked()) { mark_object(obj); follow_object(obj); } }
< prev index next >