comparison src/share/vm/gc_implementation/g1/heapRegionSet.cpp @ 4072:8aae2050e83e

7092309: G1: introduce old region set Summary: Keep track of all the old regions in the heap with a heap region set. Reviewed-by: brutisso, johnc
author tonyp
date Mon, 07 Nov 2011 22:11:12 -0500
parents 455328d90876
children 720b6a76dd9d
comparison
equal deleted inserted replaced
4071:ed80554efa25 4072:8aae2050e83e
24 24
25 #include "precompiled.hpp" 25 #include "precompiled.hpp"
26 #include "gc_implementation/g1/heapRegionSet.inline.hpp" 26 #include "gc_implementation/g1/heapRegionSet.inline.hpp"
27 27
28 size_t HeapRegionSetBase::_unrealistically_long_length = 0; 28 size_t HeapRegionSetBase::_unrealistically_long_length = 0;
29 HRSPhase HeapRegionSetBase::_phase = HRSPhaseNone;
29 30
30 //////////////////// HeapRegionSetBase //////////////////// 31 //////////////////// HeapRegionSetBase ////////////////////
31 32
32 void HeapRegionSetBase::set_unrealistically_long_length(size_t len) { 33 void HeapRegionSetBase::set_unrealistically_long_length(size_t len) {
33 guarantee(_unrealistically_long_length == 0, "should only be set once"); 34 guarantee(_unrealistically_long_length == 0, "should only be set once");
188 hrs_err_msg("[%s] used bytes: "SIZE_FORMAT" should be == " 189 hrs_err_msg("[%s] used bytes: "SIZE_FORMAT" should be == "
189 "calc used bytes: "SIZE_FORMAT, 190 "calc used bytes: "SIZE_FORMAT,
190 name(), total_used_bytes(), _calc_total_used_bytes)); 191 name(), total_used_bytes(), _calc_total_used_bytes));
191 192
192 _verify_in_progress = false; 193 _verify_in_progress = false;
194 }
195
196 void HeapRegionSetBase::clear_phase() {
197 assert(_phase != HRSPhaseNone, "pre-condition");
198 _phase = HRSPhaseNone;
199 }
200
201 void HeapRegionSetBase::set_phase(HRSPhase phase) {
202 assert(_phase == HRSPhaseNone, "pre-condition");
203 assert(phase != HRSPhaseNone, "pre-condition");
204 _phase = phase;
193 } 205 }
194 206
195 void HeapRegionSetBase::print_on(outputStream* out, bool print_contents) { 207 void HeapRegionSetBase::print_on(outputStream* out, bool print_contents) {
196 out->cr(); 208 out->cr();
197 out->print_cr("Set: %s ("PTR_FORMAT")", name(), this); 209 out->print_cr("Set: %s ("PTR_FORMAT")", name(), this);