< prev index next >

src/share/vm/gc/g1/heapRegionSet.inline.hpp

Print this page
rev 8978 : imported patch remove_err_msg
rev 8979 : [mq]: vmerr_static

*** 27,60 **** #include "gc/g1/heapRegionSet.hpp" inline void HeapRegionSetBase::add(HeapRegion* hr) { check_mt_safety(); ! assert(hr->containing_set() == NULL, hrs_ext_msg(this, "should not already have a containing set %u")); ! assert(hr->next() == NULL, hrs_ext_msg(this, "should not already be linked")); ! assert(hr->prev() == NULL, hrs_ext_msg(this, "should not already be linked")); _count.increment(1u, hr->capacity()); hr->set_containing_set(this); verify_region(hr); } inline void HeapRegionSetBase::remove(HeapRegion* hr) { check_mt_safety(); verify_region(hr); ! assert(hr->next() == NULL, hrs_ext_msg(this, "should already be unlinked")); ! assert(hr->prev() == NULL, hrs_ext_msg(this, "should already be unlinked")); hr->set_containing_set(NULL); ! assert(_count.length() > 0, hrs_ext_msg(this, "pre-condition")); _count.decrement(1u, hr->capacity()); } inline void FreeRegionList::add_ordered(HeapRegion* hr) { assert((length() == 0 && _head == NULL && _tail == NULL && _last == NULL) || (length() > 0 && _head != NULL && _tail != NULL), ! hrs_ext_msg(this, "invariant")); // add() will verify the region and check mt safety. add(hr); // Now link the region if (_head != NULL) { --- 27,60 ---- #include "gc/g1/heapRegionSet.hpp" inline void HeapRegionSetBase::add(HeapRegion* hr) { check_mt_safety(); ! assert(hr->containing_set() == NULL, "%s", hrs_ext_msg(this, "should not already have a containing set %u").buffer()); ! assert(hr->next() == NULL, "%s", hrs_ext_msg(this, "should not already be linked").buffer()); ! assert(hr->prev() == NULL, "%s", hrs_ext_msg(this, "should not already be linked").buffer()); _count.increment(1u, hr->capacity()); hr->set_containing_set(this); verify_region(hr); } inline void HeapRegionSetBase::remove(HeapRegion* hr) { check_mt_safety(); verify_region(hr); ! assert(hr->next() == NULL, "%s", hrs_ext_msg(this, "should already be unlinked").buffer()); ! assert(hr->prev() == NULL, "%s", hrs_ext_msg(this, "should already be unlinked").buffer()); hr->set_containing_set(NULL); ! assert(_count.length() > 0, "%s", hrs_ext_msg(this, "pre-condition").buffer()); _count.decrement(1u, hr->capacity()); } inline void FreeRegionList::add_ordered(HeapRegion* hr) { assert((length() == 0 && _head == NULL && _tail == NULL && _last == NULL) || (length() > 0 && _head != NULL && _tail != NULL), ! "%s", hrs_ext_msg(this, "invariant").buffer()); // add() will verify the region and check mt safety. add(hr); // Now link the region if (_head != NULL) {
*** 127,137 **** if (is_empty()) { return NULL; } assert(length() > 0 && _head != NULL && _tail != NULL, ! hrs_ext_msg(this, "invariant")); HeapRegion* hr; if (from_head) { hr = remove_from_head_impl(); --- 127,137 ---- if (is_empty()) { return NULL; } assert(length() > 0 && _head != NULL && _tail != NULL, ! "%s", hrs_ext_msg(this, "invariant").buffer()); HeapRegion* hr; if (from_head) { hr = remove_from_head_impl();
< prev index next >