JDK-8027132 : Print deprecation warning message for the flags controlling the CMS foreground collector
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs25
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-10-23
  • Updated: 2017-05-17
  • Resolved: 2013-10-29
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 Availabitlity Release.

To download the current JDK release, click here.
JDK 8 Other
8Fixed hs25Fixed
Related Reports
Relates :  
Description
Normally CMS reverts to the SerialOld GC when it needs to do a full GC. There is a mode in CMS to instead use the "foreground collector".  This is a single threaded stop-the-world mode which completes an ongoing concurrent CMS collection (a normal "background" collection in CMS).

The foreground collector is very slow and to enable it two flags are required. First -XX:-UseCMSCompactAtFullCollection needs to be added to the command line to turn off the SerialOld collector, then -XX:CMSFullGCsBeforeCompaction needs to be set to a value greater than 0.

The foreground collector adds a lot of complexity to the CMS code but has few (if any?) use cases. Thus, it would be good to remove it to simplify the code. In order to remove it we need to deprecate it first. This bug report is only about deprecating the flags to allow us to remove the foreground collector in a future release.

The following flags should log a warning message that they are deprecated, but the VM should still continue to work when they are used:

UseCMSCompactAtFullCollection
CMSFullGCsBeforeCompaction
UseCMSCollectionPassing
Comments
Release note added to the "Deprecated APIs" section of the "Compatibility Guide" chapter.
2014-02-12

Suggested release note: The foreground collector in CMS has been deprecated and will likely be removed in a future release. It is recommended to use G1 or regular CMS instead.
2014-01-29