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

Change notproduct JVM flags to develop flags

XMLWordPrintable

    • b17

      According to
      http://hg.openjdk.java.net/jdk/jdk/file/2fbc66ef1a1d/src/hotspot/share/runtime/globals.hpp#l38

      // develop flags are settable / visible only during development and are constant in the PRODUCT version
      // notproduct flags are settable / visible only during development and are not declared in the PRODUCT version

      which seems to suggest that using a nonproduct flag in a product build would result in a compiler error of non-declared variable.

      However, in the bottom of globals.hpp, nonproduct flags are declared in product build anyway. There doesn't seem to be any practical differences between nonproduct and develop flags.

      #ifdef PRODUCT
      #define DECLARE_DEVELOPER_FLAG(type, name, value, doc) const type name = value;
      #define DECLARE_PD_DEVELOPER_FLAG(type, name, doc) const type name = pd_##name;
      #define DECLARE_NOTPRODUCT_FLAG(type, name, value, doc) const type name = value;

      For simplicity, we should change all nonproduct flags to develop flags.

            coleenp Coleen Phillimore
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: