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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • 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.

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

              Created:
              Updated:
              Resolved: