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.
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.
- relates to
-
JDK-8293045 notproduct flags should be invisible in product builds
-
- Closed
-
-
JDK-8236625 Remove writeable macro from JVM flags declaration
-
- Resolved
-
-
JDK-6258968 Global flags cleanup for C1 and C2
-
- Resolved
-
-
JDK-8236754 nonproduct and develop flags should not be printed by product build
-
- Closed
-
(1 links to)