8011872: Include Bit Map addresses in the hs_err files

Reviewed-by: brutisso, jmasa
This commit is contained in:
Stefan Karlsson 2013-04-10 14:26:49 +02:00
parent 0edccc9e61
commit e96efdaa1a
17 changed files with 98 additions and 7 deletions

View file

@ -2809,6 +2809,23 @@ bool CMSCollector::is_cms_reachable(HeapWord* addr) {
}
}
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: ");
}
}
////////////////////////////////////////////////////////
// CMS Verification Support
////////////////////////////////////////////////////////
@ -6531,6 +6548,10 @@ void CMSBitMap::dirty_range_iterate_clear(MemRegion mr, MemRegionClosure* cl) {
}
}
void CMSBitMap::print_on_error(outputStream* st, const char* prefix) const {
_bm.print_on_error(st, prefix);
}
#ifndef PRODUCT
void CMSBitMap::assert_locked() const {
CMSLockVerifier::assert_locked(lock());

View file

@ -151,6 +151,8 @@ class CMSBitMap VALUE_OBJ_CLASS_SPEC {
size_t heapWordToOffset(HeapWord* addr) const;
size_t heapWordDiffToOffsetDiff(size_t diff) const;
void print_on_error(outputStream* st, const char* prefix) const;
// debugging
// is this address range covered by the bit-map?
NOT_PRODUCT(
@ -984,6 +986,8 @@ class CMSCollector: public CHeapObj<mtGC> {
CMSAdaptiveSizePolicy* size_policy();
CMSGCAdaptivePolicyCounters* gc_adaptive_policy_counters();
static void print_on_error(outputStream* st);
// debugging
void verify();
bool verify_after_remark();