comparison src/share/vm/gc_implementation/g1/heapRegion.cpp @ 6027:8a2e5a6a19a4

7143490: G1: Remove HeapRegion::_top_at_conc_mark_count Summary: Removed the HeapRegion::_top_at_conc_mark_count field. It is no longer needed as a result of the changes for 6888336 and 7127706. Refactored the closures that finalize and verify the liveness counting data so that common functionality was placed into a base class. Reviewed-by: brutisso, tonyp
author johnc
date Wed, 25 Apr 2012 10:23:12 -0700
parents f7a8920427a6
children a2f7274eb6ef
comparison
equal deleted inserted replaced
6026:9f059abe8cf2 6027:8a2e5a6a19a4
508 set_saved_mark(); 508 set_saved_mark();
509 509
510 _rem_set = new HeapRegionRemSet(sharedOffsetArray, this); 510 _rem_set = new HeapRegionRemSet(sharedOffsetArray, this);
511 511
512 assert(HeapRegionRemSet::num_par_rem_sets() > 0, "Invariant."); 512 assert(HeapRegionRemSet::num_par_rem_sets() > 0, "Invariant.");
513 // In case the region is allocated during a pause, note the top.
514 // We haven't done any counting on a brand new region.
515 _top_at_conc_mark_count = bottom();
516 } 513 }
517 514
518 class NextCompactionHeapRegionClosure: public HeapRegionClosure { 515 class NextCompactionHeapRegionClosure: public HeapRegionClosure {
519 const HeapRegion* _target; 516 const HeapRegion* _target;
520 bool _target_seen; 517 bool _target_seen;
583 if (during_initial_mark) { 580 if (during_initial_mark) {
584 // During initial-mark, we'll also explicitly mark all objects 581 // During initial-mark, we'll also explicitly mark all objects
585 // we find to be self-forwarded on the next bitmap. So all 582 // we find to be self-forwarded on the next bitmap. So all
586 // objects need to be below NTAMS. 583 // objects need to be below NTAMS.
587 _next_top_at_mark_start = top(); 584 _next_top_at_mark_start = top();
588 set_top_at_conc_mark_count(bottom());
589 _next_marked_bytes = 0; 585 _next_marked_bytes = 0;
590 } else if (during_conc_mark) { 586 } else if (during_conc_mark) {
591 // During concurrent mark, all objects in the CSet (including 587 // During concurrent mark, all objects in the CSet (including
592 // the ones we find to be self-forwarded) are implicitly live. 588 // the ones we find to be self-forwarded) are implicitly live.
593 // So all objects need to be above NTAMS. 589 // So all objects need to be above NTAMS.
594 _next_top_at_mark_start = bottom(); 590 _next_top_at_mark_start = bottom();
595 set_top_at_conc_mark_count(bottom());
596 _next_marked_bytes = 0; 591 _next_marked_bytes = 0;
597 } 592 }
598 } 593 }
599 594
600 void HeapRegion::note_self_forwarding_removal_end(bool during_initial_mark, 595 void HeapRegion::note_self_forwarding_removal_end(bool during_initial_mark,