Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8061611

Remove deprecated command line flags

XMLWordPrintable

    • gc
    • b45

        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.

              drwhite Derek White
              brutisso Bengt Rutisson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: