src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Fri Feb  1 15:46:02 2013
--- new/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Fri Feb  1 15:46:02 2013

*** 35,44 **** --- 35,45 ---- #include "gc_implementation/g1/g1EvacFailure.hpp" #include "gc_implementation/g1/g1GCPhaseTimes.hpp" #include "gc_implementation/g1/g1Log.hpp" #include "gc_implementation/g1/g1MarkSweep.hpp" #include "gc_implementation/g1/g1OopClosures.inline.hpp" + #include "gc_implementation/g1/g1PreserveMarkQueue.hpp" #include "gc_implementation/g1/g1RemSet.inline.hpp" #include "gc_implementation/g1/heapRegion.inline.hpp" #include "gc_implementation/g1/heapRegionRemSet.hpp" #include "gc_implementation/g1/heapRegionSeq.inline.hpp" #include "gc_implementation/g1/vm_operations_g1.hpp"
*** 1891,1901 **** --- 1892,1902 ---- _is_alive_closure_stw(this), _ref_processor_cm(NULL), _ref_processor_stw(NULL), _process_strong_tasks(new SubTasksDone(G1H_PS_NumElements)), _bot_shared(NULL), ! _objs_with_preserved_marks(NULL), _preserved_marks_of_objs(NULL), ! _preserved_marks(40, 10000), _evac_failure_scan_stack(NULL) , _mark_in_progress(false), _cg1r(NULL), _summary_bytes_used(0), _g1mm(NULL), _refine_cte_cl(NULL),
*** 4213,4237 **** --- 4214,4226 ---- reset_cset_heap_region_claim_values(); assert(check_cset_heap_region_claim_values(HeapRegion::InitialClaimValue), "sanity"); // Now restore saved marks, if any. ! if (_objs_with_preserved_marks != NULL) { ! assert(_preserved_marks_of_objs != NULL, "Both or none."); guarantee(_objs_with_preserved_marks->length() == _preserved_marks_of_objs->length(), "Both or none."); for (int i = 0; i < _objs_with_preserved_marks->length(); i++) { oop obj = _objs_with_preserved_marks->at(i); markOop m = _preserved_marks_of_objs->at(i); obj->set_mark(m); } // Delete the preserved marks growable arrays (allocated on the C heap). delete _objs_with_preserved_marks; delete _preserved_marks_of_objs; _objs_with_preserved_marks = NULL; _preserved_marks_of_objs = NULL; ! while (_preserved_marks.has_data()) { ! G1PreserveMarkQueueEntry e = _preserved_marks.remove_first(); + e.obj->set_mark(e.mark); } } void G1CollectedHeap::push_on_evac_failure_scan_stack(oop obj) { _evac_failure_scan_stack->push(obj);
*** 4311,4329 **** --- 4300,4310 ---- void G1CollectedHeap::preserve_mark_if_necessary(oop obj, markOop m) { assert(evacuation_failed(), "Oversaving!"); // We want to call the "for_promotion_failure" version only in the // case of a promotion failure. if (m->must_be_preserved_for_promotion_failure(obj)) { if (_objs_with_preserved_marks == NULL) { assert(_preserved_marks_of_objs == NULL, "Both or none."); _objs_with_preserved_marks = new (ResourceObj::C_HEAP, mtGC) GrowableArray<oop>(40, true); _preserved_marks_of_objs = new (ResourceObj::C_HEAP, mtGC) GrowableArray<markOop>(40, true); } _objs_with_preserved_marks->push(obj); _preserved_marks_of_objs->push(m); + _preserved_marks.append(obj, m); } } HeapWord* G1CollectedHeap::par_allocate_during_gc(GCAllocPurpose purpose, size_t word_size) {

src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File