--- a/hotspot/src/share/vm/runtime/thread.cpp Wed Mar 27 19:21:18 2013 +0100
+++ b/hotspot/src/share/vm/runtime/thread.cpp Fri Mar 29 13:49:37 2013 -0700
@@ -3423,12 +3423,6 @@
// real raw monitor. VM is setup enough here for raw monitor enter.
JvmtiExport::transition_pending_onload_raw_monitors();
- if (VerifyBeforeGC &&
- Universe::heap()->total_collections() >= VerifyGCStartAt) {
- Universe::heap()->prepare_for_verify();
- Universe::verify(); // make sure we're starting with a clean slate
- }
-
// Fully start NMT
MemTracker::start();
@@ -3452,6 +3446,11 @@
}
assert (Universe::is_fully_initialized(), "not initialized");
+ if (VerifyBeforeGC && VerifyGCStartAt == 0) {
+ Universe::heap()->prepare_for_verify();
+ Universe::verify(); // make sure we're starting with a clean slate
+ }
+
EXCEPTION_MARK;
// At this point, the Universe is initialized, but we have not executed