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

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: 9
    • Component/s: hotspot
    • None
    • b109

      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.

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

              Created:
              Updated:
              Resolved: