8011872: Include Bit Map addresses in the hs_err files
Reviewed-by: brutisso, jmasa
This commit is contained in:
parent
0edccc9e61
commit
e96efdaa1a
@ -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());
|
||||
|
@ -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();
|
||||
|
@ -101,6 +101,10 @@ bool CMBitMapRO::covers(ReservedSpace heap_rs) const {
|
||||
}
|
||||
#endif
|
||||
|
||||
void CMBitMapRO::print_on_error(outputStream* st, const char* prefix) const {
|
||||
_bm.print_on_error(st, prefix);
|
||||
}
|
||||
|
||||
bool CMBitMap::allocate(ReservedSpace heap_rs) {
|
||||
_bmStartWord = (HeapWord*)(heap_rs.base());
|
||||
_bmWordSize = heap_rs.size()/HeapWordSize; // heap_rs.size() is in bytes
|
||||
@ -3277,6 +3281,13 @@ void ConcurrentMark::print_worker_threads_on(outputStream* st) const {
|
||||
}
|
||||
}
|
||||
|
||||
void ConcurrentMark::print_on_error(outputStream* st) const {
|
||||
st->print_cr("Marking Bits (Prev, Next): (CMBitMap*) " PTR_FORMAT ", (CMBitMap*) " PTR_FORMAT,
|
||||
_prevMarkBitMap, _nextMarkBitMap);
|
||||
_prevMarkBitMap->print_on_error(st, " Prev Bits: ");
|
||||
_nextMarkBitMap->print_on_error(st, " Next Bits: ");
|
||||
}
|
||||
|
||||
// We take a break if someone is trying to stop the world.
|
||||
bool ConcurrentMark::do_yield_check(uint worker_id) {
|
||||
if (should_yield()) {
|
||||
|
@ -113,6 +113,8 @@ class CMBitMapRO VALUE_OBJ_CLASS_SPEC {
|
||||
return res;
|
||||
}
|
||||
|
||||
void print_on_error(outputStream* st, const char* prefix) const;
|
||||
|
||||
// debugging
|
||||
NOT_PRODUCT(bool covers(ReservedSpace rs) const;)
|
||||
};
|
||||
@ -829,6 +831,8 @@ public:
|
||||
|
||||
void print_worker_threads_on(outputStream* st) const;
|
||||
|
||||
void print_on_error(outputStream* st) const;
|
||||
|
||||
// The following indicate whether a given verbose level has been
|
||||
// set. Notice that anything above stats is conditional to
|
||||
// _MARKING_VERBOSE_ having been set to 1
|
||||
|
@ -3427,6 +3427,15 @@ void G1CollectedHeap::print_extended_on(outputStream* st) const {
|
||||
heap_region_iterate(&blk);
|
||||
}
|
||||
|
||||
void G1CollectedHeap::print_on_error(outputStream* st) const {
|
||||
this->CollectedHeap::print_on_error(st);
|
||||
|
||||
if (_cm != NULL) {
|
||||
st->cr();
|
||||
_cm->print_on_error(st);
|
||||
}
|
||||
}
|
||||
|
||||
void G1CollectedHeap::print_gc_threads_on(outputStream* st) const {
|
||||
if (G1CollectedHeap::use_parallel_gc_threads()) {
|
||||
workers()->print_worker_threads_on(st);
|
||||
|
@ -1575,6 +1575,7 @@ public:
|
||||
virtual void verify(bool silent);
|
||||
virtual void print_on(outputStream* st) const;
|
||||
virtual void print_extended_on(outputStream* st) const;
|
||||
virtual void print_on_error(outputStream* st) const;
|
||||
|
||||
virtual void print_gc_threads_on(outputStream* st) const;
|
||||
virtual void gc_threads_do(ThreadClosure* tc) const;
|
||||
|
@ -173,6 +173,12 @@ public:
|
||||
void reset_counters();
|
||||
#endif // #ifndef PRODUCT
|
||||
|
||||
void print_on_error(outputStream* st) const {
|
||||
st->print_cr("Marking Bits: (ParMarkBitMap*) " PTR_FORMAT, this);
|
||||
_beg_bits.print_on_error(st, " Begin Bits: ");
|
||||
_end_bits.print_on_error(st, " End Bits: ");
|
||||
}
|
||||
|
||||
#ifdef ASSERT
|
||||
void verify_clear() const;
|
||||
inline void verify_bit(idx_t bit) const;
|
||||
|
@ -648,6 +648,15 @@ void ParallelScavengeHeap::print_on(outputStream* st) const {
|
||||
MetaspaceAux::print_on(st);
|
||||
}
|
||||
|
||||
void ParallelScavengeHeap::print_on_error(outputStream* st) const {
|
||||
this->CollectedHeap::print_on_error(st);
|
||||
|
||||
if (UseParallelOldGC) {
|
||||
st->cr();
|
||||
PSParallelCompact::print_on_error(st);
|
||||
}
|
||||
}
|
||||
|
||||
void ParallelScavengeHeap::gc_threads_do(ThreadClosure* tc) const {
|
||||
PSScavenge::gc_task_manager()->threads_do(tc);
|
||||
}
|
||||
|
@ -220,6 +220,7 @@ class ParallelScavengeHeap : public CollectedHeap {
|
||||
|
||||
void prepare_for_verify();
|
||||
virtual void print_on(outputStream* st) const;
|
||||
virtual void print_on_error(outputStream* st) const;
|
||||
virtual void print_gc_threads_on(outputStream* st) const;
|
||||
virtual void gc_threads_do(ThreadClosure* tc) const;
|
||||
virtual void print_tracing_info() const;
|
||||
|
@ -165,6 +165,10 @@ void SplitInfo::verify_clear()
|
||||
#endif // #ifdef ASSERT
|
||||
|
||||
|
||||
void PSParallelCompact::print_on_error(outputStream* st) {
|
||||
_mark_bitmap.print_on_error(st);
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
const char* PSParallelCompact::space_names[] = {
|
||||
"old ", "eden", "from", "to "
|
||||
|
@ -1163,6 +1163,8 @@ class PSParallelCompact : AllStatic {
|
||||
// Time since last full gc (in milliseconds).
|
||||
static jlong millis_since_last_gc();
|
||||
|
||||
static void print_on_error(outputStream* st);
|
||||
|
||||
#ifndef PRODUCT
|
||||
// Debugging support.
|
||||
static const char* space_names[last_space_id];
|
||||
|
@ -567,6 +567,14 @@ class CollectedHeap : public CHeapObj<mtInternal> {
|
||||
print_on(st);
|
||||
}
|
||||
|
||||
virtual void print_on_error(outputStream* st) const {
|
||||
st->print_cr("Heap:");
|
||||
print_extended_on(st);
|
||||
st->cr();
|
||||
|
||||
_barrier_set->print_on(st);
|
||||
}
|
||||
|
||||
// Print all GC threads (other than the VM thread)
|
||||
// used by this heap.
|
||||
virtual void print_gc_threads_on(outputStream* st) const = 0;
|
||||
|
@ -1133,6 +1133,17 @@ void GenCollectedHeap::print_gc_threads_on(outputStream* st) const {
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
}
|
||||
|
||||
void GenCollectedHeap::print_on_error(outputStream* st) const {
|
||||
this->CollectedHeap::print_on_error(st);
|
||||
|
||||
#if INCLUDE_ALL_GCS
|
||||
if (UseConcMarkSweepGC) {
|
||||
st->cr();
|
||||
CMSCollector::print_on_error(st);
|
||||
}
|
||||
#endif // INCLUDE_ALL_GCS
|
||||
}
|
||||
|
||||
void GenCollectedHeap::print_tracing_info() const {
|
||||
if (TraceGen0Time) {
|
||||
get_gen(0)->print_summary_info();
|
||||
|
@ -344,6 +344,7 @@ public:
|
||||
virtual void print_gc_threads_on(outputStream* st) const;
|
||||
virtual void gc_threads_do(ThreadClosure* tc) const;
|
||||
virtual void print_tracing_info() const;
|
||||
virtual void print_on_error(outputStream* st) const;
|
||||
|
||||
// PrintGC, PrintGCDetails support
|
||||
void print_heap_change(size_t prev_used) const;
|
||||
|
@ -516,6 +516,10 @@ BitMap::idx_t BitMap::count_one_bits() const {
|
||||
return sum;
|
||||
}
|
||||
|
||||
void BitMap::print_on_error(outputStream* st, const char* prefix) const {
|
||||
st->print_cr("%s[" PTR_FORMAT ", " PTR_FORMAT ")",
|
||||
prefix, map(), (char*)map() + (size() >> LogBitsPerByte));
|
||||
}
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
||||
|
@ -262,6 +262,7 @@ class BitMap VALUE_OBJ_CLASS_SPEC {
|
||||
bool is_full() const;
|
||||
bool is_empty() const;
|
||||
|
||||
void print_on_error(outputStream* st, const char* prefix) const;
|
||||
|
||||
#ifndef PRODUCT
|
||||
public:
|
||||
|
@ -685,13 +685,7 @@ void VMError::report(outputStream* st) {
|
||||
STEP(190, "(printing heap information)" )
|
||||
|
||||
if (_verbose && Universe::is_fully_initialized()) {
|
||||
// Print heap information before vm abort. As we'd like as much
|
||||
// information as possible in the report we ask for the
|
||||
// extended (i.e., more detailed) version.
|
||||
Universe::print_on(st, true /* extended */);
|
||||
st->cr();
|
||||
|
||||
Universe::heap()->barrier_set()->print_on(st);
|
||||
Universe::heap()->print_on_error(st);
|
||||
st->cr();
|
||||
|
||||
st->print_cr("Polling page: " INTPTR_FORMAT, os::get_polling_page());
|
||||
|
Loading…
x
Reference in New Issue
Block a user