< prev index next >

src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp

Print this page
rev 8031 : imported patch cms

*** 63,74 **** #include "runtime/orderAccess.inline.hpp" #include "runtime/vmThread.hpp" #include "services/memoryService.hpp" #include "services/runtimeService.hpp" - PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC - // statics CMSCollector* ConcurrentMarkSweepGeneration::_collector = NULL; bool CMSCollector::_full_gc_requested = false; GCCause::Cause CMSCollector::_full_gc_cause = GCCause::_no_gc; --- 63,72 ----
*** 1591,1601 **** "VM thread should have CMS token"); getFreelistLocks(); bitMapLock()->lock_without_safepoint_check(); if (TraceCMSState) { gclog_or_tty->print_cr("CMS foreground collector has asked for control " ! INTPTR_FORMAT " with first state %d", Thread::current(), first_state); gclog_or_tty->print_cr(" gets control with state %d", _collectorState); } // Inform cms gen if this was due to partial collection failing. // The CMS gen may use this fact to determine its expansion policy. --- 1589,1599 ---- "VM thread should have CMS token"); getFreelistLocks(); bitMapLock()->lock_without_safepoint_check(); if (TraceCMSState) { gclog_or_tty->print_cr("CMS foreground collector has asked for control " ! INTPTR_FORMAT " with first state %d", p2i(Thread::current()), first_state); gclog_or_tty->print_cr(" gets control with state %d", _collectorState); } // Inform cms gen if this was due to partial collection failing. // The CMS gen may use this fact to determine its expansion policy.
*** 1761,1791 **** ContiguousSpace* from_space = _young_gen->from(); ContiguousSpace* to_space = _young_gen->to(); // Eden if (_eden_chunk_array != NULL) { gclog_or_tty->print_cr("eden " PTR_FORMAT "-" PTR_FORMAT "-" PTR_FORMAT "(" SIZE_FORMAT ")", ! eden_space->bottom(), eden_space->top(), ! eden_space->end(), eden_space->capacity()); gclog_or_tty->print_cr("_eden_chunk_index=" SIZE_FORMAT ", " "_eden_chunk_capacity=" SIZE_FORMAT, _eden_chunk_index, _eden_chunk_capacity); for (size_t i = 0; i < _eden_chunk_index; i++) { gclog_or_tty->print_cr("_eden_chunk_array[" SIZE_FORMAT "]=" PTR_FORMAT, ! i, _eden_chunk_array[i]); } } // Survivor if (_survivor_chunk_array != NULL) { gclog_or_tty->print_cr("survivor " PTR_FORMAT "-" PTR_FORMAT "-" PTR_FORMAT "(" SIZE_FORMAT ")", ! from_space->bottom(), from_space->top(), ! from_space->end(), from_space->capacity()); gclog_or_tty->print_cr("_survivor_chunk_index=" SIZE_FORMAT ", " "_survivor_chunk_capacity=" SIZE_FORMAT, _survivor_chunk_index, _survivor_chunk_capacity); for (size_t i = 0; i < _survivor_chunk_index; i++) { gclog_or_tty->print_cr("_survivor_chunk_array[" SIZE_FORMAT "]=" PTR_FORMAT, ! i, _survivor_chunk_array[i]); } } } void CMSCollector::getFreelistLocks() const { --- 1759,1789 ---- ContiguousSpace* from_space = _young_gen->from(); ContiguousSpace* to_space = _young_gen->to(); // Eden if (_eden_chunk_array != NULL) { gclog_or_tty->print_cr("eden " PTR_FORMAT "-" PTR_FORMAT "-" PTR_FORMAT "(" SIZE_FORMAT ")", ! p2i(eden_space->bottom()), p2i(eden_space->top()), ! p2i(eden_space->end()), eden_space->capacity()); gclog_or_tty->print_cr("_eden_chunk_index=" SIZE_FORMAT ", " "_eden_chunk_capacity=" SIZE_FORMAT, _eden_chunk_index, _eden_chunk_capacity); for (size_t i = 0; i < _eden_chunk_index; i++) { gclog_or_tty->print_cr("_eden_chunk_array[" SIZE_FORMAT "]=" PTR_FORMAT, ! i, p2i(_eden_chunk_array[i])); } } // Survivor if (_survivor_chunk_array != NULL) { gclog_or_tty->print_cr("survivor " PTR_FORMAT "-" PTR_FORMAT "-" PTR_FORMAT "(" SIZE_FORMAT ")", ! p2i(from_space->bottom()), p2i(from_space->top()), ! p2i(from_space->end()), from_space->capacity()); gclog_or_tty->print_cr("_survivor_chunk_index=" SIZE_FORMAT ", " "_survivor_chunk_capacity=" SIZE_FORMAT, _survivor_chunk_index, _survivor_chunk_capacity); for (size_t i = 0; i < _survivor_chunk_index; i++) { gclog_or_tty->print_cr("_survivor_chunk_array[" SIZE_FORMAT "]=" PTR_FORMAT, ! i, p2i(_survivor_chunk_array[i])); } } } void CMSCollector::getFreelistLocks() const {
*** 1888,1898 **** // while the world is stopped because the foreground collector already // has the world stopped and would deadlock. while (_collectorState != Idling) { if (TraceCMSState) { gclog_or_tty->print_cr("Thread " INTPTR_FORMAT " in CMS state %d", ! Thread::current(), _collectorState); } // The foreground collector // holds the Heap_lock throughout its collection. // holds the CMS token (but not the lock) // except while it is waiting for the background collector to yield. --- 1886,1896 ---- // while the world is stopped because the foreground collector already // has the world stopped and would deadlock. while (_collectorState != Idling) { if (TraceCMSState) { gclog_or_tty->print_cr("Thread " INTPTR_FORMAT " in CMS state %d", ! p2i(Thread::current()), _collectorState); } // The foreground collector // holds the Heap_lock throughout its collection. // holds the CMS token (but not the lock) // except while it is waiting for the background collector to yield.
*** 1922,1932 **** assert(_foregroundGCShouldWait == false, "We set it to false in " "waitForForegroundGC()"); if (TraceCMSState) { gclog_or_tty->print_cr("CMS Thread " INTPTR_FORMAT " exiting collection CMS state %d", ! Thread::current(), _collectorState); } return; } else { // The background collector can run but check to see if the // foreground collector has done a collection while the --- 1920,1930 ---- assert(_foregroundGCShouldWait == false, "We set it to false in " "waitForForegroundGC()"); if (TraceCMSState) { gclog_or_tty->print_cr("CMS Thread " INTPTR_FORMAT " exiting collection CMS state %d", ! p2i(Thread::current()), _collectorState); } return; } else { // The background collector can run but check to see if the // foreground collector has done a collection while the
*** 2029,2039 **** ShouldNotReachHere(); break; } if (TraceCMSState) { gclog_or_tty->print_cr(" Thread " INTPTR_FORMAT " done - next CMS state %d", ! Thread::current(), _collectorState); } assert(_foregroundGCShouldWait, "block post-condition"); } // Should this be in gc_epilogue? --- 2027,2037 ---- ShouldNotReachHere(); break; } if (TraceCMSState) { gclog_or_tty->print_cr(" Thread " INTPTR_FORMAT " done - next CMS state %d", ! p2i(Thread::current()), _collectorState); } assert(_foregroundGCShouldWait, "block post-condition"); } // Should this be in gc_epilogue?
*** 2052,2062 **** "Possible deadlock"); } if (TraceCMSState) { gclog_or_tty->print_cr("CMS Thread " INTPTR_FORMAT " exiting collection CMS state %d", ! Thread::current(), _collectorState); } if (PrintGC && Verbose) { _cmsGen->print_heap_change(prev_used); } } --- 2050,2060 ---- "Possible deadlock"); } if (TraceCMSState) { gclog_or_tty->print_cr("CMS Thread " INTPTR_FORMAT " exiting collection CMS state %d", ! p2i(Thread::current()), _collectorState); } if (PrintGC && Verbose) { _cmsGen->print_heap_change(prev_used); } }
*** 2110,2120 **** ConcurrentMarkSweepThread::CMS_cms_wants_token); // Get a possibly blocked foreground thread going CGC_lock->notify(); if (TraceCMSState) { gclog_or_tty->print_cr("CMS Thread " INTPTR_FORMAT " waiting at CMS state %d", ! Thread::current(), _collectorState); } while (_foregroundGCIsActive) { CGC_lock->wait(Mutex::_no_safepoint_check_flag); } ConcurrentMarkSweepThread::set_CMS_flag( --- 2108,2118 ---- ConcurrentMarkSweepThread::CMS_cms_wants_token); // Get a possibly blocked foreground thread going CGC_lock->notify(); if (TraceCMSState) { gclog_or_tty->print_cr("CMS Thread " INTPTR_FORMAT " waiting at CMS state %d", ! p2i(Thread::current()), _collectorState); } while (_foregroundGCIsActive) { CGC_lock->wait(Mutex::_no_safepoint_check_flag); } ConcurrentMarkSweepThread::set_CMS_flag(
*** 2122,2132 **** ConcurrentMarkSweepThread::clear_CMS_flag( ConcurrentMarkSweepThread::CMS_cms_wants_token); } if (TraceCMSState) { gclog_or_tty->print_cr("CMS Thread " INTPTR_FORMAT " continuing at CMS state %d", ! Thread::current(), _collectorState); } return res; } // Because of the need to lock the free lists and other structures in --- 2120,2130 ---- ConcurrentMarkSweepThread::clear_CMS_flag( ConcurrentMarkSweepThread::CMS_cms_wants_token); } if (TraceCMSState) { gclog_or_tty->print_cr("CMS Thread " INTPTR_FORMAT " continuing at CMS state %d", ! p2i(Thread::current()), _collectorState); } return res; } // Because of the need to lock the free lists and other structures in
*** 2354,2370 **** assert(haveFreelistLocks(), "must hold free list locks"); assert_lock_strong(bitMapLock()); // Clear the marking bit map array before starting, but, just // for kicks, first report if the given address is already marked ! gclog_or_tty->print_cr("Start: Address " PTR_FORMAT " is%s marked", addr, _markBitMap.isMarked(addr) ? "" : " not"); if (verify_after_remark()) { MutexLockerEx x(verification_mark_bm()->lock(), Mutex::_no_safepoint_check_flag); bool result = verification_mark_bm()->isMarked(addr); ! gclog_or_tty->print_cr("TransitiveMark: Address " PTR_FORMAT " %s marked", addr, result ? "IS" : "is NOT"); return result; } else { gclog_or_tty->print_cr("Could not compute result"); return false; --- 2352,2368 ---- assert(haveFreelistLocks(), "must hold free list locks"); assert_lock_strong(bitMapLock()); // Clear the marking bit map array before starting, but, just // for kicks, first report if the given address is already marked ! gclog_or_tty->print_cr("Start: Address " PTR_FORMAT " is%s marked", p2i(addr), _markBitMap.isMarked(addr) ? "" : " not"); if (verify_after_remark()) { MutexLockerEx x(verification_mark_bm()->lock(), Mutex::_no_safepoint_check_flag); bool result = verification_mark_bm()->isMarked(addr); ! gclog_or_tty->print_cr("TransitiveMark: Address " PTR_FORMAT " %s marked", p2i(addr), result ? "IS" : "is NOT"); return result; } else { gclog_or_tty->print_cr("Could not compute result"); return false;
*** 2375,2391 **** void CMSCollector::print_on_error(outputStream* st) { CMSCollector* collector = ConcurrentMarkSweepGeneration::_collector; if (collector != NULL) { CMSBitMap* bitmap = &collector->_markBitMap; ! st->print_cr("Marking Bits: (CMSBitMap*) " PTR_FORMAT, bitmap); bitmap->print_on_error(st, " Bits: "); st->cr(); CMSBitMap* mut_bitmap = &collector->_modUnionTable; ! st->print_cr("Mod Union Table: (CMSBitMap*) " PTR_FORMAT, mut_bitmap); mut_bitmap->print_on_error(st, " Bits: "); } } //////////////////////////////////////////////////////// --- 2373,2389 ---- void CMSCollector::print_on_error(outputStream* st) { CMSCollector* collector = ConcurrentMarkSweepGeneration::_collector; if (collector != NULL) { CMSBitMap* bitmap = &collector->_markBitMap; ! st->print_cr("Marking Bits: (CMSBitMap*) " PTR_FORMAT, p2i(bitmap)); bitmap->print_on_error(st, " Bits: "); st->cr(); CMSBitMap* mut_bitmap = &collector->_modUnionTable; ! st->print_cr("Mod Union Table: (CMSBitMap*) " PTR_FORMAT, p2i(mut_bitmap)); mut_bitmap->print_on_error(st, " Bits: "); } } ////////////////////////////////////////////////////////
*** 2404,2414 **** bool do_bit(size_t offset) { HeapWord* addr = _marks->offsetToHeapWord(offset); if (!_marks->isMarked(addr)) { oop(addr)->print_on(gclog_or_tty); ! gclog_or_tty->print_cr(" ("INTPTR_FORMAT" should have been marked)", addr); _failed = true; } return true; } --- 2402,2412 ---- bool do_bit(size_t offset) { HeapWord* addr = _marks->offsetToHeapWord(offset); if (!_marks->isMarked(addr)) { oop(addr)->print_on(gclog_or_tty); ! gclog_or_tty->print_cr(" ("INTPTR_FORMAT" should have been marked)", p2i(addr)); _failed = true; } return true; }
*** 2472,2482 **** // in the CMS marks-vector) immediately, also indicating the // identify of an object (A) that references the unmarked object (B) -- // presumably, a mutation to A failed to be picked up by preclean/remark? verify_after_remark_work_2(); } else { ! warning("Unrecognized value %d for CMSRemarkVerifyVariant", CMSRemarkVerifyVariant); } if (!silent) gclog_or_tty->print(" done] "); return true; } --- 2470,2480 ---- // in the CMS marks-vector) immediately, also indicating the // identify of an object (A) that references the unmarked object (B) -- // presumably, a mutation to A failed to be picked up by preclean/remark? verify_after_remark_work_2(); } else { ! warning("Unrecognized value " UINTX_FORMAT " for CMSRemarkVerifyVariant", CMSRemarkVerifyVariant); } if (!silent) gclog_or_tty->print(" done] "); return true; }
*** 5054,5064 **** // Check that the merged array is in sorted order if (total > 0) { for (size_t i = 0; i < total - 1; i++) { if (PrintCMSStatistics > 0) { gclog_or_tty->print(" (chunk" SIZE_FORMAT ":" INTPTR_FORMAT ") ", ! i, _survivor_chunk_array[i]); } assert(_survivor_chunk_array[i] < _survivor_chunk_array[i+1], "Not sorted"); } } --- 5052,5062 ---- // Check that the merged array is in sorted order if (total > 0) { for (size_t i = 0; i < total - 1; i++) { if (PrintCMSStatistics > 0) { gclog_or_tty->print(" (chunk" SIZE_FORMAT ":" INTPTR_FORMAT ") ", ! i, p2i(_survivor_chunk_array[i])); } assert(_survivor_chunk_array[i] < _survivor_chunk_array[i+1], "Not sorted"); } }
*** 5698,5709 **** (size_t)((double)largestOffset * nearLargestPercent) - MinChunkSize; if (PrintFLSStatistics != 0) { gclog_or_tty->print_cr( "CMS: Large Block: " PTR_FORMAT ";" " Proximity: " PTR_FORMAT " -> " PTR_FORMAT, ! largestAddr, ! _cmsSpace->nearLargestChunk(), minAddr + nearLargestOffset); } _cmsSpace->set_nearLargestChunk(minAddr + nearLargestOffset); } bool ConcurrentMarkSweepGeneration::isNearLargestChunk(HeapWord* addr) { --- 5696,5707 ---- (size_t)((double)largestOffset * nearLargestPercent) - MinChunkSize; if (PrintFLSStatistics != 0) { gclog_or_tty->print_cr( "CMS: Large Block: " PTR_FORMAT ";" " Proximity: " PTR_FORMAT " -> " PTR_FORMAT, ! p2i(largestAddr), ! p2i(_cmsSpace->nearLargestChunk()), p2i(minAddr + nearLargestOffset)); } _cmsSpace->set_nearLargestChunk(minAddr + nearLargestOffset); } bool ConcurrentMarkSweepGeneration::isNearLargestChunk(HeapWord* addr) {
*** 6182,6192 **** HeapWord* addr = (HeapWord*)obj; if (_span.contains(addr)) { _verification_bm->mark(addr); if (!_cms_bm->isMarked(addr)) { oop(addr)->print(); ! gclog_or_tty->print_cr(" (" INTPTR_FORMAT " should have been marked)", addr); fatal("... aborting"); } } } --- 6180,6190 ---- HeapWord* addr = (HeapWord*)obj; if (_span.contains(addr)) { _verification_bm->mark(addr); if (!_cms_bm->isMarked(addr)) { oop(addr)->print(); ! gclog_or_tty->print_cr(" (" INTPTR_FORMAT " should have been marked)", p2i(addr)); fatal("... aborting"); } } }
*** 6977,6987 **** // Oop lies in _span and isn't yet grey or black _verification_bm->mark(addr); // now grey if (!_cms_bm->isMarked(addr)) { oop(addr)->print(); gclog_or_tty->print_cr(" (" INTPTR_FORMAT " should have been marked)", ! addr); fatal("... aborting"); } if (!_mark_stack->push(obj)) { // stack overflow if (PrintCMSStatistics != 0) { --- 6975,6985 ---- // Oop lies in _span and isn't yet grey or black _verification_bm->mark(addr); // now grey if (!_cms_bm->isMarked(addr)) { oop(addr)->print(); gclog_or_tty->print_cr(" (" INTPTR_FORMAT " should have been marked)", ! p2i(addr)); fatal("... aborting"); } if (!_mark_stack->push(obj)) { // stack overflow if (PrintCMSStatistics != 0) {
*** 7373,7392 **** ) assert(_limit >= _sp->bottom() && _limit <= _sp->end(), "sweep _limit out of bounds"); if (CMSTraceSweeper) { gclog_or_tty->print_cr("\n====================\nStarting new sweep with limit " PTR_FORMAT, ! _limit); } } void SweepClosure::print_on(outputStream* st) const { tty->print_cr("_sp = [" PTR_FORMAT "," PTR_FORMAT ")", ! _sp->bottom(), _sp->end()); ! tty->print_cr("_limit = " PTR_FORMAT, _limit); ! tty->print_cr("_freeFinger = " PTR_FORMAT, _freeFinger); ! NOT_PRODUCT(tty->print_cr("_last_fc = " PTR_FORMAT, _last_fc);) tty->print_cr("_inFreeRange = %d, _freeRangeInFreeLists = %d, _lastFreeRangeCoalesced = %d", _inFreeRange, _freeRangeInFreeLists, _lastFreeRangeCoalesced); } #ifndef PRODUCT --- 7371,7390 ---- ) assert(_limit >= _sp->bottom() && _limit <= _sp->end(), "sweep _limit out of bounds"); if (CMSTraceSweeper) { gclog_or_tty->print_cr("\n====================\nStarting new sweep with limit " PTR_FORMAT, ! p2i(_limit)); } } void SweepClosure::print_on(outputStream* st) const { tty->print_cr("_sp = [" PTR_FORMAT "," PTR_FORMAT ")", ! p2i(_sp->bottom()), p2i(_sp->end())); ! tty->print_cr("_limit = " PTR_FORMAT, p2i(_limit)); ! tty->print_cr("_freeFinger = " PTR_FORMAT, p2i(_freeFinger)); ! NOT_PRODUCT(tty->print_cr("_last_fc = " PTR_FORMAT, p2i(_last_fc));) tty->print_cr("_inFreeRange = %d, _freeRangeInFreeLists = %d, _lastFreeRangeCoalesced = %d", _inFreeRange, _freeRangeInFreeLists, _lastFreeRangeCoalesced); } #ifndef PRODUCT
*** 7426,7445 **** dict_returned_bytes); } } if (CMSTraceSweeper) { gclog_or_tty->print_cr("end of sweep with _limit = " PTR_FORMAT "\n================", ! _limit); } } #endif // PRODUCT void SweepClosure::initialize_free_range(HeapWord* freeFinger, bool freeRangeInFreeLists) { if (CMSTraceSweeper) { gclog_or_tty->print("---- Start free range at " PTR_FORMAT " with free block (%d)\n", ! freeFinger, freeRangeInFreeLists); } assert(!inFreeRange(), "Trampling existing free range"); set_inFreeRange(true); set_lastFreeRangeCoalesced(false); --- 7424,7443 ---- dict_returned_bytes); } } if (CMSTraceSweeper) { gclog_or_tty->print_cr("end of sweep with _limit = " PTR_FORMAT "\n================", ! p2i(_limit)); } } #endif // PRODUCT void SweepClosure::initialize_free_range(HeapWord* freeFinger, bool freeRangeInFreeLists) { if (CMSTraceSweeper) { gclog_or_tty->print("---- Start free range at " PTR_FORMAT " with free block (%d)\n", ! p2i(freeFinger), freeRangeInFreeLists); } assert(!inFreeRange(), "Trampling existing free range"); set_inFreeRange(true); set_lastFreeRangeCoalesced(false);
*** 7499,7516 **** assert(addr < _sp->end(), "addr out of bounds"); // Flush any free range we might be holding as a single // coalesced chunk to the appropriate free list. if (inFreeRange()) { assert(freeFinger() >= _sp->bottom() && freeFinger() < _limit, ! err_msg("freeFinger() " PTR_FORMAT" is out-of-bounds", freeFinger())); flush_cur_free_chunk(freeFinger(), pointer_delta(addr, freeFinger())); if (CMSTraceSweeper) { gclog_or_tty->print("Sweep: last chunk: "); gclog_or_tty->print("put_free_blk " PTR_FORMAT " ("SIZE_FORMAT") " "[coalesced:%d]\n", ! freeFinger(), pointer_delta(addr, freeFinger()), lastFreeRangeCoalesced() ? 1 : 0); } } // help the iterator loop finish --- 7497,7514 ---- assert(addr < _sp->end(), "addr out of bounds"); // Flush any free range we might be holding as a single // coalesced chunk to the appropriate free list. if (inFreeRange()) { assert(freeFinger() >= _sp->bottom() && freeFinger() < _limit, ! err_msg("freeFinger() " PTR_FORMAT" is out-of-bounds", p2i(freeFinger()))); flush_cur_free_chunk(freeFinger(), pointer_delta(addr, freeFinger())); if (CMSTraceSweeper) { gclog_or_tty->print("Sweep: last chunk: "); gclog_or_tty->print("put_free_blk " PTR_FORMAT " ("SIZE_FORMAT") " "[coalesced:%d]\n", ! p2i(freeFinger()), pointer_delta(addr, freeFinger()), lastFreeRangeCoalesced() ? 1 : 0); } } // help the iterator loop finish
*** 7650,7660 **** } } else { // the midst of a free range, we are coalescing print_free_block_coalesced(fc); if (CMSTraceSweeper) { ! gclog_or_tty->print(" -- pick up free block " PTR_FORMAT " (" SIZE_FORMAT ")\n", fc, size); } // remove it from the free lists _sp->removeFreeChunkFromFreeLists(fc); set_lastFreeRangeCoalesced(true); // If the chunk is being coalesced and the current free range is --- 7648,7658 ---- } } else { // the midst of a free range, we are coalescing print_free_block_coalesced(fc); if (CMSTraceSweeper) { ! gclog_or_tty->print(" -- pick up free block " PTR_FORMAT " (" SIZE_FORMAT ")\n", p2i(fc), size); } // remove it from the free lists _sp->removeFreeChunkFromFreeLists(fc); set_lastFreeRangeCoalesced(true); // If the chunk is being coalesced and the current free range is
*** 7712,7722 **** initialize_free_range(addr, false); } else { // this will be swept up when we hit the end of the // free range if (CMSTraceSweeper) { ! gclog_or_tty->print(" -- pick up garbage " PTR_FORMAT " (" SIZE_FORMAT ")\n", fc, size); } // If the chunk is being coalesced and the current free range is // in the free lists, remove the current free range so that it // will be returned to the free lists in its entirety - all // the coalesced pieces included. --- 7710,7720 ---- initialize_free_range(addr, false); } else { // this will be swept up when we hit the end of the // free range if (CMSTraceSweeper) { ! gclog_or_tty->print(" -- pick up garbage " PTR_FORMAT " (" SIZE_FORMAT ")\n", p2i(fc), size); } // If the chunk is being coalesced and the current free range is // in the free lists, remove the current free range so that it // will be returned to the free lists in its entirety - all // the coalesced pieces included.
*** 7805,7815 **** if (CMSTestInFreeList && fcInFreeLists) { assert(_sp->verify_chunk_in_free_list(fc), "free chunk is not in free lists"); } if (CMSTraceSweeper) { ! gclog_or_tty->print_cr(" -- pick up another chunk at " PTR_FORMAT " (" SIZE_FORMAT ")", fc, chunkSize); } HeapWord* const fc_addr = (HeapWord*) fc; bool coalesce; --- 7803,7813 ---- if (CMSTestInFreeList && fcInFreeLists) { assert(_sp->verify_chunk_in_free_list(fc), "free chunk is not in free lists"); } if (CMSTraceSweeper) { ! gclog_or_tty->print_cr(" -- pick up another chunk at " PTR_FORMAT " (" SIZE_FORMAT ")", p2i(fc), chunkSize); } HeapWord* const fc_addr = (HeapWord*) fc; bool coalesce;
*** 7904,7921 **** HeapWord* const eob = ((HeapWord*)fc) + chunk_size; assert(_sp->used_region().contains(eob - 1), err_msg("eob = " PTR_FORMAT " eob-1 = " PTR_FORMAT " _limit = " PTR_FORMAT " out of bounds wrt _sp = [" PTR_FORMAT "," PTR_FORMAT ")" " when examining fc = " PTR_FORMAT "(" SIZE_FORMAT ")", ! eob, eob-1, _limit, _sp->bottom(), _sp->end(), fc, chunk_size)); if (eob >= _limit) { assert(eob == _limit || fc->is_free(), "Only a free chunk should allow us to cross over the limit"); if (CMSTraceSweeper) { gclog_or_tty->print_cr("_limit " PTR_FORMAT " reached or crossed by block " "[" PTR_FORMAT "," PTR_FORMAT ") in space " "[" PTR_FORMAT "," PTR_FORMAT ")", ! _limit, fc, eob, _sp->bottom(), _sp->end()); } // Return the storage we are tracking back into the free lists. if (CMSTraceSweeper) { gclog_or_tty->print_cr("Flushing ... "); } --- 7902,7919 ---- HeapWord* const eob = ((HeapWord*)fc) + chunk_size; assert(_sp->used_region().contains(eob - 1), err_msg("eob = " PTR_FORMAT " eob-1 = " PTR_FORMAT " _limit = " PTR_FORMAT " out of bounds wrt _sp = [" PTR_FORMAT "," PTR_FORMAT ")" " when examining fc = " PTR_FORMAT "(" SIZE_FORMAT ")", ! p2i(eob), p2i(eob-1), p2i(_limit), p2i(_sp->bottom()), p2i(_sp->end()), p2i(fc), chunk_size)); if (eob >= _limit) { assert(eob == _limit || fc->is_free(), "Only a free chunk should allow us to cross over the limit"); if (CMSTraceSweeper) { gclog_or_tty->print_cr("_limit " PTR_FORMAT " reached or crossed by block " "[" PTR_FORMAT "," PTR_FORMAT ") in space " "[" PTR_FORMAT "," PTR_FORMAT ")", ! p2i(_limit), p2i(fc), p2i(eob), p2i(_sp->bottom()), p2i(_sp->end())); } // Return the storage we are tracking back into the free lists. if (CMSTraceSweeper) { gclog_or_tty->print_cr("Flushing ... "); }
*** 7935,7945 **** assert(!_sp->verify_chunk_in_free_list(fc), "chunk should not be in free lists yet"); } if (CMSTraceSweeper) { gclog_or_tty->print_cr(" -- add free block " PTR_FORMAT " (" SIZE_FORMAT ") to free lists", ! chunk, size); } // A new free range is going to be starting. The current // free range has not been added to the free lists yet or // was removed so add it back. // If the current free range was coalesced, then the death --- 7933,7943 ---- assert(!_sp->verify_chunk_in_free_list(fc), "chunk should not be in free lists yet"); } if (CMSTraceSweeper) { gclog_or_tty->print_cr(" -- add free block " PTR_FORMAT " (" SIZE_FORMAT ") to free lists", ! p2i(chunk), size); } // A new free range is going to be starting. The current // free range has not been added to the free lists yet or // was removed so add it back. // If the current free range was coalesced, then the death
*** 8008,8018 **** #endif void SweepClosure::print_free_block_coalesced(FreeChunk* fc) const { if (CMSTraceSweeper) { gclog_or_tty->print_cr("Sweep:coal_free_blk " PTR_FORMAT " (" SIZE_FORMAT ")", ! fc, fc->size()); } } // CMSIsAliveClosure bool CMSIsAliveClosure::do_object_b(oop obj) { --- 8006,8016 ---- #endif void SweepClosure::print_free_block_coalesced(FreeChunk* fc) const { if (CMSTraceSweeper) { gclog_or_tty->print_cr("Sweep:coal_free_blk " PTR_FORMAT " (" SIZE_FORMAT ")", ! p2i(fc), fc->size()); } } // CMSIsAliveClosure bool CMSIsAliveClosure::do_object_b(oop obj) {
< prev index next >