JDK-8061611 : Remove deprecated command line flags
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-10-21
  • Updated: 2017-05-17
  • Resolved: 2014-12-17
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 b45Fixed
Related Reports
Relates :  
Relates :  
Sub Tasks
JDK-8178146 :  
Description
In Arguments::parse_each_vm_init_arg() we log error messages for some options and suggest that they should not be used.

Here's what you get when you run this command line on a JDK 9 build:

$ java -XX:CMSParPromoteBlocksToClaim=10 -XX:ParCMSPromoteBlocksToClaim=10 -XX:ParallelGCOldGenAllocBufferSize=10 -XX:ParallelGCToSpaceAllocBufferSize=10 -XX:-UseGCTimeLimit -XX:+CMSPermGenSweepingEnabled -version

Please use -XX:OldPLABSize in place of -XX:CMSParPromoteBlocksToClaim in the future
Please use -XX:OldPLABSize in place of -XX:ParCMSPromoteBlocksToClaim in the future
Please use -XX:OldPLABSize in place of -XX:ParallelGCOldGenAllocBufferSize in the future
Please use -XX:YoungPLABSize in place of -XX:ParallelGCToSpaceAllocBufferSize in the future
Please use -XX:-UseGCOverheadLimit in place of -XX:-UseGCTimeLimit in the future
Please use CMSClassUnloadingEnabled in place of CMSPermGenSweepingEnabled in the future

java version "1.9.0-ea"
Java(TM) SE Runtime Environment (build 1.9.0-ea-b30)
Java HotSpot(TM) 64-Bit Server VM (build 1.9.0-ea-b30, mixed mode)


Most of these messages were introduced in 6u17 by this change:

CMS: better heuristics when combatting fragmentation
https://bugs.openjdk.java.net/browse/JDK-6631166

So, in effect the flags CMSParPromoteBlocksToClaim, ParCMSPromoteBlocksToClaim,ParallelGCOldGenAllocBufferSize, ParallelGCToSpaceAllocBufferSize, UseGCTimeLimit and CMSPermGenSweepingEnabled are deprecated. Thus we should be able to remove them by now.

UseGCTimeLimit and CMSPermGenSweepingEnabled have had this message since revision 0.

We also have options for TLE (which I never heard of but seems to be a per-desessor of TLAB):

    // The TLE options are for compatibility with 1.3 and will be
    // removed without notice in a future release.  These options
    // are not to be documented.
    } else if (match_option(option, "-XX:MaxTLERatio=", &tail)) {
      // No longer used.
    } else if (match_option(option, "-XX:+ResizeTLE", &tail)) {
      FLAG_SET_CMDLINE(bool, ResizeTLAB, true);
    } else if (match_option(option, "-XX:-ResizeTLE", &tail)) {
      FLAG_SET_CMDLINE(bool, ResizeTLAB, false);
    } else if (match_option(option, "-XX:+PrintTLE", &tail)) {
      FLAG_SET_CMDLINE(bool, PrintTLAB, true);
    } else if (match_option(option, "-XX:-PrintTLE", &tail)) {
      FLAG_SET_CMDLINE(bool, PrintTLAB, false);
    } else if (match_option(option, "-XX:TLEFragmentationRatio=", &tail)) {
      // No longer used.
    } else if (match_option(option, "-XX:TLESize=", &tail)) {
      julong long_tlab_size = 0;
      ArgsRange errcode = parse_memory_size(tail, &long_tlab_size, 1);
      if (errcode != arg_in_range) {
        jio_fprintf(defaultStream::error_stream(),
                    "Invalid TLAB size: %s\n", option->optionString);
        describe_range_error(errcode);
        return JNI_EINVAL;
      }
      FLAG_SET_CMDLINE(uintx, TLABSize, long_tlab_size);
    } else if (match_option(option, "-XX:TLEThreadRatio=", &tail)) {
      // No longer used.
    } else if (match_option(option, "-XX:+UseTLE", &tail)) {
      FLAG_SET_CMDLINE(bool, UseTLAB, true);
    } else if (match_option(option, "-XX:-UseTLE", &tail)) {
      FLAG_SET_CMDLINE(bool, UseTLAB, false);
    }

These flags don't print error messages, but clearly seem to have been unused and undocumented since 1.3. We should remove these too.
Comments
Enhancement handling the deprecations mentioned in the CCC for this issue.
06-04-2017

These are not documented anywhere (as far as I could tell).
05-12-2014

Removed options should also be removed from documentation (if they are or were documented).
29-10-2014