changeset 8773:3c2ea5da6afd jdk8u45-b37

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 79b13c9a93e8
children 48603bfe8438
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	Mon Dec 01 15:24:56 2014 +0100
+++ 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	Mon Dec 01 15:24:56 2014 +0100
+++ 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));