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

Print this page
rev 6220 : [mq]: printffmt_size.gc.patch

*** 2892,2908 **** 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 0x%x 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 0x%x %s marked", addr, result ? "IS" : "is NOT"); return result; } else { gclog_or_tty->print_cr("Could not compute result"); return false; --- 2892,2908 ---- 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;
*** 4567,4577 **** startTimer(); waited++; } } if (PrintCMSStatistics > 0) { ! gclog_or_tty->print(" [%d iterations, %d waits, %d cards)] ", loops, waited, cumworkdone); } } CMSTokenSync x(true); // is cms thread if (_collectorState != Idling) { --- 4567,4577 ---- startTimer(); waited++; } } if (PrintCMSStatistics > 0) { ! gclog_or_tty->print(" [" SIZE_FORMAT " iterations, " SIZE_FORMAT " waits, " SIZE_FORMAT " cards)] ", loops, waited, cumworkdone); } } CMSTokenSync x(true); // is cms thread if (_collectorState != Idling) {
*** 4719,4729 **** for (numIter = 0, cumNumCards = lastNumCards = curNumCards = 0; numIter < CMSPrecleanIter; numIter++, lastNumCards = curNumCards, cumNumCards += curNumCards) { curNumCards = preclean_mod_union_table(_cmsGen, &smoac_cl); if (Verbose && PrintGCDetails) { ! gclog_or_tty->print(" (modUnionTable: %d cards)", curNumCards); } // Either there are very few dirty cards, so re-mark // pause will be small anyway, or our pre-cleaning isn't // that much faster than the rate at which cards are being // dirtied, so we might as well stop and re-mark since --- 4719,4729 ---- for (numIter = 0, cumNumCards = lastNumCards = curNumCards = 0; numIter < CMSPrecleanIter; numIter++, lastNumCards = curNumCards, cumNumCards += curNumCards) { curNumCards = preclean_mod_union_table(_cmsGen, &smoac_cl); if (Verbose && PrintGCDetails) { ! gclog_or_tty->print(" (modUnionTable: " SIZE_FORMAT " cards)", curNumCards); } // Either there are very few dirty cards, so re-mark // pause will be small anyway, or our pre-cleaning isn't // that much faster than the rate at which cards are being // dirtied, so we might as well stop and re-mark since
*** 4741,4751 **** preclean_klasses(&mrias_cl, _cmsGen->freelistLock()); curNumCards = preclean_card_table(_cmsGen, &smoac_cl); cumNumCards += curNumCards; if (PrintGCDetails && PrintCMSStatistics != 0) { ! gclog_or_tty->print_cr(" (cardTable: %d cards, re-scanned %d cards, %d iterations)", curNumCards, cumNumCards, numIter); } return cumNumCards; // as a measure of useful work done } --- 4741,4751 ---- preclean_klasses(&mrias_cl, _cmsGen->freelistLock()); curNumCards = preclean_card_table(_cmsGen, &smoac_cl); cumNumCards += curNumCards; if (PrintGCDetails && PrintCMSStatistics != 0) { ! gclog_or_tty->print_cr(" (cardTable: " SIZE_FORMAT " cards, re-scanned " SIZE_FORMAT " cards, " SIZE_FORMAT " iterations)", curNumCards, cumNumCards, numIter); } return cumNumCards; // as a measure of useful work done }
*** 8203,8213 **** #endif // PRODUCT void SweepClosure::initialize_free_range(HeapWord* freeFinger, bool freeRangeInFreeLists) { if (CMSTraceSweeper) { ! gclog_or_tty->print("---- Start free range at 0x%x with free block (%d)\n", freeFinger, freeRangeInFreeLists); } assert(!inFreeRange(), "Trampling existing free range"); set_inFreeRange(true); set_lastFreeRangeCoalesced(false); --- 8203,8213 ---- #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);
*** 8273,8286 **** 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 0x%x ("SIZE_FORMAT") " ! "[coalesced:"SIZE_FORMAT"]\n", freeFinger(), pointer_delta(addr, freeFinger()), ! lastFreeRangeCoalesced()); } } // help the iterator loop finish return pointer_delta(_sp->end(), addr); --- 8273,8286 ---- 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 return pointer_delta(_sp->end(), addr);
*** 8419,8429 **** } } 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 0x%x (%d)\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 --- 8419,8429 ---- } } 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
*** 8481,8491 **** 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 0x%x (%d) \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. --- 8481,8491 ---- 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.
*** 8574,8584 **** 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 0x%x (%d)", fc, chunkSize); } HeapWord* const fc_addr = (HeapWord*) fc; bool coalesce; --- 8574,8584 ---- 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;
*** 8703,8713 **** fc->set_size(size); 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 0x%x (%d) 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. --- 8703,8713 ---- fc->set_size(size); 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.