src/hotspot/share/gc/shared/collectedHeap.inline.hpp
changeset 49982 9042ffe5b7fe
parent 49722 a47d1e21b3f1
child 50414 7efd1291e962
--- a/src/hotspot/share/gc/shared/collectedHeap.inline.hpp	Fri May 04 09:29:14 2018 +0200
+++ b/src/hotspot/share/gc/shared/collectedHeap.inline.hpp	Fri May 04 11:41:35 2018 +0200
@@ -45,13 +45,13 @@
                                                  HeapWord* obj_ptr) {
   post_allocation_setup_no_klass_install(klass, obj_ptr);
   oop obj = (oop)obj_ptr;
-#if ! INCLUDE_ALL_GCS
-  obj->set_klass(klass);
-#else
+#if (INCLUDE_G1GC || INCLUDE_CMSGC)
   // Need a release store to ensure array/class length, mark word, and
   // object zeroing are visible before setting the klass non-NULL, for
   // concurrent collectors.
   obj->release_set_klass(klass);
+#else
+  obj->set_klass(klass);
 #endif
 }