Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/heapRegion.hpp @ 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 |
---|---|
304 HeapWord* _prev_top_at_mark_start; | 304 HeapWord* _prev_top_at_mark_start; |
305 HeapWord* _next_top_at_mark_start; | 305 HeapWord* _next_top_at_mark_start; |
306 // If a collection pause is in progress, this is the top at the start | 306 // If a collection pause is in progress, this is the top at the start |
307 // of that pause. | 307 // of that pause. |
308 | 308 |
309 // We've counted the marked bytes of objects below here. | |
310 HeapWord* _top_at_conc_mark_count; | |
311 | |
312 void init_top_at_mark_start() { | 309 void init_top_at_mark_start() { |
313 assert(_prev_marked_bytes == 0 && | 310 assert(_prev_marked_bytes == 0 && |
314 _next_marked_bytes == 0, | 311 _next_marked_bytes == 0, |
315 "Must be called after zero_marked_bytes."); | 312 "Must be called after zero_marked_bytes."); |
316 HeapWord* bot = bottom(); | 313 HeapWord* bot = bottom(); |
317 _prev_top_at_mark_start = bot; | 314 _prev_top_at_mark_start = bot; |
318 _next_top_at_mark_start = bot; | 315 _next_top_at_mark_start = bot; |
319 _top_at_conc_mark_count = bot; | |
320 } | 316 } |
321 | 317 |
322 void set_young_type(YoungType new_type) { | 318 void set_young_type(YoungType new_type) { |
323 //assert(_young_type != new_type, "setting the same type" ); | 319 //assert(_young_type != new_type, "setting the same type" ); |
324 // TODO: add more assertions here | 320 // TODO: add more assertions here |
623 | 619 |
624 // Returns "false" iff no object in the region was allocated when the | 620 // Returns "false" iff no object in the region was allocated when the |
625 // last mark phase ended. | 621 // last mark phase ended. |
626 bool is_marked() { return _prev_top_at_mark_start != bottom(); } | 622 bool is_marked() { return _prev_top_at_mark_start != bottom(); } |
627 | 623 |
628 void init_top_at_conc_mark_count() { | |
629 _top_at_conc_mark_count = bottom(); | |
630 } | |
631 | |
632 void set_top_at_conc_mark_count(HeapWord *cur) { | |
633 assert(bottom() <= cur && cur <= end(), "Sanity."); | |
634 _top_at_conc_mark_count = cur; | |
635 } | |
636 | |
637 HeapWord* top_at_conc_mark_count() { | |
638 return _top_at_conc_mark_count; | |
639 } | |
640 | |
641 void reset_during_compaction() { | 624 void reset_during_compaction() { |
642 guarantee( isHumongous() && startsHumongous(), | 625 guarantee( isHumongous() && startsHumongous(), |
643 "should only be called for humongous regions"); | 626 "should only be called for humongous regions"); |
644 | 627 |
645 zero_marked_bytes(); | 628 zero_marked_bytes(); |
731 // Sets the "evacuation_failed" property of the region. | 714 // Sets the "evacuation_failed" property of the region. |
732 void set_evacuation_failed(bool b) { | 715 void set_evacuation_failed(bool b) { |
733 _evacuation_failed = b; | 716 _evacuation_failed = b; |
734 | 717 |
735 if (b) { | 718 if (b) { |
736 init_top_at_conc_mark_count(); | |
737 _next_marked_bytes = 0; | 719 _next_marked_bytes = 0; |
738 } | 720 } |
739 } | 721 } |
740 | 722 |
741 // Requires that "mr" be entirely within the region. | 723 // Requires that "mr" be entirely within the region. |