提交 614115f2 编写于 作者: Y ysr

6983930: CMS: Various small cleanups ca September 2010

Summary: Fixed comment/documentation typos; converted some guarantee()s to assert()s.
Reviewed-by: jmasa
上级 13dc1d18
......@@ -256,7 +256,7 @@ TreeChunk* TreeList::head_as_TreeChunk() {
}
TreeChunk* TreeList::first_available() {
guarantee(head() != NULL, "The head of the list cannot be NULL");
assert(head() != NULL, "The head of the list cannot be NULL");
FreeChunk* fc = head()->next();
TreeChunk* retTC;
if (fc == NULL) {
......@@ -272,7 +272,7 @@ TreeChunk* TreeList::first_available() {
// those in the list for this size; potentially slow and expensive,
// use with caution!
TreeChunk* TreeList::largest_address() {
guarantee(head() != NULL, "The head of the list cannot be NULL");
assert(head() != NULL, "The head of the list cannot be NULL");
FreeChunk* fc = head()->next();
TreeChunk* retTC;
if (fc == NULL) {
......
......@@ -1946,8 +1946,8 @@ void CompactibleFreeListSpace::save_marks() {
bool CompactibleFreeListSpace::no_allocs_since_save_marks() {
assert(_promoInfo.tracking(), "No preceding save_marks?");
guarantee(SharedHeap::heap()->n_par_threads() == 0,
"Shouldn't be called (yet) during parallel part of gc.");
assert(SharedHeap::heap()->n_par_threads() == 0,
"Shouldn't be called if using parallel gc.");
return _promoInfo.noPromotions();
}
......@@ -2569,7 +2569,7 @@ void CFLS_LAB::modify_initialization(size_t n, unsigned wt) {
HeapWord* CFLS_LAB::alloc(size_t word_sz) {
FreeChunk* res;
guarantee(word_sz == _cfls->adjustObjectSize(word_sz), "Error");
assert(word_sz == _cfls->adjustObjectSize(word_sz), "Error");
if (word_sz >= CompactibleFreeListSpace::IndexSetSize) {
// This locking manages sync with other large object allocations.
MutexLockerEx x(_cfls->parDictionaryAllocLock(),
......
......@@ -1332,7 +1332,7 @@ ConcurrentMarkSweepGeneration::allocation_limit_reached(Space* space,
// -----------------------------------------------------
// FREE: klass_word & 1 == 1; mark_word holds block size
//
// OBJECT: klass_word installed; klass_word != 0 && klass_word & 0 == 0;
// OBJECT: klass_word installed; klass_word != 0 && klass_word & 1 == 0;
// obj->size() computes correct size
// [Perm Gen objects needs to be "parsable" before they can be navigated]
//
......
......@@ -165,13 +165,8 @@ void FreeList::removeChunk(FreeChunk*fc) {
"Next of tail should be NULL");
}
decrement_count();
#define TRAP_CODE 1
#if TRAP_CODE
if (head() == NULL) {
guarantee(tail() == NULL, "INVARIANT");
guarantee(count() == 0, "INVARIANT");
}
#endif
assert(((head() == NULL) + (tail() == NULL) + (count() == 0)) % 3 == 0,
"H/T/C Inconsistency");
// clear next and prev fields of fc, debug only
NOT_PRODUCT(
fc->linkPrev(NULL);
......
......@@ -253,8 +253,8 @@ void PromotionInfo::print_statistics(uint worker_id) const {
cur_spool = cur_spool->nextSpoolBlock) {
// the first entry is just a self-pointer; indices 1 through
// bufferSize - 1 are occupied (thus, bufferSize - 1 slots).
guarantee((void*)cur_spool->displacedHdr == (void*)&cur_spool->displacedHdr,
"first entry of displacedHdr should be self-referential");
assert((void*)cur_spool->displacedHdr == (void*)&cur_spool->displacedHdr,
"first entry of displacedHdr should be self-referential");
slots += cur_spool->bufferSize - 1;
blocks++;
}
......
......@@ -1541,13 +1541,13 @@ class CommandLineFlags {
"Use BinaryTreeDictionary as default in the CMS generation") \
\
product(uintx, CMSIndexedFreeListReplenish, 4, \
"Replenish and indexed free list with this number of chunks") \
"Replenish an indexed free list with this number of chunks") \
\
product(bool, CMSReplenishIntermediate, true, \
"Replenish all intermediate free-list caches") \
\
product(bool, CMSSplitIndexedFreeListBlocks, true, \
"When satisfying batched demand, splot blocks from the " \
"When satisfying batched demand, split blocks from the " \
"IndexedFreeList whose size is a multiple of requested size") \
\
product(bool, CMSLoopWarn, false, \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册