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

Obsolete and expired flags for JDK 10 need to be removed and related tests updated

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 10
    • Fix Version/s: 10
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b01

      Description

      If we bump the JDK version to 10 we trigger the warnings related to flags that should be removed in 10:

      Java HotSpot(TM) 64-Bit Server VM warning: Global variable for expired flag entry "AutoGCSelectPauseMillis" should be removed
      Java HotSpot(TM) 64-Bit Server VM warning: Global variable for expired flag entry "UseAutoGCSelectPolicy" should be removed
      Java HotSpot(TM) 64-Bit Server VM warning: Global variable for expired flag entry "UseParNewGC" should be removed
      Java HotSpot(TM) 64-Bit Server VM warning: Global variable for expired flag entry "ExplicitGCInvokesConcurrentAndUnloadsClasses" should be removed
      Java HotSpot(TM) 64-Bit Server VM warning: Global variable for obsolete special flag entry "ConvertSleepToYield" should be removed
      Java HotSpot(TM) 64-Bit Server VM warning: Global variable for obsolete special flag entry "ConvertYieldToSleep" should be removed

      We then trip an assert that makes it impossible to build JDK 10 without first fixing this issue (though the assert should be removed as a seperate issue).

      We need to delete the table entries, delete the global variables and delete all code that uses the non-default value of the global variable being deleted (if not already ignored).

        Issue Links

          Activity

          Hide
          dholmes David Holmes added a comment -
          There are also tests that need to be updated because they check for deprecated flag messages, which will no longer be present.

          E.g.

          gc/arguments/TestExplicitGCInvokesConcurrentAndUnloadsClasses.java
          gc/startup_warnings/TestDefNewCMS.java
          gc/startup_warnings/TestParNewSerialOld.java
          gc/startup_warnings/TestUseAutoGCSelectPolicy.java

          runtime/CommandLine/ObsoleteFlagErrorMessage.java
          runtime/CommandLine/PermGenFlagsTest.java
          runtime/CommandLine/VMAliasOptions.java
          runtime/CommandLine/VMDeprecatedOptions.java
          runtime/6819213/TestBootNativeLibraryPath.java
          Show
          dholmes David Holmes added a comment - There are also tests that need to be updated because they check for deprecated flag messages, which will no longer be present. E.g. gc/arguments/TestExplicitGCInvokesConcurrentAndUnloadsClasses.java gc/startup_warnings/TestDefNewCMS.java gc/startup_warnings/TestParNewSerialOld.java gc/startup_warnings/TestUseAutoGCSelectPolicy.java runtime/CommandLine/ObsoleteFlagErrorMessage.java runtime/CommandLine/PermGenFlagsTest.java runtime/CommandLine/VMAliasOptions.java runtime/CommandLine/VMDeprecatedOptions.java runtime/6819213/TestBootNativeLibraryPath.java
          Hide
          dholmes David Holmes added a comment -
          There are many flags that have expired in 10 and need to be deleted. This will handle them all, not just those for which warnings are now being issued.
          Show
          dholmes David Holmes added a comment - There are many flags that have expired in 10 and need to be deleted. This will handle them all, not just those for which warnings are now being issued.
          Hide
          dholmes David Holmes added a comment -
          Flag list for grepping convenience:

          AutoGCSelectPauseMillis UseAutoGCSelectPolicy UseParNewGC ExplicitGCInvokesConcurrentAndUnloadsClasses ConvertSleepToYield ConvertYieldToSleep CMSMarkStackSizeMax CMSMarkStackSize G1MarkStackSize ParallelMarkingThreads ParallelCMSThreads UseOldInlining SafepointPollOffset UseBoundThreads DefaultThreadPriority NoYieldsInMicrolock BackEdgeThreshold UseNewReflection ReflectionWrapResolutionErrors VerifyReflectionBytecodes AutoShutdownNMT NmethodSweepFraction NmethodSweepCheckInterval CodeCacheMinimumFreeSpace UseFastAccessorMethods UseFastEmptyMethods UseCompilerSafepoints AdaptiveSizePausePolicy ParallelGCRetainPLAB ThreadSafetyMargin LazyBootClassLoader StarvationMonitorInterval PreInflateSpin JNIDetachReleasesMonitors UseAltSigs SegmentedHeapDumpThreshold PrintOopAddress PermSize MaxPermSize
          Show
          dholmes David Holmes added a comment - Flag list for grepping convenience: AutoGCSelectPauseMillis UseAutoGCSelectPolicy UseParNewGC ExplicitGCInvokesConcurrentAndUnloadsClasses ConvertSleepToYield ConvertYieldToSleep CMSMarkStackSizeMax CMSMarkStackSize G1MarkStackSize ParallelMarkingThreads ParallelCMSThreads UseOldInlining SafepointPollOffset UseBoundThreads DefaultThreadPriority NoYieldsInMicrolock BackEdgeThreshold UseNewReflection ReflectionWrapResolutionErrors VerifyReflectionBytecodes AutoShutdownNMT NmethodSweepFraction NmethodSweepCheckInterval CodeCacheMinimumFreeSpace UseFastAccessorMethods UseFastEmptyMethods UseCompilerSafepoints AdaptiveSizePausePolicy ParallelGCRetainPLAB ThreadSafetyMargin LazyBootClassLoader StarvationMonitorInterval PreInflateSpin JNIDetachReleasesMonitors UseAltSigs SegmentedHeapDumpThreshold PrintOopAddress PermSize MaxPermSize
          Hide
          dholmes David Holmes added a comment - - edited
          Non-aliased flags:

          AutoGCSelectPauseMillis (def: 5000) has now expired and is removed completely from the source code.

          UseAutoGCSelectPolicy (def: false) has now expired and is removed completely from the source code as-if replaced by false.

          UseParNewGC (def: false) expired. However it is expected/required to be true whenever UseConcMarkSweepGC is true, and UseConcMarkSweepGC has not been deprecated. So we must remove all uses as-if it were true, not false.

          ExplicitGCInvokesConcurrentAndUnloadsClasses (def: false) has now expired and is removed completely from the source as-if replaced by false.

          ConvertSleepToYield (def: true) is now obsolete. It is moved to the obsolete table and is removed completely from the source code as-if replaced by true.

          ConvertYieldToSleep (def: false) is now obsolete. It is moved to the obsolete table and is removed completely from the source code as-if replaced by false.

          As a result of the above MinSleepInterval is no longer used (it should have also been deprecated in 9) and is also marked as obsolete.

          ---

          Aliased options that have expired:

          CMSMarkStackSizeMax is an alias and has expired. It is removed from the alias and obsolete flag tables.

          CMSMarkStackSize is an alias and has expired. It is removed from the alias and obsolete flag tables.

          G1MarkStackSize is an alias and has expired. It is removed from the alias and obsolete flag tables.

          ParallelMarkingThreads is an alias and has expired. It is removed from the alias and obsolete flag tables.

          ParallelCMSThreads is an alias and has expired. It is removed from the alias and obsolete flag tables.

          ---

          The following flags all expire in 10 and exist (except where noted) only in the special-flag table (from which they are now removed). Any other uses of the flag are removed.

          UseOldInlining
          SafepointPollOffset (defined in ./cpu/aarch64/vm/c1_globals_aarch64.hpp)
          UseBoundThreads (comments in os_solaris.cpp)
          DefaultThreadPriority
          NoYieldsInMicrolock
          BackEdgeThreshold (defined in c1/2_globals_aarch64.hpp)
          UseNewReflection
          ReflectionWrapResolutionErrors
          VerifyReflectionBytecodes
          AutoShutdownNMT
          NmethodSweepFraction
          NmethodSweepCheckInterval
          CodeCacheMinimumFreeSpace
          UseFastAccessorMethods (non-ZERO only: still valid flag on Zero builds)
          UseFastEmptyMethods (non-ZERO only: still valid flag on Zero builds)
          UseCompilerSafepoints
          AdaptiveSizePausePolicy
          ParallelGCRetainPLAB
          ThreadSafetyMargin
          LazyBootClassLoader
          StarvationMonitorInterval
          PreInflateSpin
          JNIDetachReleasesMonitors
          UseAltSigs
          SegmentedHeapDumpThreshold
          PrintOopAddress (comment in method.cpp)
          PermSize
          MaxPermSize

          ---

          Tests modified:

          runtime/CommandLine/
            ObsoleteFlagErrorMessage.java
            VMDeprecatedOptions.java
            VMAliasOptions.java

          gc/arguments/TestSelectDefaultGC.java

          ---

          Tests removed (TEST.groups updated as needed):

          gc/startup_warnings/
            TestUseAutoGCSelectPolicy.java
            TestParNewSerialOld.java
            TestParNewCMS.java
            TestDefNewCMS.java
          gc/arguments/TestExplicitGCInvokesConcurrentAndUnloadsClasses.java

          runtime/CommandLine/PermGenFlagsTest.java
          runtime/NMT/AutoshutdownNMT.java
          Show
          dholmes David Holmes added a comment - - edited Non-aliased flags: AutoGCSelectPauseMillis (def: 5000) has now expired and is removed completely from the source code. UseAutoGCSelectPolicy (def: false) has now expired and is removed completely from the source code as-if replaced by false. UseParNewGC (def: false) expired. However it is expected/required to be true whenever UseConcMarkSweepGC is true, and UseConcMarkSweepGC has not been deprecated. So we must remove all uses as-if it were true, not false. ExplicitGCInvokesConcurrentAndUnloadsClasses (def: false) has now expired and is removed completely from the source as-if replaced by false. ConvertSleepToYield (def: true) is now obsolete. It is moved to the obsolete table and is removed completely from the source code as-if replaced by true. ConvertYieldToSleep (def: false) is now obsolete. It is moved to the obsolete table and is removed completely from the source code as-if replaced by false. As a result of the above MinSleepInterval is no longer used (it should have also been deprecated in 9) and is also marked as obsolete. --- Aliased options that have expired: CMSMarkStackSizeMax is an alias and has expired. It is removed from the alias and obsolete flag tables. CMSMarkStackSize is an alias and has expired. It is removed from the alias and obsolete flag tables. G1MarkStackSize is an alias and has expired. It is removed from the alias and obsolete flag tables. ParallelMarkingThreads is an alias and has expired. It is removed from the alias and obsolete flag tables. ParallelCMSThreads is an alias and has expired. It is removed from the alias and obsolete flag tables. --- The following flags all expire in 10 and exist (except where noted) only in the special-flag table (from which they are now removed). Any other uses of the flag are removed. UseOldInlining SafepointPollOffset (defined in ./cpu/aarch64/vm/c1_globals_aarch64.hpp) UseBoundThreads (comments in os_solaris.cpp) DefaultThreadPriority NoYieldsInMicrolock BackEdgeThreshold (defined in c1/2_globals_aarch64.hpp) UseNewReflection ReflectionWrapResolutionErrors VerifyReflectionBytecodes AutoShutdownNMT NmethodSweepFraction NmethodSweepCheckInterval CodeCacheMinimumFreeSpace UseFastAccessorMethods (non-ZERO only: still valid flag on Zero builds) UseFastEmptyMethods (non-ZERO only: still valid flag on Zero builds) UseCompilerSafepoints AdaptiveSizePausePolicy ParallelGCRetainPLAB ThreadSafetyMargin LazyBootClassLoader StarvationMonitorInterval PreInflateSpin JNIDetachReleasesMonitors UseAltSigs SegmentedHeapDumpThreshold PrintOopAddress (comment in method.cpp) PermSize MaxPermSize --- Tests modified: runtime/CommandLine/   ObsoleteFlagErrorMessage.java   VMDeprecatedOptions.java   VMAliasOptions.java gc/arguments/TestSelectDefaultGC.java --- Tests removed (TEST.groups updated as needed): gc/startup_warnings/   TestUseAutoGCSelectPolicy.java   TestParNewSerialOld.java   TestParNewCMS.java   TestDefNewCMS.java gc/arguments/TestExplicitGCInvokesConcurrentAndUnloadsClasses.java runtime/CommandLine/PermGenFlagsTest.java runtime/NMT/AutoshutdownNMT.java
          Hide
          dholmes David Holmes added a comment - - edited
          Additional JDK test changes needed:

          ./com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java: "-XX:+UseConcMarkSweepGC", // this will cause UseParNewGC to be FLAG_SET_ERGO
          ./com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java: checkOrigin("UseParNewGC", Origin.ERGONOMIC);
          ./java/lang/management/MemoryMXBean/LowMemoryTest2.sh:go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC LowMemoryTest2
          ./java/lang/management/MemoryMXBean/LowMemoryTest.java: * @requires vm.opt.ExplicitGCInvokesConcurrentAndUnloadsClasses != "true"
          ./java/lang/management/MemoryMXBean/ResetPeakMemoryUsage.java: * @requires vm.opt.ExplicitGCInvokesConcurrentAndUnloadsClasses != "true"

          The following will not be changed as the content in this readme file is ancient and mostly irrelevant to any JDK after 1.4

          ./java/rmi/testlibrary/README.jcov:export OPTS="-Xms256m -Xmx256m -XX:+UseUnsupportedDeprecatedJVMPI -XX:+EnableJVMPIInstructionStartEvent -XX:-UseFastEmptyMethods -XX:-UseFastAccessorMethods -timeoutFactor:4"
          ./java/rmi/testlibrary/README.jcov:jcov.options=-Xrunjcov:file=/files/rmi.jcov -Xms256m -Xmx256m -XX:+UseUnsupportedDeprecatedJVMPI -XX:+EnableJVMPIInstructionStartEvent -XX:-UseFastEmptyMethods -XX:-UseFastAccessorMethods
          ./java/rmi/testlibrary/README.jcov:rmid.jcov.args=-C-Xrunjcov:file=/files/rmi.jcov -C-Xms256m -C-Xmx256m -C-XX:+UseUnsupportedDeprecatedJVMPI -C-XX:+EnableJVMPIInstructionStartEvent -C-XX:-UseFastEmptyMethods -C-XX:-UseFastAccessorMethods
          ./java/rmi/testlibrary/README.jcov:export OPTS="-Xms256m -Xmx256m -XX:+UseUnsupportedDeprecatedJVMPI -XX:+EnableJVMPIInstructionStartEvent -XX:-UseFastEmptyMethods -XX:-UseFastAccessorMethods -timeoutFactor:4"
          ./java/rmi/testlibrary/README.jcov:jcov.options=-Xrunjcov:file=/files/rmi.jcov -Xms256m -Xmx256m -XX:+UseUnsupportedDeprecatedJVMPI -XX:+EnableJVMPIInstructionStartEvent -XX:-UseFastEmptyMethods -XX:-UseFastAccessorMethods
          ./java/rmi/testlibrary/README.jcov:rmid.jcov.args=-C-Xrunjcov:file=/files/rmi.jcov -C-Xms256m -C-Xmx256m -C-XX:+UseUnsupportedDeprecatedJVMPI -C-XX:+EnableJVMPIInstructionStartEvent -C-XX:-UseFastEmptyMethods -C-XX:-UseFastAccessorMethods
          Show
          dholmes David Holmes added a comment - - edited Additional JDK test changes needed: ./com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java: "-XX:+UseConcMarkSweepGC", // this will cause UseParNewGC to be FLAG_SET_ERGO ./com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java: checkOrigin("UseParNewGC", Origin.ERGONOMIC); ./java/lang/management/MemoryMXBean/LowMemoryTest2.sh:go -noclassgc -XX:MaxMetaspaceSize=16m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC LowMemoryTest2 ./java/lang/management/MemoryMXBean/LowMemoryTest.java: * @requires vm.opt.ExplicitGCInvokesConcurrentAndUnloadsClasses != "true" ./java/lang/management/MemoryMXBean/ResetPeakMemoryUsage.java: * @requires vm.opt.ExplicitGCInvokesConcurrentAndUnloadsClasses != "true" The following will not be changed as the content in this readme file is ancient and mostly irrelevant to any JDK after 1.4 ./java/rmi/testlibrary/README.jcov:export OPTS="-Xms256m -Xmx256m -XX:+UseUnsupportedDeprecatedJVMPI -XX:+EnableJVMPIInstructionStartEvent -XX:-UseFastEmptyMethods -XX:-UseFastAccessorMethods -timeoutFactor:4" ./java/rmi/testlibrary/README.jcov:jcov.options=-Xrunjcov:file=/files/rmi.jcov -Xms256m -Xmx256m -XX:+UseUnsupportedDeprecatedJVMPI -XX:+EnableJVMPIInstructionStartEvent -XX:-UseFastEmptyMethods -XX:-UseFastAccessorMethods ./java/rmi/testlibrary/README.jcov:rmid.jcov.args=-C-Xrunjcov:file=/files/rmi.jcov -C-Xms256m -C-Xmx256m -C-XX:+UseUnsupportedDeprecatedJVMPI -C-XX:+EnableJVMPIInstructionStartEvent -C-XX:-UseFastEmptyMethods -C-XX:-UseFastAccessorMethods ./java/rmi/testlibrary/README.jcov:export OPTS="-Xms256m -Xmx256m -XX:+UseUnsupportedDeprecatedJVMPI -XX:+EnableJVMPIInstructionStartEvent -XX:-UseFastEmptyMethods -XX:-UseFastAccessorMethods -timeoutFactor:4" ./java/rmi/testlibrary/README.jcov:jcov.options=-Xrunjcov:file=/files/rmi.jcov -Xms256m -Xmx256m -XX:+UseUnsupportedDeprecatedJVMPI -XX:+EnableJVMPIInstructionStartEvent -XX:-UseFastEmptyMethods -XX:-UseFastAccessorMethods ./java/rmi/testlibrary/README.jcov:rmid.jcov.args=-C-Xrunjcov:file=/files/rmi.jcov -C-Xms256m -C-Xmx256m -C-XX:+UseUnsupportedDeprecatedJVMPI -C-XX:+EnableJVMPIInstructionStartEvent -C-XX:-UseFastEmptyMethods -C-XX:-UseFastAccessorMethods
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk10/jdk10/hotspot/rev/48f374853a92
          User: dholmes
          Date: 2017-02-01 03:05:09 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk10/jdk10/hotspot/rev/48f374853a92 User: dholmes Date: 2017-02-01 03:05:09 +0000
          Hide
          hgupdate HG Updates added a comment -
          URL: http://hg.openjdk.java.net/jdk10/jdk10/jdk/rev/72f33dbfcf3b
          User: dholmes
          Date: 2017-02-01 03:05:11 +0000
          Show
          hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk10/jdk10/jdk/rev/72f33dbfcf3b User: dholmes Date: 2017-02-01 03:05:11 +0000

            People

            • Assignee:
              dholmes David Holmes
              Reporter:
              dholmes David Holmes
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: