< prev index next >
src/share/vm/gc/cms/concurrentMarkSweepGeneration.cpp
Print this page
*** 2240,2283 ****
}
return false;
}
#endif
- // Check reachability of the given heap address in CMS generation,
- // treating all other generations as roots.
- bool CMSCollector::is_cms_reachable(HeapWord* addr) {
- // We could "guarantee" below, rather than assert, but I'll
- // leave these as "asserts" so that an adventurous debugger
- // could try this in the product build provided some subset of
- // the conditions were met, provided they were interested in the
- // results and knew that the computation below wouldn't interfere
- // with other concurrent computations mutating the structures
- // being read or written.
- assert(SafepointSynchronize::is_at_safepoint(),
- "Else mutations in object graph will make answer suspect");
- assert(have_cms_token(), "Should hold cms token");
- 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;
- }
- }
-
-
void
CMSCollector::print_on_error(outputStream* st) {
CMSCollector* collector = ConcurrentMarkSweepGeneration::_collector;
if (collector != NULL) {
CMSBitMap* bitmap = &collector->_markBitMap;
--- 2240,2249 ----
< prev index next >