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

Print develop and nonproduct flags by -XX:+PrintFlags* options in debug build

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b109

      Description

      Currently develop and nonproduct flags are not printed in debug build by -XX:+PrintFlagsInitial, -XX:+PrintFlagsFinal, -XX:+PrintFlagsWithComments and -XX:+PrintFlagsRanges options, because following code exits in src/share/vm/runtime/globals.cpp module:
      #define ONLY_PRINT_PRODUCT_FLAGS

      void CommandLineFlags::printFlags(outputStream* out, bool withComments, bool printRanges) {
      ...
         for (size_t i = 0; i < length; i++) {
           if (array[i]->is_unlocked()) {
      #ifdef ONLY_PRINT_PRODUCT_FLAGS
             if (!array[i]->is_notproduct() && !array[i]->is_develop())
      #endif // ONLY_PRINT_PRODUCT_FLAGS
             array[i]->print_on(out, withComments, printRanges);
      ...
      }

      This affects only debug build because in product build develop and nonproduct flags are not printed because these type of flags are constants in product build.

        Attachments

          Activity

            People

            Assignee:
            ddmitriev Dmitry Dmitriev
            Reporter:
            ddmitriev Dmitry Dmitriev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: