8003820: Deprecate untested and rarely used GC combinations
authorbrutisso
Fri, 04 Jan 2013 11:10:17 +0100
changeset 15092 9228d92ed521
parent 15091 826cff1f58f5
child 15093 18cb2c160db1
8003820: Deprecate untested and rarely used GC combinations Summary: Log warning messages for DefNew+CMS and ParNew+SerialOld Reviewed-by: ysr, jwilhelm, jcoomes
hotspot/src/share/vm/runtime/arguments.cpp
hotspot/src/share/vm/runtime/arguments.hpp
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Sun Dec 30 08:47:52 2012 +0100
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Fri Jan 04 11:10:17 2013 +0100
@@ -1778,6 +1778,20 @@
   return status;
 }
 
+void Arguments::check_deprecated_gcs() {
+  if (UseConcMarkSweepGC && !UseParNewGC) {
+    warning("Using the DefNew young collector with the CMS collector is deprecated "
+        "and will likely be removed in a future release");
+  }
+
+  if (UseParNewGC && !UseConcMarkSweepGC) {
+    // !UseConcMarkSweepGC means that we are using serial old gc. Unfortunately we don't
+    // set up UseSerialGC properly, so that can't be used in the check here.
+    warning("Using the ParNew young collector with the Serial old collector is deprecated "
+        "and will likely be removed in a future release");
+  }
+}
+
 // Check stack pages settings
 bool Arguments::check_stack_pages()
 {
@@ -3242,6 +3256,7 @@
   } else if (UseG1GC) {
     set_g1_gc_flags();
   }
+  check_deprecated_gcs();
 #endif // INCLUDE_ALTERNATE_GCS
 
 #ifdef SERIALGC
--- a/hotspot/src/share/vm/runtime/arguments.hpp	Sun Dec 30 08:47:52 2012 +0100
+++ b/hotspot/src/share/vm/runtime/arguments.hpp	Fri Jan 04 11:10:17 2013 +0100
@@ -413,6 +413,7 @@
   static jint adjust_after_os();
   // Check for consistency in the selection of the garbage collector.
   static bool check_gc_consistency();
+  static void check_deprecated_gcs();
   // Check consistecy or otherwise of VM argument settings
   static bool check_vm_args_consistency();
   // Check stack pages settings