< prev index next >
src/share/vm/gc/g1/g1CollectedHeap.cpp
Print this page
rev 11110 : 8150721: Don't explicitly manage G1 young regions in YoungList
Reviewed-by:
rev 11111 : [mq]: nuke-younglist
rev 11112 : imported patch thomas-review
*** 5026,5035 ****
--- 5026,5037 ----
void G1CollectedHeap::set_region_short_lived_locked(HeapRegion* hr) {
_eden.add(hr);
_g1_policy->set_region_eden(hr);
}
+ #ifdef ASSERT
+
class NoYoungRegionsClosure: public HeapRegionClosure {
private:
bool _success;
public:
NoYoungRegionsClosure() : _success(true) { }
*** 5052,5061 ****
--- 5054,5065 ----
ret = ret && closure.success();
return ret;
}
+ #endif // ASSERT
+
class TearDownRegionSetsClosure : public HeapRegionClosure {
private:
HeapRegionSet *_old_set;
public:
*** 5138,5152 ****
} else if (!_free_list_only) {
if (r->is_humongous()) {
// We ignore humongous regions. We left the humongous set unchanged.
} else {
- // Objects that were compacted would have ended up on regions
- // that were previously old or free. Archive regions (which are
- // old) will not have been touched.
assert(r->is_young() || r->is_free() || r->is_old(), "invariant");
! // We now consider them old, so register as such. Leave
// archive regions set that way, however, while still adding
// them to the old set.
if (!r->is_archive()) {
r->set_old();
}
--- 5142,5153 ----
} else if (!_free_list_only) {
if (r->is_humongous()) {
// We ignore humongous regions. We left the humongous set unchanged.
} else {
assert(r->is_young() || r->is_free() || r->is_old(), "invariant");
! // We now consider all regions old, so register as such. Leave
// archive regions set that way, however, while still adding
// them to the old set.
if (!r->is_archive()) {
r->set_old();
}
< prev index next >