< prev index next >

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

Print this page

        

*** 47,57 **** Stack<oop, mtGC> MarkSweep::_marking_stack; Stack<ObjArrayTask, mtGC> MarkSweep::_objarray_stack; Stack<oop, mtGC> MarkSweep::_preserved_oop_stack; ! Stack<markWord, mtGC> MarkSweep::_preserved_mark_stack; size_t MarkSweep::_preserved_count = 0; size_t MarkSweep::_preserved_count_max = 0; PreservedMark* MarkSweep::_preserved_marks = NULL; ReferenceProcessor* MarkSweep::_ref_processor = NULL; STWGCTimer* MarkSweep::_gc_timer = NULL; --- 47,57 ---- Stack<oop, mtGC> MarkSweep::_marking_stack; Stack<ObjArrayTask, mtGC> MarkSweep::_objarray_stack; Stack<oop, mtGC> MarkSweep::_preserved_oop_stack; ! Stack<markOop, mtGC> MarkSweep::_preserved_mark_stack; size_t MarkSweep::_preserved_count = 0; size_t MarkSweep::_preserved_count_max = 0; PreservedMark* MarkSweep::_preserved_marks = NULL; ReferenceProcessor* MarkSweep::_ref_processor = NULL; STWGCTimer* MarkSweep::_gc_timer = NULL;
*** 125,140 **** MarkSweep::FollowStackClosure MarkSweep::follow_stack_closure; void MarkSweep::FollowStackClosure::do_void() { follow_stack(); } template <class T> inline void MarkSweep::follow_root(T* p) { ! assert(!Universe::heap()->is_in(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_raw().is_marked()) { mark_object(obj); follow_object(obj); } } follow_stack(); --- 125,140 ---- MarkSweep::FollowStackClosure MarkSweep::follow_stack_closure; 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_raw()->is_marked()) { mark_object(obj); follow_object(obj); } } follow_stack();
*** 150,162 **** void PreservedMark::restore() { _obj->set_mark_raw(_mark); } // We preserve the mark which should be replaced at the end and the location ! // that it will go. Note that the object that this markWord belongs to isn't // currently at that address but it will be after phase4 ! void MarkSweep::preserve_mark(oop obj, markWord mark) { // We try to store preserved marks in the to space of the new generation since // this is storage which should be available. Most of the time this should be // sufficient space for the marks we need to preserve but if it isn't we fall // back to using Stacks to keep track of the overflow. if (_preserved_count < _preserved_count_max) { --- 150,162 ---- void PreservedMark::restore() { _obj->set_mark_raw(_mark); } // We preserve the mark which should be replaced at the end and the location ! // that it will go. Note that the object that this markOop belongs to isn't // currently at that address but it will be after phase4 ! void MarkSweep::preserve_mark(oop obj, markOop mark) { // We try to store preserved marks in the to space of the new generation since // this is storage which should be available. Most of the time this should be // sufficient space for the marks we need to preserve but if it isn't we fall // back to using Stacks to keep track of the overflow. if (_preserved_count < _preserved_count_max) {
*** 202,212 **** } // deal with the overflow while (!_preserved_oop_stack.is_empty()) { oop obj = _preserved_oop_stack.pop(); ! markWord mark = _preserved_mark_stack.pop(); obj->set_mark_raw(mark); } } MarkSweep::IsAliveClosure MarkSweep::is_alive; --- 202,212 ---- } // deal with the overflow while (!_preserved_oop_stack.is_empty()) { oop obj = _preserved_oop_stack.pop(); ! markOop mark = _preserved_mark_stack.pop(); obj->set_mark_raw(mark); } } MarkSweep::IsAliveClosure MarkSweep::is_alive;
< prev index next >