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

nonproduct and develop flags should not be printed by product build

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 15
    • hotspot

      All nonproduct and develop flags are added to the flagTable.

      http://hg.openjdk.java.net/jdk/jdk/file/2fbc66ef1a1d/src/hotspot/share/runtime/flags/jvmFlag.cpp#l825

      The only purpose seems to be printing a warning message when these flags are used

      $ java -XX:+TraceInvocationCounterOverflow -version
      Error: VM option 'TraceInvocationCounterOverflow' is notproduct and is available only in debug version of VM.
      $ java -XX:+TraceInvocationCounterOverflo -version
      Unrecognized VM option 'TraceInvocationCounterOverflo'
      Did you mean '(+/-)TraceInvocationCounterOverflow'? Error: Could not create the Java Virtual Machine.

      Since these flags cannot be set in product builds, printing a message about them doesn't seem that helpful.

      We should remove the entries of these flags from flagTable to save space, and make JVMFlag::find_flag() faster.

            iklam Ioi Lam
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: