hotspot/src/share/vm/runtime/thread.cpp
changeset 47103 a993ec29ec75
parent 47089 27050b653624
child 47106 bed18a111b90
--- a/hotspot/src/share/vm/runtime/thread.cpp	Wed Aug 30 19:18:22 2017 -0400
+++ b/hotspot/src/share/vm/runtime/thread.cpp	Mon Aug 28 15:34:04 2017 -0700
@@ -3717,14 +3717,6 @@
 
   Thread* THREAD = Thread::current();
 
-  // At this point, the Universe is initialized, but we have not executed
-  // any byte code.  Now is a good time (the only time) to dump out the
-  // internal state of the JVM for sharing.
-  if (DumpSharedSpaces) {
-    MetaspaceShared::preload_and_dump(CHECK_JNI_ERR);
-    ShouldNotReachHere();
-  }
-
   // Always call even when there are not JVMTI environments yet, since environments
   // may be attached late and JVMTI must track phases of VM execution
   JvmtiExport::enter_early_start_phase();
@@ -3887,6 +3879,12 @@
 #ifdef ASSERT
   _vm_complete = true;
 #endif
+
+  if (DumpSharedSpaces) {
+    MetaspaceShared::preload_and_dump(CHECK_JNI_ERR);
+    ShouldNotReachHere();
+  }
+
   return JNI_OK;
 }