src/share/vm/runtime/arguments.cpp

Print this page
rev 3905 : 8001424: G1: Rename certain G1-specific flags
Summary: Rename G1DefaultMinNewGenPercent, G1DefaultMaxNewGenPercent, and G1OldCSetRegionLiveThresholdPercent to G1NewSizePercent, G1MaxNewSizePercent, and G1MixedGCLiveThresholdPercent respectively. Continue, however, to accept the previous names. If both are specified, the new name takes precedence.
Reviewed-by:

@@ -1515,10 +1515,26 @@
     // (especially small GC stress tests that the main thing they do
     // is allocation). We might consider increase it further.
     FLAG_SET_DEFAULT(GCTimeRatio, 9);
   }
 
+#ifndef SERIALGC
+  // The following flag names have been replaced. Accept the previous
+  // name for a short while, but set the new flag to the value set
+  // by the user. New flag names take precedence though.
+  if (FLAG_IS_DEFAULT(G1NewSizePercent) && G1DefaultMinNewGenPercent > 0) {
+    FLAG_SET_CMDLINE(uintx, G1NewSizePercent, G1DefaultMinNewGenPercent);
+  }
+  if (FLAG_IS_DEFAULT(G1MaxNewSizePercent) && G1DefaultMaxNewGenPercent > 0) {
+    FLAG_SET_CMDLINE(uintx, G1MaxNewSizePercent, G1DefaultMaxNewGenPercent);
+  }
+  if (FLAG_IS_DEFAULT(G1MixedGCLiveThresholdPercent) &&
+      G1OldCSetRegionLiveThresholdPercent > 0) {
+    FLAG_SET_CMDLINE(uintx, G1MaxNewSizePercent, G1OldCSetRegionLiveThresholdPercent);
+  }
+#endif
+
   if (PrintGCDetails && Verbose) {
     tty->print_cr("MarkStackSize: %uk  MarkStackSizeMax: %uk",
       MarkStackSize / K, MarkStackSizeMax / K);
     tty->print_cr("ConcGCThreads: %u", ConcGCThreads);
   }