JDK-8166461 : Deprecate UseAutoGCSelectPolicy
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2016-09-21
  • Updated: 2017-05-17
  • Resolved: 2016-10-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b143Fixed
Sub Tasks
JDK-8167494 :  
JDK-8170638 :  
JDK-8173698 :  
Description
The current implementation of UseAutoGCSelectPolicy selects between CMS (the low pause GC) and G1 (the default GC).  CMS is being deprecated in favor of G1 (as the new low pause collector).  It does not make much sense to have UseAutoGCSelectPolicy select between two low pause collectors since the original intent was to select between the throughput collector and the low  pause collector.

The risk that this change will introduce a bug is very low.

The change is this 1 line change that adds UseAutoGCSelectPolicy to a list of flags deprecated in jdk9.

 --- a/src/share/vm/runtime/arguments.cpp
+++ b/src/share/vm/runtime/arguments.cpp
@@ -381,6 +381,7 @@
   // --- Non-alias flags - sorted by obsolete_in then expired_in:
   { "MaxGCMinorPauseMillis",        JDK_Version::jdk(8), JDK_Version::undefined(), JDK_Version::undefined() },
   { "UseParNewGC",                  JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) },
+  { "UseAutoGCSelectPolicy",        JDK_Version::jdk(9), JDK_Version::undefined(), JDK_Version::jdk(10) },
   { "ConvertSleepToYield",          JDK_Version::jdk(9), JDK_Version::jdk(10),     JDK_Version::jdk(11) },
   { "ConvertYieldToSleep",          JDK_Version::jdk(9), JDK_Version::jdk(10),     JDK_Version::jdk(11) },

plus a test for the change.  If approved by 7Oct2016, it could be completed by 14Oct2016.
Comments
Suggested release note comment: The flag UseAutoGCSelectPolicy has been deprecated and will be removed in the JDK 10 release.
26-10-2016

FC Extension Request Justification: AutoGCSelectPauseMillis also should be deprecated together however it is missed from this CR and CCC request. I filed a new CR(JDK-8167494) and CCC request but CCC approval and code review done will take some time. In addition, jdk9/hs repository is closed for now which could delay the commit too. Proposed due date: Nov-10-2016 (+ 2 weeks)
12-10-2016

Test for UseAutoGCSelectPolicy deprecation
29-09-2016

FC Extension Request JDK-8162744 deprecates the CMS garbage collector (UseConcMarkSweepGC) for jdk9. When the option UseAutoGCSelectPolicy is used, the UseConcMarkSweepGC could be turned on (depending on the sizes of MaxGCPauseMillis and AutoGCSelectPauseMillis). It did not seem to be a reasonable policy to turn on a deprecated garbage collector. Additionally, if UseAutoGCSelectPolicy chooses UseConcMarkSweepGC, it would require that a deprecation message be emitted since the goal of 8162744 is to make UseConcMarkSweepGC deprecated. A clean solution to this problem is to deprecate UseAutoGCSelectPolicy which does not seem to be heavily used.
28-09-2016

Deprecating UseAutoGCSelectPolicy still leaves the flag available for 1 major release. It should do something sane if it is still going to exist. The original intent was to select between the throughput collector (ParallelGC) and the low pause collector (CMS). When G1 was made the default collector, the UseAutoGCSelectPolicy was make to select G1 in place of ParallelGC. For the release where UseAutoGCSelectPolicy is deprecated but still supported, it would make sense to revert to the original intent and select between the throughput collector (ParallelGC) and the low pause collector (now G1).
21-09-2016