src/hotspot/share/memory/universe.cpp
changeset 51491 187c84a5efe1
parent 51329 9c68699bebe5
child 51530 1f0b605bdc28
--- a/src/hotspot/share/memory/universe.cpp	Wed Aug 22 16:06:51 2018 +0100
+++ b/src/hotspot/share/memory/universe.cpp	Tue Aug 14 09:59:37 2018 -0700
@@ -517,8 +517,11 @@
   // that the number of objects allocated at this point is very small.
   assert(SystemDictionary::Class_klass_loaded(), "java.lang.Class should be loaded");
   HandleMark hm(THREAD);
-  // Cache the start of the static fields
-  InstanceMirrorKlass::init_offset_of_static_fields();
+
+  if (!UseSharedSpaces) {
+    // Cache the start of the static fields
+    InstanceMirrorKlass::init_offset_of_static_fields();
+  }
 
   GrowableArray <Klass*>* list = java_lang_Class::fixup_mirror_list();
   int list_length = list->length();