< prev index next >

src/share/vm/gc_implementation/shared/markSweep.inline.hpp

Print this page

        

*** 26,40 **** #define SHARE_VM_GC_IMPLEMENTATION_SHARED_MARKSWEEP_INLINE_HPP #include "gc_implementation/shared/markSweep.hpp" #include "gc_interface/collectedHeap.hpp" #include "oops/markOop.inline.hpp" #include "utilities/stack.inline.hpp" #include "utilities/macros.hpp" #if INCLUDE_ALL_GCS #include "gc_implementation/g1/g1StringDedup.hpp" - #include "gc_implementation/parallelScavenge/psParallelCompact.hpp" #endif // INCLUDE_ALL_GCS inline void MarkSweep::mark_object(oop obj) { #if INCLUDE_ALL_GCS if (G1StringDedup::is_enabled()) { --- 26,44 ---- #define SHARE_VM_GC_IMPLEMENTATION_SHARED_MARKSWEEP_INLINE_HPP #include "gc_implementation/shared/markSweep.hpp" #include "gc_interface/collectedHeap.hpp" #include "oops/markOop.inline.hpp" + #include "oops/instanceKlass.inline.hpp" + #include "oops/instanceClassLoaderKlass.inline.hpp" + #include "oops/instanceMirrorKlass.inline.hpp" + #include "oops/instanceRefKlass.inline.hpp" + #include "oops/objArrayKlass.inline.hpp" #include "utilities/stack.inline.hpp" #include "utilities/macros.hpp" #if INCLUDE_ALL_GCS #include "gc_implementation/g1/g1StringDedup.hpp" #endif // INCLUDE_ALL_GCS inline void MarkSweep::mark_object(oop obj) { #if INCLUDE_ALL_GCS if (G1StringDedup::is_enabled()) {
*** 57,67 **** oop op = klass->klass_holder(); MarkSweep::mark_and_push(&op); } inline void MarkSweep::follow_object(oop obj) { ! obj->follow_contents(); } 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"); --- 61,73 ---- oop op = klass->klass_holder(); MarkSweep::mark_and_push(&op); } inline void MarkSweep::follow_object(oop obj) { ! assert(obj->is_gc_marked(), "should be marked"); ! ! obj->ms_follow_contents(); } 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");
*** 93,109 **** assert(task.is_valid(), "bad ObjArrayTask"); _objarray_stack.push(task); } inline int MarkSweep::adjust_pointers(oop obj) { ! return obj->adjust_pointers(); } template <class T> inline void MarkSweep::adjust_pointer(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); oop new_obj = oop(obj->mark()->decode_pointer()); assert(new_obj != NULL || // is forwarding ptr? obj->mark() == markOopDesc::prototype() || // not gc marked? (UseBiasedLocking && obj->mark()->has_bias_pattern()), // not gc marked? --- 99,117 ---- assert(task.is_valid(), "bad ObjArrayTask"); _objarray_stack.push(task); } inline int MarkSweep::adjust_pointers(oop obj) { ! return obj->ms_adjust_pointers(); } template <class T> inline void MarkSweep::adjust_pointer(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); + assert(Universe::heap()->is_in(obj), "should be in heap"); + oop new_obj = oop(obj->mark()->decode_pointer()); assert(new_obj != NULL || // is forwarding ptr? obj->mark() == markOopDesc::prototype() || // not gc marked? (UseBiasedLocking && obj->mark()->has_bias_pattern()), // not gc marked?
< prev index next >