提交 4d5b7476 编写于 作者: J johnc

8000831: Heap verification output incorrect/incomplete

Summary: Restore non-silent output of heap verification.
Reviewed-by: ysr, brutisso, jmasa
上级 a790fe7c
......@@ -2395,7 +2395,7 @@ void CMSCollector::collect_in_foreground(bool clear_all_soft_refs) {
if (VerifyBeforeGC &&
GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
Universe::verify(true);
Universe::verify();
}
// Snapshot the soft reference policy to be used in this collection cycle.
......@@ -2419,7 +2419,7 @@ void CMSCollector::collect_in_foreground(bool clear_all_soft_refs) {
if (VerifyDuringGC &&
GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
gclog_or_tty->print("Verify before initial mark: ");
Universe::verify(true);
Universe::verify();
}
{
bool res = markFromRoots(false);
......@@ -2431,7 +2431,7 @@ void CMSCollector::collect_in_foreground(bool clear_all_soft_refs) {
if (VerifyDuringGC &&
GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
gclog_or_tty->print("Verify before re-mark: ");
Universe::verify(true);
Universe::verify();
}
checkpointRootsFinal(false, clear_all_soft_refs,
init_mark_was_synchronous);
......@@ -2443,7 +2443,7 @@ void CMSCollector::collect_in_foreground(bool clear_all_soft_refs) {
if (VerifyDuringGC &&
GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
gclog_or_tty->print("Verify before sweep: ");
Universe::verify(true);
Universe::verify();
}
sweep(false);
assert(_collectorState == Resizing, "Incorrect state");
......@@ -2459,7 +2459,7 @@ void CMSCollector::collect_in_foreground(bool clear_all_soft_refs) {
if (VerifyDuringGC &&
GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
gclog_or_tty->print("Verify before reset: ");
Universe::verify(true);
Universe::verify();
}
reset(false);
assert(_collectorState == Idling, "Collector state should "
......@@ -2486,7 +2486,7 @@ void CMSCollector::collect_in_foreground(bool clear_all_soft_refs) {
if (VerifyAfterGC &&
GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
Universe::verify(true);
Universe::verify();
}
if (TraceCMSState) {
gclog_or_tty->print_cr("CMS Thread " INTPTR_FORMAT
......@@ -5668,7 +5668,7 @@ void CMSCollector::do_remark_non_parallel() {
if (VerifyDuringGC &&
GenCollectedHeap::heap()->total_collections() >= VerifyGCStartAt) {
HandleMark hm; // Discard invalid handles created during verification
Universe::verify(true);
Universe::verify();
}
{
TraceTime t("root rescan", PrintGCDetails, false, gclog_or_tty);
......
......@@ -64,7 +64,7 @@ void VM_CMS_Operation::verify_before_gc() {
FreelistLocker x(_collector);
MutexLockerEx y(_collector->bitMapLock(), Mutex::_no_safepoint_check_flag);
Universe::heap()->prepare_for_verify();
Universe::verify(true);
Universe::verify();
}
}
......@@ -74,7 +74,7 @@ void VM_CMS_Operation::verify_after_gc() {
HandleMark hm;
FreelistLocker x(_collector);
MutexLockerEx y(_collector->bitMapLock(), Mutex::_no_safepoint_check_flag);
Universe::verify(true);
Universe::verify();
}
}
......
......@@ -139,7 +139,7 @@ bool PSMarkSweep::invoke_no_policy(bool clear_all_softrefs) {
if (VerifyBeforeGC && heap->total_collections() >= VerifyGCStartAt) {
HandleMark hm; // Discard invalid handles created during verification
gclog_or_tty->print(" VerifyBeforeGC:");
Universe::verify(true);
Universe::verify();
}
// Verify object start arrays
......@@ -341,7 +341,7 @@ bool PSMarkSweep::invoke_no_policy(bool clear_all_softrefs) {
if (VerifyAfterGC && heap->total_collections() >= VerifyGCStartAt) {
HandleMark hm; // Discard invalid handles created during verification
gclog_or_tty->print(" VerifyAfterGC:");
Universe::verify(false);
Universe::verify();
}
// Re-verify object start arrays
......
......@@ -983,7 +983,7 @@ void PSParallelCompact::pre_compact(PreGCValues* pre_gc_values)
if (VerifyBeforeGC && heap->total_collections() >= VerifyGCStartAt) {
HandleMark hm; // Discard invalid handles created during verification
gclog_or_tty->print(" VerifyBeforeGC:");
Universe::verify(true);
Universe::verify();
}
// Verify object start arrays
......@@ -2184,7 +2184,7 @@ bool PSParallelCompact::invoke_no_policy(bool maximum_heap_compaction) {
if (VerifyAfterGC && heap->total_collections() >= VerifyGCStartAt) {
HandleMark hm; // Discard invalid handles created during verification
gclog_or_tty->print(" VerifyAfterGC:");
Universe::verify(false);
Universe::verify();
}
// Re-verify object start arrays
......
......@@ -315,7 +315,7 @@ bool PSScavenge::invoke_no_policy() {
if (VerifyBeforeGC && heap->total_collections() >= VerifyGCStartAt) {
HandleMark hm; // Discard invalid handles created during verification
gclog_or_tty->print(" VerifyBeforeGC:");
Universe::verify(true);
Universe::verify();
}
{
......@@ -639,7 +639,7 @@ bool PSScavenge::invoke_no_policy() {
if (VerifyAfterGC && heap->total_collections() >= VerifyGCStartAt) {
HandleMark hm; // Discard invalid handles created during verification
gclog_or_tty->print(" VerifyAfterGC:");
Universe::verify(false);
Universe::verify();
}
heap->print_heap_after_gc();
......
......@@ -447,7 +447,7 @@ void GenCollectedHeap::do_collection(bool full,
prepared_for_verification = true;
}
gclog_or_tty->print(" VerifyBeforeGC:");
Universe::verify(true);
Universe::verify();
}
COMPILER2_PRESENT(DerivedPointerTable::clear());
......@@ -519,7 +519,7 @@ void GenCollectedHeap::do_collection(bool full,
total_collections() >= VerifyGCStartAt) {
HandleMark hm; // Discard invalid handles created during verification
gclog_or_tty->print(" VerifyAfterGC:");
Universe::verify(false);
Universe::verify();
}
if (PrintGCDetails) {
......
......@@ -403,8 +403,14 @@ class Universe: AllStatic {
// Debugging
static bool verify_in_progress() { return _verify_in_progress; }
static void verify(bool silent = false,
VerifyOption option = VerifyOption_Default );
static void verify(bool silent, VerifyOption option);
static void verify(bool silent) {
verify(silent, VerifyOption_Default /* option */);
}
static void verify() {
verify(false /* silent */);
}
static int verify_count() { return _verify_count; }
// The default behavior is to call print_on() on gclog_or_tty.
static void print();
......
......@@ -477,7 +477,7 @@ extern "C" void verify() {
}
// Ensure Eden top is correct before verification
Universe::heap()->prepare_for_verify();
Universe::verify(true);
Universe::verify();
if (!safe) SafepointSynchronize::set_is_not_at_safepoint();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册