changeset 7415:68de83e1d912

8085965: VM hangs in C2Compiler Summary: CMSClassUnloadingEnabled and ExplicitGCInvokesConcurrentAndUnloadsClasses should be disabled when -Xnoclassgc is specified Reviewed-by: jmasa, kbarrett
author poonam
date Wed, 17 Jun 2015 05:56:43 -0700
parents 91a1be057e0a
children 9d514a2d02ff
files src/share/vm/memory/genMarkSweep.cpp src/share/vm/runtime/arguments.cpp
diffstat 2 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/memory/genMarkSweep.cpp	Thu Jun 04 23:11:44 2015 -0700
+++ b/src/share/vm/memory/genMarkSweep.cpp	Wed Jun 17 05:56:43 2015 -0700
@@ -211,7 +211,7 @@
                          false, // Younger gens are not roots.
                          true,  // activate StrongRootsScope
                          GenCollectedHeap::SO_None,
-                         GenCollectedHeap::StrongRootsOnly,
+                         ClassUnloading,
                          &follow_root_closure,
                          &follow_root_closure,
                          &follow_cld_closure);
--- a/src/share/vm/runtime/arguments.cpp	Thu Jun 04 23:11:44 2015 -0700
+++ b/src/share/vm/runtime/arguments.cpp	Wed Jun 17 05:56:43 2015 -0700
@@ -1372,6 +1372,12 @@
   if (!FLAG_IS_DEFAULT(CMSParPromoteBlocksToClaim) || !FLAG_IS_DEFAULT(OldPLABWeight)) {
     CFLS_LAB::modify_initialization(OldPLABSize, OldPLABWeight);
   }
+
+  if (!ClassUnloading) {
+    FLAG_SET_CMDLINE(bool, CMSClassUnloadingEnabled, false);
+    FLAG_SET_CMDLINE(bool, ExplicitGCInvokesConcurrentAndUnloadsClasses, false);
+  }
+
   if (PrintGCDetails && Verbose) {
     tty->print_cr("MarkStackSize: %uk  MarkStackSizeMax: %uk",
       (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));