8224201: Simplify JVM flag macro expansions
authorstefank
Wed, 22 May 2019 13:05:37 +0200
changeset 54982 b18c8301b8c2
parent 54981 0b56fc0448ec
child 54983 81becad91321
8224201: Simplify JVM flag macro expansions Reviewed-by: rehn, kvn, stuefe, tschatzl, coleenp, gziemski
src/hotspot/share/c1/c1_globals.cpp
src/hotspot/share/c1/c1_globals.hpp
src/hotspot/share/compiler/compiler_globals.hpp
src/hotspot/share/gc/epsilon/epsilonHeap.hpp
src/hotspot/share/gc/epsilon/epsilon_globals.hpp
src/hotspot/share/gc/g1/g1EvacFailure.cpp
src/hotspot/share/gc/g1/g1EvacStats.cpp
src/hotspot/share/gc/g1/g1HotCardCache.hpp
src/hotspot/share/gc/g1/g1_globals.hpp
src/hotspot/share/gc/shared/gc_globals.hpp
src/hotspot/share/gc/shared/jvmFlagConstraintsGC.cpp
src/hotspot/share/jvmci/jvmci.cpp
src/hotspot/share/jvmci/jvmci_globals.cpp
src/hotspot/share/jvmci/jvmci_globals.hpp
src/hotspot/share/oops/methodData.hpp
src/hotspot/share/opto/c2_globals.cpp
src/hotspot/share/opto/c2_globals.hpp
src/hotspot/share/runtime/flags/jvmFlag.cpp
src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp
src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp
src/hotspot/share/runtime/flags/jvmFlagWriteableList.cpp
src/hotspot/share/runtime/globals.cpp
src/hotspot/share/runtime/globals.hpp
src/hotspot/share/runtime/globals_ext.hpp
src/hotspot/share/runtime/globals_extension.hpp
src/hotspot/share/runtime/globals_shared.hpp
src/hotspot/share/runtime/safepoint.cpp
--- a/src/hotspot/share/c1/c1_globals.cpp	Wed May 22 07:12:18 2019 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#include "precompiled.hpp"
-#include "c1/c1_globals.hpp"
-
-C1_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
-         MATERIALIZE_PD_DEVELOPER_FLAG, \
-         MATERIALIZE_PRODUCT_FLAG, \
-         MATERIALIZE_PD_PRODUCT_FLAG, \
-         MATERIALIZE_DIAGNOSTIC_FLAG, \
-         MATERIALIZE_PD_DIAGNOSTIC_FLAG, \
-         MATERIALIZE_NOTPRODUCT_FLAG, \
-         IGNORE_RANGE, \
-         IGNORE_CONSTRAINT, \
-         IGNORE_WRITEABLE)
--- a/src/hotspot/share/c1/c1_globals.hpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/c1/c1_globals.hpp	Wed May 22 13:05:37 2019 +0200
@@ -25,7 +25,7 @@
 #ifndef SHARE_C1_C1_GLOBALS_HPP
 #define SHARE_C1_C1_GLOBALS_HPP
 
-#include "runtime/globals.hpp"
+#include "runtime/globals_shared.hpp"
 #include "utilities/macros.hpp"
 
 #include CPU_HEADER(c1_globals)
@@ -324,17 +324,5 @@
   develop(bool, PrintCFGToFile, false,                                      \
           "print control flow graph to a separate file during compilation") \
                                                                             \
-// Read default values for c1 globals
-
-C1_FLAGS(DECLARE_DEVELOPER_FLAG, \
-         DECLARE_PD_DEVELOPER_FLAG, \
-         DECLARE_PRODUCT_FLAG, \
-         DECLARE_PD_PRODUCT_FLAG, \
-         DECLARE_DIAGNOSTIC_FLAG, \
-         DECLARE_PD_DIAGNOSTIC_FLAG, \
-         DECLARE_NOTPRODUCT_FLAG, \
-         IGNORE_RANGE, \
-         IGNORE_CONSTRAINT, \
-         IGNORE_WRITEABLE)
 
 #endif // SHARE_C1_C1_GLOBALS_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/compiler/compiler_globals.hpp	Wed May 22 13:05:37 2019 +0200
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#ifndef SHARE_COMPILER_COMPILER_GLOBALS_HPP
+#define SHARE_COMPILER_COMPILER_GLOBALS_HPP
+
+#include "runtime/globals_shared.hpp"
+#ifdef COMPILER1
+#include "c1/c1_globals.hpp"
+#endif // COMPILER1
+#ifdef COMPILER2
+#include "opto/c2_globals.hpp"
+#endif // COMPILER2
+#if INCLUDE_JVMCI
+#include "jvmci/jvmci_globals.hpp"
+#endif
+
+#if !defined(COMPILER1) && !defined(COMPILER2) && !INCLUDE_JVMCI
+define_pd_global(bool, BackgroundCompilation,        false);
+define_pd_global(bool, UseTLAB,                      false);
+define_pd_global(bool, CICompileOSR,                 false);
+define_pd_global(bool, UseTypeProfile,               false);
+define_pd_global(bool, UseOnStackReplacement,        false);
+define_pd_global(bool, InlineIntrinsics,             false);
+define_pd_global(bool, PreferInterpreterNativeStubs, true);
+define_pd_global(bool, ProfileInterpreter,           false);
+define_pd_global(bool, ProfileTraps,                 false);
+define_pd_global(bool, TieredCompilation,            false);
+
+define_pd_global(intx, CompileThreshold,             0);
+
+define_pd_global(intx,   OnStackReplacePercentage,   0);
+define_pd_global(bool,   ResizeTLAB,                 false);
+define_pd_global(intx,   FreqInlineSize,             0);
+define_pd_global(size_t, NewSizeThreadIncrease,      4*K);
+define_pd_global(bool,   InlineClassNatives,         true);
+define_pd_global(bool,   InlineUnsafeOps,            true);
+define_pd_global(uintx,  InitialCodeCacheSize,       160*K);
+define_pd_global(uintx,  ReservedCodeCacheSize,      32*M);
+define_pd_global(uintx,  NonProfiledCodeHeapSize,    0);
+define_pd_global(uintx,  ProfiledCodeHeapSize,       0);
+define_pd_global(uintx,  NonNMethodCodeHeapSize,     32*M);
+
+define_pd_global(uintx,  CodeCacheExpansionSize,     32*K);
+define_pd_global(uintx,  CodeCacheMinBlockLength,    1);
+define_pd_global(uintx,  CodeCacheMinimumUseSpace,   200*K);
+define_pd_global(size_t, MetaspaceSize,              ScaleForWordSize(4*M));
+define_pd_global(bool, NeverActAsServerClassMachine, true);
+define_pd_global(uint64_t,MaxRAM,                    1ULL*G);
+#define CI_COMPILER_COUNT 0
+#else
+
+#if COMPILER2_OR_JVMCI
+#define CI_COMPILER_COUNT 2
+#else
+#define CI_COMPILER_COUNT 1
+#endif // COMPILER2_OR_JVMCI
+
+#endif // no compilers
+
+#endif // SHARE_COMPILER_COMPILER_GLOBALS_HPP
--- a/src/hotspot/share/gc/epsilon/epsilonHeap.hpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/gc/epsilon/epsilonHeap.hpp	Wed May 22 13:05:37 2019 +0200
@@ -29,7 +29,6 @@
 #include "gc/shared/space.hpp"
 #include "gc/epsilon/epsilonMonitoringSupport.hpp"
 #include "gc/epsilon/epsilonBarrierSet.hpp"
-#include "gc/epsilon/epsilon_globals.hpp"
 #include "services/memoryManager.hpp"
 
 class EpsilonHeap : public CollectedHeap {
--- a/src/hotspot/share/gc/epsilon/epsilon_globals.hpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/gc/epsilon/epsilon_globals.hpp	Wed May 22 13:05:37 2019 +0200
@@ -25,7 +25,8 @@
 #ifndef SHARE_GC_EPSILON_EPSILON_GLOBALS_HPP
 #define SHARE_GC_EPSILON_EPSILON_GLOBALS_HPP
 
-#include "runtime/globals.hpp"
+#include "runtime/globals_shared.hpp"
+
 //
 // Defines all globals flags used by the Epsilon GC.
 //
--- a/src/hotspot/share/gc/g1/g1EvacFailure.cpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/gc/g1/g1EvacFailure.cpp	Wed May 22 13:05:37 2019 +0200
@@ -30,7 +30,6 @@
 #include "gc/g1/g1EvacFailure.hpp"
 #include "gc/g1/g1HeapVerifier.hpp"
 #include "gc/g1/g1OopClosures.inline.hpp"
-#include "gc/g1/g1_globals.hpp"
 #include "gc/g1/heapRegion.hpp"
 #include "gc/g1/heapRegionRemSet.hpp"
 #include "gc/shared/preservedMarks.inline.hpp"
--- a/src/hotspot/share/gc/g1/g1EvacStats.cpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/gc/g1/g1EvacStats.cpp	Wed May 22 13:05:37 2019 +0200
@@ -23,7 +23,6 @@
  */
 
 #include "precompiled.hpp"
-#include "gc/g1/g1_globals.hpp"
 #include "gc/g1/g1EvacStats.hpp"
 #include "gc/shared/gcId.hpp"
 #include "logging/log.hpp"
--- a/src/hotspot/share/gc/g1/g1HotCardCache.hpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/gc/g1/g1HotCardCache.hpp	Wed May 22 13:05:37 2019 +0200
@@ -26,7 +26,6 @@
 #define SHARE_GC_G1_G1HOTCARDCACHE_HPP
 
 #include "gc/g1/g1CardCounts.hpp"
-#include "gc/g1/g1_globals.hpp"
 #include "memory/allocation.hpp"
 #include "runtime/safepoint.hpp"
 #include "runtime/thread.hpp"
--- a/src/hotspot/share/gc/g1/g1_globals.hpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/gc/g1/g1_globals.hpp	Wed May 22 13:05:37 2019 +0200
@@ -25,7 +25,8 @@
 #ifndef SHARE_GC_G1_G1_GLOBALS_HPP
 #define SHARE_GC_G1_G1_GLOBALS_HPP
 
-#include <float.h> // for DBL_MAX
+#include "runtime/globals_shared.hpp"
+
 //
 // Defines all globals flags used by the garbage-first compiler.
 //
--- a/src/hotspot/share/gc/shared/gc_globals.hpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/gc/shared/gc_globals.hpp	Wed May 22 13:05:37 2019 +0200
@@ -25,6 +25,7 @@
 #ifndef SHARE_GC_SHARED_GC_GLOBALS_HPP
 #define SHARE_GC_SHARED_GC_GLOBALS_HPP
 
+#include "runtime/globals_shared.hpp"
 #include "utilities/macros.hpp"
 #if INCLUDE_CMSGC
 #include "gc/cms/cms_globals.hpp"
--- a/src/hotspot/share/gc/shared/jvmFlagConstraintsGC.cpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/gc/shared/jvmFlagConstraintsGC.cpp	Wed May 22 13:05:37 2019 +0200
@@ -45,12 +45,6 @@
 #if INCLUDE_PARALLELGC
 #include "gc/parallel/jvmFlagConstraintsParallel.hpp"
 #endif
-#ifdef COMPILER1
-#include "c1/c1_globals.hpp"
-#endif // COMPILER1
-#ifdef COMPILER2
-#include "opto/c2_globals.hpp"
-#endif // COMPILER2
 
 // Some flags that have default values that indicate that the
 // JVM should automatically determine an appropriate value
--- a/src/hotspot/share/jvmci/jvmci.cpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/jvmci/jvmci.cpp	Wed May 22 13:05:37 2019 +0200
@@ -26,7 +26,6 @@
 #include "gc/shared/collectedHeap.hpp"
 #include "gc/shared/oopStorage.inline.hpp"
 #include "jvmci/jvmci.hpp"
-#include "jvmci/jvmci_globals.hpp"
 #include "jvmci/jvmciJavaClasses.hpp"
 #include "jvmci/jvmciRuntime.hpp"
 #include "jvmci/metadataHandleBlock.hpp"
--- a/src/hotspot/share/jvmci/jvmci_globals.cpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/jvmci/jvmci_globals.cpp	Wed May 22 13:05:37 2019 +0200
@@ -32,18 +32,6 @@
 
 fileStream* JVMCIGlobals::_jni_config_file = NULL;
 
-JVMCI_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
-            MATERIALIZE_PD_DEVELOPER_FLAG, \
-            MATERIALIZE_PRODUCT_FLAG, \
-            MATERIALIZE_PD_PRODUCT_FLAG, \
-            MATERIALIZE_DIAGNOSTIC_FLAG, \
-            MATERIALIZE_PD_DIAGNOSTIC_FLAG, \
-            MATERIALIZE_EXPERIMENTAL_FLAG, \
-            MATERIALIZE_NOTPRODUCT_FLAG,
-            IGNORE_RANGE, \
-            IGNORE_CONSTRAINT, \
-            IGNORE_WRITEABLE)
-
 // Return true if jvmci flags are consistent.
 bool JVMCIGlobals::check_jvmci_flags_are_consistent() {
 
--- a/src/hotspot/share/jvmci/jvmci_globals.hpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/jvmci/jvmci_globals.hpp	Wed May 22 13:05:37 2019 +0200
@@ -25,7 +25,7 @@
 #ifndef SHARE_JVMCI_JVMCI_GLOBALS_HPP
 #define SHARE_JVMCI_JVMCI_GLOBALS_HPP
 
-#include "utilities/ostream.hpp"
+class fileStream;
 
 //
 // Defines all global flags used by the JVMCI compiler. Only flags that need
@@ -129,21 +129,6 @@
   NOT_COMPILER2(diagnostic(bool, UseMontgomerySquareIntrinsic, false,       \
           "Enables intrinsification of BigInteger.montgomerySquare()"))
 
-
-// Read default values for JVMCI globals
-
-JVMCI_FLAGS(DECLARE_DEVELOPER_FLAG, \
-            DECLARE_PD_DEVELOPER_FLAG, \
-            DECLARE_PRODUCT_FLAG, \
-            DECLARE_PD_PRODUCT_FLAG, \
-            DECLARE_DIAGNOSTIC_FLAG, \
-            DECLARE_PD_DIAGNOSTIC_FLAG, \
-            DECLARE_EXPERIMENTAL_FLAG, \
-            DECLARE_NOTPRODUCT_FLAG, \
-            IGNORE_RANGE, \
-            IGNORE_CONSTRAINT, \
-            IGNORE_WRITEABLE)
-
 // The base name for the shared library containing the JVMCI based compiler
 #define JVMCI_SHARED_LIBRARY_NAME "jvmcicompiler"
 
--- a/src/hotspot/share/oops/methodData.hpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/oops/methodData.hpp	Wed May 22 13:05:37 2019 +0200
@@ -31,9 +31,6 @@
 #include "oops/oop.hpp"
 #include "runtime/atomic.hpp"
 #include "utilities/align.hpp"
-#if INCLUDE_JVMCI
-#include "jvmci/jvmci_globals.hpp"
-#endif
 
 class BytecodeStream;
 class KlassSizeStats;
--- a/src/hotspot/share/opto/c2_globals.cpp	Wed May 22 07:12:18 2019 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-#include "precompiled.hpp"
-#include "opto/c2_globals.hpp"
-
-C2_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
-         MATERIALIZE_PD_DEVELOPER_FLAG, \
-         MATERIALIZE_PRODUCT_FLAG, \
-         MATERIALIZE_PD_PRODUCT_FLAG, \
-         MATERIALIZE_DIAGNOSTIC_FLAG, \
-         MATERIALIZE_PD_DIAGNOSTIC_FLAG, \
-         MATERIALIZE_EXPERIMENTAL_FLAG, \
-         MATERIALIZE_NOTPRODUCT_FLAG, \
-         IGNORE_RANGE, \
-         IGNORE_CONSTRAINT, \
-         IGNORE_WRITEABLE)
--- a/src/hotspot/share/opto/c2_globals.hpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/opto/c2_globals.hpp	Wed May 22 13:05:37 2019 +0200
@@ -25,7 +25,7 @@
 #ifndef SHARE_OPTO_C2_GLOBALS_HPP
 #define SHARE_OPTO_C2_GLOBALS_HPP
 
-#include "runtime/globals.hpp"
+#include "runtime/globals_shared.hpp"
 #include "utilities/macros.hpp"
 
 #include CPU_HEADER(c2_globals)
@@ -758,16 +758,4 @@
   product(bool, UseProfiledLoopPredicate, true,                             \
           "move predicates out of loops based on profiling data")           \
 
-C2_FLAGS(DECLARE_DEVELOPER_FLAG, \
-         DECLARE_PD_DEVELOPER_FLAG, \
-         DECLARE_PRODUCT_FLAG, \
-         DECLARE_PD_PRODUCT_FLAG, \
-         DECLARE_DIAGNOSTIC_FLAG, \
-         DECLARE_PD_DIAGNOSTIC_FLAG, \
-         DECLARE_EXPERIMENTAL_FLAG, \
-         DECLARE_NOTPRODUCT_FLAG, \
-         IGNORE_RANGE, \
-         IGNORE_CONSTRAINT, \
-         IGNORE_WRITEABLE)
-
 #endif // SHARE_OPTO_C2_GLOBALS_HPP
--- a/src/hotspot/share/runtime/flags/jvmFlag.cpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/runtime/flags/jvmFlag.cpp	Wed May 22 13:05:37 2019 +0200
@@ -957,24 +957,24 @@
 }
 
 // Returns the address of the index'th element
-static JVMFlag* address_of_flag(JVMFlagsWithType flag) {
+static JVMFlag* address_of_flag(JVMFlagsEnum flag) {
   assert((size_t)flag < JVMFlag::numFlags, "bad command line flag index");
   return &JVMFlag::flags[flag];
 }
 
-bool JVMFlagEx::is_default(JVMFlags flag) {
+bool JVMFlagEx::is_default(JVMFlagsEnum flag) {
   assert((size_t)flag < JVMFlag::numFlags, "bad command line flag index");
   JVMFlag* f = &JVMFlag::flags[flag];
   return f->is_default();
 }
 
-bool JVMFlagEx::is_ergo(JVMFlags flag) {
+bool JVMFlagEx::is_ergo(JVMFlagsEnum flag) {
   assert((size_t)flag < JVMFlag::numFlags, "bad command line flag index");
   JVMFlag* f = &JVMFlag::flags[flag];
   return f->is_ergonomic();
 }
 
-bool JVMFlagEx::is_cmdline(JVMFlags flag) {
+bool JVMFlagEx::is_cmdline(JVMFlagsEnum flag) {
   assert((size_t)flag < JVMFlag::numFlags, "bad command line flag index");
   JVMFlag* f = &JVMFlag::flags[flag];
   return f->is_command_line();
@@ -987,7 +987,7 @@
   return true;
 }
 
-void JVMFlagEx::setOnCmdLine(JVMFlagsWithType flag) {
+void JVMFlagEx::setOnCmdLine(JVMFlagsEnum flag) {
   JVMFlag* faddr = address_of_flag(flag);
   assert(faddr != NULL, "Unknown flag");
   faddr->set_command_line();
@@ -1040,7 +1040,7 @@
   return boolAtPut(result, value, origin);
 }
 
-JVMFlag::Error JVMFlagEx::boolAtPut(JVMFlagsWithType flag, bool value, JVMFlag::Flags origin) {
+JVMFlag::Error JVMFlagEx::boolAtPut(JVMFlagsEnum flag, bool value, JVMFlag::Flags origin) {
   JVMFlag* faddr = address_of_flag(flag);
   guarantee(faddr != NULL && faddr->is_bool(), "wrong flag type");
   return JVMFlag::boolAtPut(faddr, &value, origin);
@@ -1089,7 +1089,7 @@
   return intAtPut(result, value, origin);
 }
 
-JVMFlag::Error JVMFlagEx::intAtPut(JVMFlagsWithType flag, int value, JVMFlag::Flags origin) {
+JVMFlag::Error JVMFlagEx::intAtPut(JVMFlagsEnum flag, int value, JVMFlag::Flags origin) {
   JVMFlag* faddr = address_of_flag(flag);
   guarantee(faddr != NULL && faddr->is_int(), "wrong flag type");
   return JVMFlag::intAtPut(faddr, &value, origin);
@@ -1138,7 +1138,7 @@
   return uintAtPut(result, value, origin);
 }
 
-JVMFlag::Error JVMFlagEx::uintAtPut(JVMFlagsWithType flag, uint value, JVMFlag::Flags origin) {
+JVMFlag::Error JVMFlagEx::uintAtPut(JVMFlagsEnum flag, uint value, JVMFlag::Flags origin) {
   JVMFlag* faddr = address_of_flag(flag);
   guarantee(faddr != NULL && faddr->is_uint(), "wrong flag type");
   return JVMFlag::uintAtPut(faddr, &value, origin);
@@ -1187,7 +1187,7 @@
   return intxAtPut(result, value, origin);
 }
 
-JVMFlag::Error JVMFlagEx::intxAtPut(JVMFlagsWithType flag, intx value, JVMFlag::Flags origin) {
+JVMFlag::Error JVMFlagEx::intxAtPut(JVMFlagsEnum flag, intx value, JVMFlag::Flags origin) {
   JVMFlag* faddr = address_of_flag(flag);
   guarantee(faddr != NULL && faddr->is_intx(), "wrong flag type");
   return JVMFlag::intxAtPut(faddr, &value, origin);
@@ -1236,7 +1236,7 @@
   return uintxAtPut(result, value, origin);
 }
 
-JVMFlag::Error JVMFlagEx::uintxAtPut(JVMFlagsWithType flag, uintx value, JVMFlag::Flags origin) {
+JVMFlag::Error JVMFlagEx::uintxAtPut(JVMFlagsEnum flag, uintx value, JVMFlag::Flags origin) {
   JVMFlag* faddr = address_of_flag(flag);
   guarantee(faddr != NULL && faddr->is_uintx(), "wrong flag type");
   return JVMFlag::uintxAtPut(faddr, &value, origin);
@@ -1285,7 +1285,7 @@
   return uint64_tAtPut(result, value, origin);
 }
 
-JVMFlag::Error JVMFlagEx::uint64_tAtPut(JVMFlagsWithType flag, uint64_t value, JVMFlag::Flags origin) {
+JVMFlag::Error JVMFlagEx::uint64_tAtPut(JVMFlagsEnum flag, uint64_t value, JVMFlag::Flags origin) {
   JVMFlag* faddr = address_of_flag(flag);
   guarantee(faddr != NULL && faddr->is_uint64_t(), "wrong flag type");
   return JVMFlag::uint64_tAtPut(faddr, &value, origin);
@@ -1335,7 +1335,7 @@
   return size_tAtPut(result, value, origin);
 }
 
-JVMFlag::Error JVMFlagEx::size_tAtPut(JVMFlagsWithType flag, size_t value, JVMFlag::Flags origin) {
+JVMFlag::Error JVMFlagEx::size_tAtPut(JVMFlagsEnum flag, size_t value, JVMFlag::Flags origin) {
   JVMFlag* faddr = address_of_flag(flag);
   guarantee(faddr != NULL && faddr->is_size_t(), "wrong flag type");
   return JVMFlag::size_tAtPut(faddr, &value, origin);
@@ -1384,7 +1384,7 @@
   return doubleAtPut(result, value, origin);
 }
 
-JVMFlag::Error JVMFlagEx::doubleAtPut(JVMFlagsWithType flag, double value, JVMFlag::Flags origin) {
+JVMFlag::Error JVMFlagEx::doubleAtPut(JVMFlagsEnum flag, double value, JVMFlag::Flags origin) {
   JVMFlag* faddr = address_of_flag(flag);
   guarantee(faddr != NULL && faddr->is_double(), "wrong flag type");
   return JVMFlag::doubleAtPut(faddr, &value, origin);
@@ -1418,7 +1418,7 @@
   return check;
 }
 
-JVMFlag::Error JVMFlagEx::ccstrAtPut(JVMFlagsWithType flag, ccstr value, JVMFlag::Flags origin) {
+JVMFlag::Error JVMFlagEx::ccstrAtPut(JVMFlagsEnum flag, ccstr value, JVMFlag::Flags origin) {
   JVMFlag* faddr = address_of_flag(flag);
   guarantee(faddr != NULL && faddr->is_ccstr(), "wrong flag type");
   ccstr old_value = faddr->get_ccstr();
@@ -1511,4 +1511,3 @@
     va_end(listPointer);
   }
 }
-
--- a/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/runtime/flags/jvmFlagConstraintList.cpp	Wed May 22 13:05:37 2019 +0200
@@ -31,14 +31,9 @@
 #include "runtime/flags/jvmFlagConstraintList.hpp"
 #include "runtime/flags/jvmFlagConstraintsCompiler.hpp"
 #include "runtime/flags/jvmFlagConstraintsRuntime.hpp"
+#include "runtime/globals.hpp"
 #include "runtime/os.hpp"
 #include "utilities/macros.hpp"
-#ifdef COMPILER1
-#include "c1/c1_globals.hpp"
-#endif
-#ifdef COMPILER2
-#include "opto/c2_globals.hpp"
-#endif
 
 class JVMFlagConstraint_bool : public JVMFlagConstraint {
   JVMFlagConstraintFunc_bool _constraint;
@@ -241,27 +236,31 @@
 }
 
 // Generate code to call emit_constraint_xxx function
-#define EMIT_CONSTRAINT_PRODUCT_FLAG(type, name, value, doc)      ); emit_constraint_##type(#name,&name
-#define EMIT_CONSTRAINT_DIAGNOSTIC_FLAG(type, name, value, doc)   ); emit_constraint_##type(#name,&name
-#define EMIT_CONSTRAINT_EXPERIMENTAL_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name
-#define EMIT_CONSTRAINT_MANAGEABLE_FLAG(type, name, value, doc)   ); emit_constraint_##type(#name,&name
-#define EMIT_CONSTRAINT_PRODUCT_RW_FLAG(type, name, value, doc)   ); emit_constraint_##type(#name,&name
-#define EMIT_CONSTRAINT_PD_PRODUCT_FLAG(type, name, doc)          ); emit_constraint_##type(#name,&name
-#define EMIT_CONSTRAINT_PD_DIAGNOSTIC_FLAG(type, name, doc)       ); emit_constraint_##type(#name,&name
+#define EMIT_CONSTRAINT_START       (void)(0
+#define EMIT_CONSTRAINT(type, name) ); emit_constraint_##type(#name, &name
+#define EMIT_CONSTRAINT_NO          ); emit_constraint_no(0
+#define EMIT_CONSTRAINT_PRODUCT_FLAG(type, name, value, doc)      EMIT_CONSTRAINT(type, name)
+#define EMIT_CONSTRAINT_DIAGNOSTIC_FLAG(type, name, value, doc)   EMIT_CONSTRAINT(type, name)
+#define EMIT_CONSTRAINT_EXPERIMENTAL_FLAG(type, name, value, doc) EMIT_CONSTRAINT(type, name)
+#define EMIT_CONSTRAINT_MANAGEABLE_FLAG(type, name, value, doc)   EMIT_CONSTRAINT(type, name)
+#define EMIT_CONSTRAINT_PRODUCT_RW_FLAG(type, name, value, doc)   EMIT_CONSTRAINT(type, name)
+#define EMIT_CONSTRAINT_PD_PRODUCT_FLAG(type, name, doc)          EMIT_CONSTRAINT(type, name)
+#define EMIT_CONSTRAINT_PD_DIAGNOSTIC_FLAG(type, name, doc)       EMIT_CONSTRAINT(type, name)
 #ifndef PRODUCT
-#define EMIT_CONSTRAINT_DEVELOPER_FLAG(type, name, value, doc)    ); emit_constraint_##type(#name,&name
-#define EMIT_CONSTRAINT_PD_DEVELOPER_FLAG(type, name, doc)        ); emit_constraint_##type(#name,&name
-#define EMIT_CONSTRAINT_NOTPRODUCT_FLAG(type, name, value, doc)   ); emit_constraint_##type(#name,&name
+#define EMIT_CONSTRAINT_DEVELOPER_FLAG(type, name, value, doc)    EMIT_CONSTRAINT(type, name)
+#define EMIT_CONSTRAINT_PD_DEVELOPER_FLAG(type, name, doc)        EMIT_CONSTRAINT(type, name)
+#define EMIT_CONSTRAINT_NOTPRODUCT_FLAG(type, name, value, doc)   EMIT_CONSTRAINT(type, name)
 #else
-#define EMIT_CONSTRAINT_DEVELOPER_FLAG(type, name, value, doc)    ); emit_constraint_no(#name,&name
-#define EMIT_CONSTRAINT_PD_DEVELOPER_FLAG(type, name, doc)        ); emit_constraint_no(#name,&name
-#define EMIT_CONSTRAINT_NOTPRODUCT_FLAG(type, name, value, doc)   ); emit_constraint_no(#name,&name
+#define EMIT_CONSTRAINT_DEVELOPER_FLAG(type, name, value, doc)    EMIT_CONSTRAINT_NO
+#define EMIT_CONSTRAINT_PD_DEVELOPER_FLAG(type, name, doc)        EMIT_CONSTRAINT_NO
+#define EMIT_CONSTRAINT_NOTPRODUCT_FLAG(type, name, value, doc)   EMIT_CONSTRAINT_NO
 #endif
 #ifdef _LP64
-#define EMIT_CONSTRAINT_LP64_PRODUCT_FLAG(type, name, value, doc) ); emit_constraint_##type(#name,&name
+#define EMIT_CONSTRAINT_LP64_PRODUCT_FLAG(type, name, value, doc) EMIT_CONSTRAINT(type, name)
 #else
-#define EMIT_CONSTRAINT_LP64_PRODUCT_FLAG(type, name, value, doc) ); emit_constraint_no(#name,&name
+#define EMIT_CONSTRAINT_LP64_PRODUCT_FLAG(type, name, value, doc) EMIT_CONSTRAINT_NO
 #endif
+#define EMIT_CONSTRAINT_END         );
 
 // Generate func argument to pass into emit_constraint_xxx functions
 #define EMIT_CONSTRAINT_CHECK(func, type)                         , func, JVMFlagConstraint::type
@@ -275,59 +274,26 @@
 void JVMFlagConstraintList::init(void) {
   _constraints = new (ResourceObj::C_HEAP, mtArguments) GrowableArray<JVMFlagConstraint*>(INITIAL_CONSTRAINTS_SIZE, true);
 
-  emit_constraint_no(NULL VM_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG,
-                                   EMIT_CONSTRAINT_PD_DEVELOPER_FLAG,
-                                   EMIT_CONSTRAINT_PRODUCT_FLAG,
-                                   EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
-                                   EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
-                                   EMIT_CONSTRAINT_PD_DIAGNOSTIC_FLAG,
-                                   EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
-                                   EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
-                                   EMIT_CONSTRAINT_MANAGEABLE_FLAG,
-                                   EMIT_CONSTRAINT_PRODUCT_RW_FLAG,
-                                   EMIT_CONSTRAINT_LP64_PRODUCT_FLAG,
-                                   IGNORE_RANGE,
-                                   EMIT_CONSTRAINT_CHECK,
-                                   IGNORE_WRITEABLE));
+  EMIT_CONSTRAINT_START
+
+  ALL_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG,
+            EMIT_CONSTRAINT_PD_DEVELOPER_FLAG,
+            EMIT_CONSTRAINT_PRODUCT_FLAG,
+            EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
+            EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
+            EMIT_CONSTRAINT_PD_DIAGNOSTIC_FLAG,
+            EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
+            EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
+            EMIT_CONSTRAINT_MANAGEABLE_FLAG,
+            EMIT_CONSTRAINT_PRODUCT_RW_FLAG,
+            EMIT_CONSTRAINT_LP64_PRODUCT_FLAG,
+            IGNORE_RANGE,
+            EMIT_CONSTRAINT_CHECK,
+            IGNORE_WRITEABLE)
 
   EMIT_CONSTRAINTS_FOR_GLOBALS_EXT
 
-  emit_constraint_no(NULL ARCH_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG,
-                                     EMIT_CONSTRAINT_PRODUCT_FLAG,
-                                     EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
-                                     EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
-                                     EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
-                                     IGNORE_RANGE,
-                                     EMIT_CONSTRAINT_CHECK,
-                                     IGNORE_WRITEABLE));
-
-
-#ifdef COMPILER1
-  emit_constraint_no(NULL C1_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG,
-                                   EMIT_CONSTRAINT_PD_DEVELOPER_FLAG,
-                                   EMIT_CONSTRAINT_PRODUCT_FLAG,
-                                   EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
-                                   EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
-                                   EMIT_CONSTRAINT_PD_DIAGNOSTIC_FLAG,
-                                   EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
-                                   IGNORE_RANGE,
-                                   EMIT_CONSTRAINT_CHECK,
-                                   IGNORE_WRITEABLE));
-#endif // COMPILER1
-
-#ifdef COMPILER2
-  emit_constraint_no(NULL C2_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG,
-                                   EMIT_CONSTRAINT_PD_DEVELOPER_FLAG,
-                                   EMIT_CONSTRAINT_PRODUCT_FLAG,
-                                   EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
-                                   EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
-                                   EMIT_CONSTRAINT_PD_DIAGNOSTIC_FLAG,
-                                   EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
-                                   EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
-                                   IGNORE_RANGE,
-                                   EMIT_CONSTRAINT_CHECK,
-                                   IGNORE_WRITEABLE));
-#endif // COMPILER2
+  EMIT_CONSTRAINT_END
 }
 
 JVMFlagConstraint* JVMFlagConstraintList::find(const char* name) {
--- a/src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/runtime/flags/jvmFlagRangeList.cpp	Wed May 22 13:05:37 2019 +0200
@@ -32,7 +32,7 @@
 #include "runtime/flags/jvmFlag.hpp"
 #include "runtime/flags/jvmFlagConstraintList.hpp"
 #include "runtime/flags/jvmFlagRangeList.hpp"
-#include "runtime/globals_extension.hpp"
+#include "runtime/globals.hpp"
 #include "runtime/os.hpp"
 #include "runtime/task.hpp"
 #include "utilities/macros.hpp"
@@ -292,27 +292,31 @@
 }
 
 // Generate code to call emit_range_xxx function
-#define EMIT_RANGE_PRODUCT_FLAG(type, name, value, doc)      ); emit_range_##type(#name,&name
-#define EMIT_RANGE_DIAGNOSTIC_FLAG(type, name, value, doc)   ); emit_range_##type(#name,&name
-#define EMIT_RANGE_EXPERIMENTAL_FLAG(type, name, value, doc) ); emit_range_##type(#name,&name
-#define EMIT_RANGE_MANAGEABLE_FLAG(type, name, value, doc)   ); emit_range_##type(#name,&name
-#define EMIT_RANGE_PRODUCT_RW_FLAG(type, name, value, doc)   ); emit_range_##type(#name,&name
-#define EMIT_RANGE_PD_PRODUCT_FLAG(type, name, doc)          ); emit_range_##type(#name,&name
-#define EMIT_RANGE_PD_DIAGNOSTIC_FLAG(type, name, doc)       ); emit_range_##type(#name,&name
+#define EMIT_RANGE_START       (void)(0
+#define EMIT_RANGE(type, name) ); emit_range_##type(#name, &name
+#define EMIT_RANGE_NO          ); emit_range_no(0
+#define EMIT_RANGE_PRODUCT_FLAG(type, name, value, doc)      EMIT_RANGE(type, name)
+#define EMIT_RANGE_DIAGNOSTIC_FLAG(type, name, value, doc)   EMIT_RANGE(type, name)
+#define EMIT_RANGE_EXPERIMENTAL_FLAG(type, name, value, doc) EMIT_RANGE(type, name)
+#define EMIT_RANGE_MANAGEABLE_FLAG(type, name, value, doc)   EMIT_RANGE(type, name)
+#define EMIT_RANGE_PRODUCT_RW_FLAG(type, name, value, doc)   EMIT_RANGE(type, name)
+#define EMIT_RANGE_PD_PRODUCT_FLAG(type, name, doc)          EMIT_RANGE(type, name)
+#define EMIT_RANGE_PD_DIAGNOSTIC_FLAG(type, name, doc)       EMIT_RANGE(type, name)
 #ifndef PRODUCT
-#define EMIT_RANGE_DEVELOPER_FLAG(type, name, value, doc)    ); emit_range_##type(#name,&name
-#define EMIT_RANGE_PD_DEVELOPER_FLAG(type, name, doc)        ); emit_range_##type(#name,&name
-#define EMIT_RANGE_NOTPRODUCT_FLAG(type, name, value, doc)   ); emit_range_##type(#name,&name
+#define EMIT_RANGE_DEVELOPER_FLAG(type, name, value, doc)    EMIT_RANGE(type, name)
+#define EMIT_RANGE_PD_DEVELOPER_FLAG(type, name, doc)        EMIT_RANGE(type, name)
+#define EMIT_RANGE_NOTPRODUCT_FLAG(type, name, value, doc)   EMIT_RANGE(type, name)
 #else
-#define EMIT_RANGE_DEVELOPER_FLAG(type, name, value, doc)    ); emit_range_no(#name,&name
-#define EMIT_RANGE_PD_DEVELOPER_FLAG(type, name, doc)        ); emit_range_no(#name,&name
-#define EMIT_RANGE_NOTPRODUCT_FLAG(type, name, value, doc)   ); emit_range_no(#name,&name
+#define EMIT_RANGE_DEVELOPER_FLAG(type, name, value, doc)    EMIT_RANGE_NO
+#define EMIT_RANGE_PD_DEVELOPER_FLAG(type, name, doc)        EMIT_RANGE_NO
+#define EMIT_RANGE_NOTPRODUCT_FLAG(type, name, value, doc)   EMIT_RANGE_NO
 #endif
 #ifdef _LP64
-#define EMIT_RANGE_LP64_PRODUCT_FLAG(type, name, value, doc) ); emit_range_##type(#name,&name
+#define EMIT_RANGE_LP64_PRODUCT_FLAG(type, name, value, doc) EMIT_RANGE(type, name)
 #else
-#define EMIT_RANGE_LP64_PRODUCT_FLAG(type, name, value, doc) ); emit_range_no(#name,&name
+#define EMIT_RANGE_LP64_PRODUCT_FLAG(type, name, value, doc) EMIT_RANGE_NO
 #endif
+#define EMIT_RANGE_END         );
 
 // Generate func argument to pass into emit_range_xxx functions
 #define EMIT_RANGE_CHECK(a, b)                               , a, b
@@ -325,72 +329,26 @@
 
   _ranges = new (ResourceObj::C_HEAP, mtArguments) GrowableArray<JVMFlagRange*>(INITIAL_RANGES_SIZE, true);
 
-  emit_range_no(NULL VM_FLAGS(EMIT_RANGE_DEVELOPER_FLAG,
-                              EMIT_RANGE_PD_DEVELOPER_FLAG,
-                              EMIT_RANGE_PRODUCT_FLAG,
-                              EMIT_RANGE_PD_PRODUCT_FLAG,
-                              EMIT_RANGE_DIAGNOSTIC_FLAG,
-                              EMIT_RANGE_PD_DIAGNOSTIC_FLAG,
-                              EMIT_RANGE_EXPERIMENTAL_FLAG,
-                              EMIT_RANGE_NOTPRODUCT_FLAG,
-                              EMIT_RANGE_MANAGEABLE_FLAG,
-                              EMIT_RANGE_PRODUCT_RW_FLAG,
-                              EMIT_RANGE_LP64_PRODUCT_FLAG,
-                              EMIT_RANGE_CHECK,
-                              IGNORE_CONSTRAINT,
-                              IGNORE_WRITEABLE));
+  EMIT_RANGE_START
+
+  ALL_FLAGS(EMIT_RANGE_DEVELOPER_FLAG,
+            EMIT_RANGE_PD_DEVELOPER_FLAG,
+            EMIT_RANGE_PRODUCT_FLAG,
+            EMIT_RANGE_PD_PRODUCT_FLAG,
+            EMIT_RANGE_DIAGNOSTIC_FLAG,
+            EMIT_RANGE_PD_DIAGNOSTIC_FLAG,
+            EMIT_RANGE_EXPERIMENTAL_FLAG,
+            EMIT_RANGE_NOTPRODUCT_FLAG,
+            EMIT_RANGE_MANAGEABLE_FLAG,
+            EMIT_RANGE_PRODUCT_RW_FLAG,
+            EMIT_RANGE_LP64_PRODUCT_FLAG,
+            EMIT_RANGE_CHECK,
+            IGNORE_CONSTRAINT,
+            IGNORE_WRITEABLE)
 
   EMIT_RANGES_FOR_GLOBALS_EXT
 
-  emit_range_no(NULL ARCH_FLAGS(EMIT_RANGE_DEVELOPER_FLAG,
-                                EMIT_RANGE_PRODUCT_FLAG,
-                                EMIT_RANGE_DIAGNOSTIC_FLAG,
-                                EMIT_RANGE_EXPERIMENTAL_FLAG,
-                                EMIT_RANGE_NOTPRODUCT_FLAG,
-                                EMIT_RANGE_CHECK,
-                                IGNORE_CONSTRAINT,
-                                IGNORE_WRITEABLE));
-
-#if INCLUDE_JVMCI
-  emit_range_no(NULL JVMCI_FLAGS(EMIT_RANGE_DEVELOPER_FLAG,
-                                 EMIT_RANGE_PD_DEVELOPER_FLAG,
-                                 EMIT_RANGE_PRODUCT_FLAG,
-                                 EMIT_RANGE_PD_PRODUCT_FLAG,
-                                 EMIT_RANGE_DIAGNOSTIC_FLAG,
-                                 EMIT_RANGE_PD_DIAGNOSTIC_FLAG,
-                                 EMIT_RANGE_EXPERIMENTAL_FLAG,
-                                 EMIT_RANGE_NOTPRODUCT_FLAG,
-                                 EMIT_RANGE_CHECK,
-                                 IGNORE_CONSTRAINT,
-                                 IGNORE_WRITEABLE));
-#endif // INCLUDE_JVMCI
-
-#ifdef COMPILER1
-  emit_range_no(NULL C1_FLAGS(EMIT_RANGE_DEVELOPER_FLAG,
-                              EMIT_RANGE_PD_DEVELOPER_FLAG,
-                              EMIT_RANGE_PRODUCT_FLAG,
-                              EMIT_RANGE_PD_PRODUCT_FLAG,
-                              EMIT_RANGE_DIAGNOSTIC_FLAG,
-                              EMIT_RANGE_PD_DIAGNOSTIC_FLAG,
-                              EMIT_RANGE_NOTPRODUCT_FLAG,
-                              EMIT_RANGE_CHECK,
-                              IGNORE_CONSTRAINT,
-                              IGNORE_WRITEABLE));
-#endif // COMPILER1
-
-#ifdef COMPILER2
-  emit_range_no(NULL C2_FLAGS(EMIT_RANGE_DEVELOPER_FLAG,
-                              EMIT_RANGE_PD_DEVELOPER_FLAG,
-                              EMIT_RANGE_PRODUCT_FLAG,
-                              EMIT_RANGE_PD_PRODUCT_FLAG,
-                              EMIT_RANGE_DIAGNOSTIC_FLAG,
-                              EMIT_RANGE_PD_DIAGNOSTIC_FLAG,
-                              EMIT_RANGE_EXPERIMENTAL_FLAG,
-                              EMIT_RANGE_NOTPRODUCT_FLAG,
-                              EMIT_RANGE_CHECK,
-                              IGNORE_CONSTRAINT,
-                              IGNORE_WRITEABLE));
-#endif // COMPILER2
+  EMIT_RANGE_END
 }
 
 JVMFlagRange* JVMFlagRangeList::find(const char* name) {
--- a/src/hotspot/share/runtime/flags/jvmFlagWriteableList.cpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/runtime/flags/jvmFlagWriteableList.cpp	Wed May 22 13:05:37 2019 +0200
@@ -25,15 +25,6 @@
 #include "precompiled.hpp"
 #include "runtime/flags/jvmFlagWriteableList.hpp"
 #include "runtime/os.hpp"
-#ifdef COMPILER1
-#include "c1/c1_globals.hpp"
-#endif // COMPILER1
-#ifdef COMPILER2
-#include "opto/c2_globals.hpp"
-#endif // COMPILER2
-#if INCLUDE_JVMCI
-#include "jvmci/jvmci_globals.hpp"
-#endif
 
 bool JVMFlagWriteable::is_writeable(void) {
   return _writeable;
@@ -93,20 +84,23 @@
 }
 
 // Generate code to call emit_writeable_xxx function
-#define EMIT_WRITEABLE_PRODUCT_FLAG(type, name, value, doc)      ); emit_writeable_##type(#name
-#define EMIT_WRITEABLE_DIAGNOSTIC_FLAG(type, name, value, doc)   ); emit_writeable_##type(#name
-#define EMIT_WRITEABLE_EXPERIMENTAL_FLAG(type, name, value, doc) ); emit_writeable_##type(#name
-#define EMIT_WRITEABLE_MANAGEABLE_FLAG(type, name, value, doc)   ); emit_writeable_##type(#name
-#define EMIT_WRITEABLE_PRODUCT_RW_FLAG(type, name, value, doc)   ); emit_writeable_##type(#name
-#define EMIT_WRITEABLE_PD_PRODUCT_FLAG(type, name, doc)          ); emit_writeable_##type(#name
-#define EMIT_WRITEABLE_DEVELOPER_FLAG(type, name, value, doc)    ); emit_writeable_##type(#name
-#define EMIT_WRITEABLE_PD_DEVELOPER_FLAG(type, name, doc)        ); emit_writeable_##type(#name
-#define EMIT_WRITEABLE_PD_DIAGNOSTIC_FLAG(type, name, doc)       ); emit_writeable_##type(#name
-#define EMIT_WRITEABLE_NOTPRODUCT_FLAG(type, name, value, doc)   ); emit_writeable_##type(#name
-#define EMIT_WRITEABLE_LP64_PRODUCT_FLAG(type, name, value, doc) ); emit_writeable_##type(#name
+#define EMIT_WRITEABLE_START       (void)(0
+#define EMIT_WRITEABLE(type, name) ); emit_writeable_##type(#name
+#define EMIT_WRITEABLE_PRODUCT_FLAG(type, name, value, doc)      EMIT_WRITEABLE(type, name)
+#define EMIT_WRITEABLE_DIAGNOSTIC_FLAG(type, name, value, doc)   EMIT_WRITEABLE(type, name)
+#define EMIT_WRITEABLE_EXPERIMENTAL_FLAG(type, name, value, doc) EMIT_WRITEABLE(type, name)
+#define EMIT_WRITEABLE_MANAGEABLE_FLAG(type, name, value, doc)   EMIT_WRITEABLE(type, name)
+#define EMIT_WRITEABLE_PRODUCT_RW_FLAG(type, name, value, doc)   EMIT_WRITEABLE(type, name)
+#define EMIT_WRITEABLE_PD_PRODUCT_FLAG(type, name, doc)          EMIT_WRITEABLE(type, name)
+#define EMIT_WRITEABLE_DEVELOPER_FLAG(type, name, value, doc)    EMIT_WRITEABLE(type, name)
+#define EMIT_WRITEABLE_PD_DEVELOPER_FLAG(type, name, doc)        EMIT_WRITEABLE(type, name)
+#define EMIT_WRITEABLE_PD_DIAGNOSTIC_FLAG(type, name, doc)       EMIT_WRITEABLE(type, name)
+#define EMIT_WRITEABLE_NOTPRODUCT_FLAG(type, name, value, doc)   EMIT_WRITEABLE(type, name)
+#define EMIT_WRITEABLE_LP64_PRODUCT_FLAG(type, name, value, doc) EMIT_WRITEABLE(type, name)
+#define EMIT_WRITEABLE_END         );
 
 // Generate type argument to pass into emit_writeable_xxx functions
-#define EMIT_WRITEABLE(a)                                      , JVMFlagWriteable::a
+#define EMIT_WRITEABLE_CHECK(a)                                  , JVMFlagWriteable::a
 
 #define INITIAL_WRITEABLES_SIZE 2
 GrowableArray<JVMFlagWriteable*>* JVMFlagWriteableList::_controls = NULL;
@@ -115,72 +109,26 @@
 
   _controls = new (ResourceObj::C_HEAP, mtArguments) GrowableArray<JVMFlagWriteable*>(INITIAL_WRITEABLES_SIZE, true);
 
-  emit_writeable_no(NULL VM_FLAGS(EMIT_WRITEABLE_DEVELOPER_FLAG,
-                                  EMIT_WRITEABLE_PD_DEVELOPER_FLAG,
-                                  EMIT_WRITEABLE_PRODUCT_FLAG,
-                                  EMIT_WRITEABLE_PD_PRODUCT_FLAG,
-                                  EMIT_WRITEABLE_DIAGNOSTIC_FLAG,
-                                  EMIT_WRITEABLE_PD_DIAGNOSTIC_FLAG,
-                                  EMIT_WRITEABLE_EXPERIMENTAL_FLAG,
-                                  EMIT_WRITEABLE_NOTPRODUCT_FLAG,
-                                  EMIT_WRITEABLE_MANAGEABLE_FLAG,
-                                  EMIT_WRITEABLE_PRODUCT_RW_FLAG,
-                                  EMIT_WRITEABLE_LP64_PRODUCT_FLAG,
-                                  IGNORE_RANGE,
-                                  IGNORE_CONSTRAINT,
-                                  EMIT_WRITEABLE));
+  EMIT_WRITEABLE_START
+
+  ALL_FLAGS(EMIT_WRITEABLE_DEVELOPER_FLAG,
+            EMIT_WRITEABLE_PD_DEVELOPER_FLAG,
+            EMIT_WRITEABLE_PRODUCT_FLAG,
+            EMIT_WRITEABLE_PD_PRODUCT_FLAG,
+            EMIT_WRITEABLE_DIAGNOSTIC_FLAG,
+            EMIT_WRITEABLE_PD_DIAGNOSTIC_FLAG,
+            EMIT_WRITEABLE_EXPERIMENTAL_FLAG,
+            EMIT_WRITEABLE_NOTPRODUCT_FLAG,
+            EMIT_WRITEABLE_MANAGEABLE_FLAG,
+            EMIT_WRITEABLE_PRODUCT_RW_FLAG,
+            EMIT_WRITEABLE_LP64_PRODUCT_FLAG,
+            IGNORE_RANGE,
+            IGNORE_CONSTRAINT,
+            EMIT_WRITEABLE_CHECK)
 
   EMIT_WRITEABLES_FOR_GLOBALS_EXT
 
-  emit_writeable_no(NULL ARCH_FLAGS(EMIT_WRITEABLE_DEVELOPER_FLAG,
-                                EMIT_WRITEABLE_PRODUCT_FLAG,
-                                EMIT_WRITEABLE_DIAGNOSTIC_FLAG,
-                                EMIT_WRITEABLE_EXPERIMENTAL_FLAG,
-                                EMIT_WRITEABLE_NOTPRODUCT_FLAG,
-                                IGNORE_RANGE,
-                                IGNORE_CONSTRAINT,
-                                EMIT_WRITEABLE));
-
-#if INCLUDE_JVMCI
-  emit_writeable_no(NULL JVMCI_FLAGS(EMIT_WRITEABLE_DEVELOPER_FLAG,
-                                 EMIT_WRITEABLE_PD_DEVELOPER_FLAG,
-                                 EMIT_WRITEABLE_PRODUCT_FLAG,
-                                 EMIT_WRITEABLE_PD_PRODUCT_FLAG,
-                                 EMIT_WRITEABLE_DIAGNOSTIC_FLAG,
-                                 EMIT_WRITEABLE_PD_DIAGNOSTIC_FLAG,
-                                 EMIT_WRITEABLE_EXPERIMENTAL_FLAG,
-                                 EMIT_WRITEABLE_NOTPRODUCT_FLAG,
-                                 IGNORE_RANGE,
-                                 IGNORE_CONSTRAINT,
-                                 EMIT_WRITEABLE));
-#endif // INCLUDE_JVMCI
-
-#ifdef COMPILER1
-  emit_writeable_no(NULL C1_FLAGS(EMIT_WRITEABLE_DEVELOPER_FLAG,
-                              EMIT_WRITEABLE_PD_DEVELOPER_FLAG,
-                              EMIT_WRITEABLE_PRODUCT_FLAG,
-                              EMIT_WRITEABLE_PD_PRODUCT_FLAG,
-                              EMIT_WRITEABLE_DIAGNOSTIC_FLAG,
-                              EMIT_WRITEABLE_PD_DIAGNOSTIC_FLAG,
-                              EMIT_WRITEABLE_NOTPRODUCT_FLAG,
-                              IGNORE_RANGE,
-                              IGNORE_CONSTRAINT,
-                              EMIT_WRITEABLE));
-#endif // COMPILER1
-
-#ifdef COMPILER2
-  emit_writeable_no(NULL C2_FLAGS(EMIT_WRITEABLE_DEVELOPER_FLAG,
-                              EMIT_WRITEABLE_PD_DEVELOPER_FLAG,
-                              EMIT_WRITEABLE_PRODUCT_FLAG,
-                              EMIT_WRITEABLE_PD_PRODUCT_FLAG,
-                              EMIT_WRITEABLE_DIAGNOSTIC_FLAG,
-                              EMIT_WRITEABLE_PD_DIAGNOSTIC_FLAG,
-                              EMIT_WRITEABLE_EXPERIMENTAL_FLAG,
-                              EMIT_WRITEABLE_NOTPRODUCT_FLAG,
-                              IGNORE_RANGE,
-                              IGNORE_CONSTRAINT,
-                              EMIT_WRITEABLE));
-#endif // COMPILER2
+  EMIT_WRITEABLE_END
 }
 
 JVMFlagWriteable* JVMFlagWriteableList::find(const char* name) {
--- a/src/hotspot/share/runtime/globals.cpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/runtime/globals.cpp	Wed May 22 13:05:37 2019 +0200
@@ -30,6 +30,7 @@
 #include "runtime/arguments.hpp"
 #include "runtime/globals.hpp"
 #include "runtime/globals_extension.hpp"
+#include "runtime/globals_shared.hpp"
 #include "runtime/flags/jvmFlagConstraintList.hpp"
 #include "runtime/flags/jvmFlagWriteableList.hpp"
 #include "runtime/os.hpp"
@@ -38,49 +39,44 @@
 #include "utilities/macros.hpp"
 #include "utilities/ostream.hpp"
 #include "utilities/stringUtils.hpp"
-#ifdef COMPILER1
-#include "c1/c1_globals.hpp"
-#endif
-#if INCLUDE_JVMCI
-#include "jvmci/jvmci_globals.hpp"
-#endif
-#ifdef COMPILER2
-#include "opto/c2_globals.hpp"
-#endif
 
-VM_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
-         MATERIALIZE_PD_DEVELOPER_FLAG, \
-         MATERIALIZE_PRODUCT_FLAG, \
-         MATERIALIZE_PD_PRODUCT_FLAG, \
-         MATERIALIZE_DIAGNOSTIC_FLAG, \
-         MATERIALIZE_PD_DIAGNOSTIC_FLAG, \
-         MATERIALIZE_EXPERIMENTAL_FLAG, \
-         MATERIALIZE_NOTPRODUCT_FLAG, \
-         MATERIALIZE_MANAGEABLE_FLAG, \
-         MATERIALIZE_PRODUCT_RW_FLAG, \
-         MATERIALIZE_LP64_PRODUCT_FLAG, \
-         IGNORE_RANGE, \
-         IGNORE_CONSTRAINT, \
-         IGNORE_WRITEABLE)
+// Implementation macros
+#define MATERIALIZE_PRODUCT_FLAG(type, name, value, doc)      type name = value;
+#define MATERIALIZE_PD_PRODUCT_FLAG(type, name, doc)          type name = pd_##name;
+#define MATERIALIZE_DIAGNOSTIC_FLAG(type, name, value, doc)   type name = value;
+#define MATERIALIZE_PD_DIAGNOSTIC_FLAG(type, name, doc)       type name = pd_##name;
+#define MATERIALIZE_EXPERIMENTAL_FLAG(type, name, value, doc) type name = value;
+#define MATERIALIZE_MANAGEABLE_FLAG(type, name, value, doc)   type name = value;
+#define MATERIALIZE_PRODUCT_RW_FLAG(type, name, value, doc)   type name = value;
+#ifdef PRODUCT
+#define MATERIALIZE_DEVELOPER_FLAG(type, name, value, doc)
+#define MATERIALIZE_PD_DEVELOPER_FLAG(type, name, doc)
+#define MATERIALIZE_NOTPRODUCT_FLAG(type, name, value, doc)
+#else
+#define MATERIALIZE_DEVELOPER_FLAG(type, name, value, doc)    type name = value;
+#define MATERIALIZE_PD_DEVELOPER_FLAG(type, name, doc)        type name = pd_##name;
+#define MATERIALIZE_NOTPRODUCT_FLAG(type, name, value, doc)   type name = value;
+#endif // PRODUCT
+#ifdef _LP64
+#define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc) type name = value;
+#else
+#define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc) /* flag is constant */
+#endif // _LP64
 
-RUNTIME_OS_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
-                 MATERIALIZE_PD_DEVELOPER_FLAG, \
-                 MATERIALIZE_PRODUCT_FLAG, \
-                 MATERIALIZE_PD_PRODUCT_FLAG, \
-                 MATERIALIZE_DIAGNOSTIC_FLAG, \
-                 MATERIALIZE_PD_DIAGNOSTIC_FLAG, \
-                 MATERIALIZE_NOTPRODUCT_FLAG, \
-                 IGNORE_RANGE, \
-                 IGNORE_CONSTRAINT, \
-                 IGNORE_WRITEABLE)
 
-ARCH_FLAGS(MATERIALIZE_DEVELOPER_FLAG, \
-           MATERIALIZE_PRODUCT_FLAG, \
-           MATERIALIZE_DIAGNOSTIC_FLAG, \
-           MATERIALIZE_EXPERIMENTAL_FLAG, \
-           MATERIALIZE_NOTPRODUCT_FLAG, \
-           IGNORE_RANGE, \
-           IGNORE_CONSTRAINT, \
-           IGNORE_WRITEABLE)
+ALL_FLAGS(MATERIALIZE_DEVELOPER_FLAG,     \
+          MATERIALIZE_PD_DEVELOPER_FLAG,  \
+          MATERIALIZE_PRODUCT_FLAG,       \
+          MATERIALIZE_PD_PRODUCT_FLAG,    \
+          MATERIALIZE_DIAGNOSTIC_FLAG,    \
+          MATERIALIZE_PD_DIAGNOSTIC_FLAG, \
+          MATERIALIZE_EXPERIMENTAL_FLAG,  \
+          MATERIALIZE_NOTPRODUCT_FLAG,    \
+          MATERIALIZE_MANAGEABLE_FLAG,    \
+          MATERIALIZE_PRODUCT_RW_FLAG,    \
+          MATERIALIZE_LP64_PRODUCT_FLAG,  \
+          IGNORE_RANGE,                   \
+          IGNORE_CONSTRAINT,              \
+          IGNORE_WRITEABLE)
 
 MATERIALIZE_FLAGS_EXT
--- a/src/hotspot/share/runtime/globals.hpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/runtime/globals.hpp	Wed May 22 13:05:37 2019 +0200
@@ -25,115 +25,15 @@
 #ifndef SHARE_RUNTIME_GLOBALS_HPP
 #define SHARE_RUNTIME_GLOBALS_HPP
 
+#include "compiler/compiler_globals.hpp"
 #include "gc/shared/gc_globals.hpp"
+#include "runtime/globals_shared.hpp"
 #include "utilities/align.hpp"
 #include "utilities/globalDefinitions.hpp"
 #include "utilities/macros.hpp"
-
-#include <float.h> // for DBL_MAX
-
-// The larger HeapWordSize for 64bit requires larger heaps
-// for the same application running in 64bit.  See bug 4967770.
-// The minimum alignment to a heap word size is done.  Other
-// parts of the memory system may require additional alignment
-// and are responsible for those alignments.
-#ifdef _LP64
-#define ScaleForWordSize(x) align_down_((x) * 13 / 10, HeapWordSize)
-#else
-#define ScaleForWordSize(x) (x)
-#endif
-
-// use this for flags that are true per default in the tiered build
-// but false in non-tiered builds, and vice versa
-#ifdef TIERED
-#define  trueInTiered true
-#define falseInTiered false
-#else
-#define  trueInTiered false
-#define falseInTiered true
-#endif
-
-// Default and minimum StringTable and SymbolTable size values
-// Must be powers of 2
-const size_t defaultStringTableSize = NOT_LP64(1024) LP64_ONLY(65536);
-const size_t minimumStringTableSize = 128;
-const size_t defaultSymbolTableSize = 32768; // 2^15
-const size_t minimumSymbolTableSize = 1024;
-
 #include CPU_HEADER(globals)
 #include OS_HEADER(globals)
 #include OS_CPU_HEADER(globals)
-#ifdef COMPILER1
-#include CPU_HEADER(c1_globals)
-#include OS_HEADER(c1_globals)
-#endif
-#ifdef COMPILER2
-#include CPU_HEADER(c2_globals)
-#include OS_HEADER(c2_globals)
-#endif
-
-#if !defined(COMPILER1) && !defined(COMPILER2) && !INCLUDE_JVMCI
-define_pd_global(bool, BackgroundCompilation,        false);
-define_pd_global(bool, UseTLAB,                      false);
-define_pd_global(bool, CICompileOSR,                 false);
-define_pd_global(bool, UseTypeProfile,               false);
-define_pd_global(bool, UseOnStackReplacement,        false);
-define_pd_global(bool, InlineIntrinsics,             false);
-define_pd_global(bool, PreferInterpreterNativeStubs, true);
-define_pd_global(bool, ProfileInterpreter,           false);
-define_pd_global(bool, ProfileTraps,                 false);
-define_pd_global(bool, TieredCompilation,            false);
-
-define_pd_global(intx, CompileThreshold,             0);
-
-define_pd_global(intx,   OnStackReplacePercentage,   0);
-define_pd_global(bool,   ResizeTLAB,                 false);
-define_pd_global(intx,   FreqInlineSize,             0);
-define_pd_global(size_t, NewSizeThreadIncrease,      4*K);
-define_pd_global(bool,   InlineClassNatives,         true);
-define_pd_global(bool,   InlineUnsafeOps,            true);
-define_pd_global(uintx,  InitialCodeCacheSize,       160*K);
-define_pd_global(uintx,  ReservedCodeCacheSize,      32*M);
-define_pd_global(uintx,  NonProfiledCodeHeapSize,    0);
-define_pd_global(uintx,  ProfiledCodeHeapSize,       0);
-define_pd_global(uintx,  NonNMethodCodeHeapSize,     32*M);
-
-define_pd_global(uintx,  CodeCacheExpansionSize,     32*K);
-define_pd_global(uintx,  CodeCacheMinBlockLength,    1);
-define_pd_global(uintx,  CodeCacheMinimumUseSpace,   200*K);
-define_pd_global(size_t, MetaspaceSize,              ScaleForWordSize(4*M));
-define_pd_global(bool, NeverActAsServerClassMachine, true);
-define_pd_global(uint64_t,MaxRAM,                    1ULL*G);
-#define CI_COMPILER_COUNT 0
-#else
-
-#if COMPILER2_OR_JVMCI
-#define CI_COMPILER_COUNT 2
-#else
-#define CI_COMPILER_COUNT 1
-#endif // COMPILER2_OR_JVMCI
-
-#endif // no compilers
-
-// use this for flags that are true by default in the debug version but
-// false in the optimized version, and vice versa
-#ifdef ASSERT
-#define trueInDebug  true
-#define falseInDebug false
-#else
-#define trueInDebug  false
-#define falseInDebug true
-#endif
-
-// use this for flags that are true per default in the product build
-// but false in development builds, and vice versa
-#ifdef PRODUCT
-#define trueInProduct  true
-#define falseInProduct false
-#else
-#define trueInProduct  false
-#define falseInProduct true
-#endif
 
 // develop flags are settable / visible only during development and are constant in the PRODUCT version
 // product flags are always settable / visible
@@ -216,6 +116,12 @@
 //    (multiple times allowed)
 //
 
+// Default and minimum StringTable and SymbolTable size values
+// Must be powers of 2
+const size_t defaultStringTableSize = NOT_LP64(1024) LP64_ONLY(65536);
+const size_t minimumStringTableSize = 128;
+const size_t defaultSymbolTableSize = 32768; // 2^15
+const size_t minimumSymbolTableSize = 1024;
 
 #define RUNTIME_FLAGS(develop, \
                       develop_pd, \
@@ -2560,57 +2466,6 @@
   experimental(bool, UseFastUnorderedTimeStamps, false,                     \
           "Use platform unstable time where supported for timestamps only")
 
-#define VM_FLAGS(develop,                                                   \
-                 develop_pd,                                                \
-                 product,                                                   \
-                 product_pd,                                                \
-                 diagnostic,                                                \
-                 diagnostic_pd,                                             \
-                 experimental,                                              \
-                 notproduct,                                                \
-                 manageable,                                                \
-                 product_rw,                                                \
-                 lp64_product,                                              \
-                 range,                                                     \
-                 constraint,                                                \
-                 writeable)                                                 \
-                                                                            \
-  RUNTIME_FLAGS(                                                            \
-    develop,                                                                \
-    develop_pd,                                                             \
-    product,                                                                \
-    product_pd,                                                             \
-    diagnostic,                                                             \
-    diagnostic_pd,                                                          \
-    experimental,                                                           \
-    notproduct,                                                             \
-    manageable,                                                             \
-    product_rw,                                                             \
-    lp64_product,                                                           \
-    range,                                                                  \
-    constraint,                                                             \
-    writeable)                                                              \
-                                                                            \
-  GC_FLAGS(                                                                 \
-    develop,                                                                \
-    develop_pd,                                                             \
-    product,                                                                \
-    product_pd,                                                             \
-    diagnostic,                                                             \
-    diagnostic_pd,                                                          \
-    experimental,                                                           \
-    notproduct,                                                             \
-    manageable,                                                             \
-    product_rw,                                                             \
-    lp64_product,                                                           \
-    range,                                                                  \
-    constraint,                                                             \
-    writeable)                                                              \
-
-/*
- *  Macros for factoring of globals
- */
-
 // Interface macros
 #define DECLARE_PRODUCT_FLAG(type, name, value, doc)      extern "C" type name;
 #define DECLARE_PD_PRODUCT_FLAG(type, name, doc)          extern "C" type name;
@@ -2635,70 +2490,20 @@
 #define DECLARE_LP64_PRODUCT_FLAG(type, name, value, doc) const type name = value;
 #endif // _LP64
 
-// Implementation macros
-#define MATERIALIZE_PRODUCT_FLAG(type, name, value, doc)      type name = value;
-#define MATERIALIZE_PD_PRODUCT_FLAG(type, name, doc)          type name = pd_##name;
-#define MATERIALIZE_DIAGNOSTIC_FLAG(type, name, value, doc)   type name = value;
-#define MATERIALIZE_PD_DIAGNOSTIC_FLAG(type, name, doc)       type name = pd_##name;
-#define MATERIALIZE_EXPERIMENTAL_FLAG(type, name, value, doc) type name = value;
-#define MATERIALIZE_MANAGEABLE_FLAG(type, name, value, doc)   type name = value;
-#define MATERIALIZE_PRODUCT_RW_FLAG(type, name, value, doc)   type name = value;
-#ifdef PRODUCT
-#define MATERIALIZE_DEVELOPER_FLAG(type, name, value, doc)
-#define MATERIALIZE_PD_DEVELOPER_FLAG(type, name, doc)
-#define MATERIALIZE_NOTPRODUCT_FLAG(type, name, value, doc)
-#else
-#define MATERIALIZE_DEVELOPER_FLAG(type, name, value, doc)    type name = value;
-#define MATERIALIZE_PD_DEVELOPER_FLAG(type, name, doc)        type name = pd_##name;
-#define MATERIALIZE_NOTPRODUCT_FLAG(type, name, value, doc)   type name = value;
-#endif // PRODUCT
-#ifdef _LP64
-#define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc) type name = value;
-#else
-#define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc) /* flag is constant */
-#endif // _LP64
-
-// Only materialize src code for range checking when required, ignore otherwise
-#define IGNORE_RANGE(a, b)
-// Only materialize src code for contraint checking when required, ignore otherwise
-#define IGNORE_CONSTRAINT(func,type)
-
-#define IGNORE_WRITEABLE(type)
-
-VM_FLAGS(DECLARE_DEVELOPER_FLAG, \
-         DECLARE_PD_DEVELOPER_FLAG, \
-         DECLARE_PRODUCT_FLAG, \
-         DECLARE_PD_PRODUCT_FLAG, \
-         DECLARE_DIAGNOSTIC_FLAG, \
-         DECLARE_PD_DIAGNOSTIC_FLAG, \
-         DECLARE_EXPERIMENTAL_FLAG, \
-         DECLARE_NOTPRODUCT_FLAG, \
-         DECLARE_MANAGEABLE_FLAG, \
-         DECLARE_PRODUCT_RW_FLAG, \
-         DECLARE_LP64_PRODUCT_FLAG, \
-         IGNORE_RANGE, \
-         IGNORE_CONSTRAINT, \
-         IGNORE_WRITEABLE)
-
-RUNTIME_OS_FLAGS(DECLARE_DEVELOPER_FLAG, \
-                 DECLARE_PD_DEVELOPER_FLAG, \
-                 DECLARE_PRODUCT_FLAG, \
-                 DECLARE_PD_PRODUCT_FLAG, \
-                 DECLARE_DIAGNOSTIC_FLAG, \
-                 DECLARE_PD_DIAGNOSTIC_FLAG, \
-                 DECLARE_NOTPRODUCT_FLAG, \
-                 IGNORE_RANGE, \
-                 IGNORE_CONSTRAINT, \
-                 IGNORE_WRITEABLE)
-
-ARCH_FLAGS(DECLARE_DEVELOPER_FLAG, \
-           DECLARE_PRODUCT_FLAG, \
-           DECLARE_DIAGNOSTIC_FLAG, \
-           DECLARE_EXPERIMENTAL_FLAG, \
-           DECLARE_NOTPRODUCT_FLAG, \
-           IGNORE_RANGE, \
-           IGNORE_CONSTRAINT, \
-           IGNORE_WRITEABLE)
+ALL_FLAGS(DECLARE_DEVELOPER_FLAG,     \
+          DECLARE_PD_DEVELOPER_FLAG,  \
+          DECLARE_PRODUCT_FLAG,       \
+          DECLARE_PD_PRODUCT_FLAG,    \
+          DECLARE_DIAGNOSTIC_FLAG,    \
+          DECLARE_PD_DIAGNOSTIC_FLAG, \
+          DECLARE_EXPERIMENTAL_FLAG,  \
+          DECLARE_NOTPRODUCT_FLAG,    \
+          DECLARE_MANAGEABLE_FLAG,    \
+          DECLARE_PRODUCT_RW_FLAG,    \
+          DECLARE_LP64_PRODUCT_FLAG,  \
+          IGNORE_RANGE,               \
+          IGNORE_CONSTRAINT,          \
+          IGNORE_WRITEABLE)
 
 // Extensions
 
--- a/src/hotspot/share/runtime/globals_ext.hpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/runtime/globals_ext.hpp	Wed May 22 13:05:37 2019 +0200
@@ -29,11 +29,8 @@
 
 // globals_extension.hpp extension
 
-// Additional JVMFlags enum values
-#define JVMFLAGS_EXT
-
-// Additional JVMFlagsWithType enum values
-#define JVMFLAGSWITHTYPE_EXT
+// Additional JVMFlagsEnum values
+#define JVMFLAGSENUM_EXT
 
 
 // globals.cpp extension
--- a/src/hotspot/share/runtime/globals_extension.hpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/runtime/globals_extension.hpp	Wed May 22 13:05:37 2019 +0200
@@ -27,285 +27,57 @@
 
 #include "runtime/globals.hpp"
 #include "utilities/macros.hpp"
-#if INCLUDE_JVMCI
-#include "jvmci/jvmci_globals.hpp"
-#endif
-#ifdef COMPILER1
-#include "c1/c1_globals.hpp"
-#endif
-#ifdef COMPILER2
-#include "opto/c2_globals.hpp"
-#endif
 
 // Construct enum of Flag_<cmdline-arg> constants.
 
-// Parenthesis left off in the following for the enum decl below.
-#define FLAG_MEMBER(flag) Flag_##flag
+#define FLAG_MEMBER_ENUM(name) Flag_##name##_enum
+#define FLAG_MEMBER_ENUM_(name) FLAG_MEMBER_ENUM(name),
 
-#define RUNTIME_PRODUCT_FLAG_MEMBER(type, name, value, doc)      FLAG_MEMBER(name),
-#define RUNTIME_PD_PRODUCT_FLAG_MEMBER(type, name, doc)          FLAG_MEMBER(name),
-#define RUNTIME_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc)   FLAG_MEMBER(name),
-#define RUNTIME_PD_DIAGNOSTIC_FLAG_MEMBER(type, name, doc)       FLAG_MEMBER(name),
-#define RUNTIME_EXPERIMENTAL_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
-#define RUNTIME_MANAGEABLE_FLAG_MEMBER(type, name, value, doc)   FLAG_MEMBER(name),
-#define RUNTIME_PRODUCT_RW_FLAG_MEMBER(type, name, value, doc)   FLAG_MEMBER(name),
-#define RUNTIME_DEVELOP_FLAG_MEMBER(type, name, value, doc)      FLAG_MEMBER(name),
-#define RUNTIME_PD_DEVELOP_FLAG_MEMBER(type, name, doc)          FLAG_MEMBER(name),
-#define RUNTIME_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc)   FLAG_MEMBER(name),
-
-#define JVMCI_PRODUCT_FLAG_MEMBER(type, name, value, doc)        FLAG_MEMBER(name),
-#define JVMCI_PD_PRODUCT_FLAG_MEMBER(type, name, doc)            FLAG_MEMBER(name),
-#define JVMCI_DEVELOP_FLAG_MEMBER(type, name, value, doc)        FLAG_MEMBER(name),
-#define JVMCI_PD_DEVELOP_FLAG_MEMBER(type, name, doc)            FLAG_MEMBER(name),
-#define JVMCI_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc)     FLAG_MEMBER(name),
-#define JVMCI_PD_DIAGNOSTIC_FLAG_MEMBER(type, name, doc)         FLAG_MEMBER(name),
-#define JVMCI_EXPERIMENTAL_FLAG_MEMBER(type, name, value, doc)   FLAG_MEMBER(name),
-#define JVMCI_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc)     FLAG_MEMBER(name),
-
+#define FLAG_MEMBER_ENUM_PRODUCT(type, name, value, doc)      FLAG_MEMBER_ENUM_(name)
+#define FLAG_MEMBER_ENUM_PD_PRODUCT(type, name, doc)          FLAG_MEMBER_ENUM_(name)
+#define FLAG_MEMBER_ENUM_DIAGNOSTIC(type, name, value, doc)   FLAG_MEMBER_ENUM_(name)
+#define FLAG_MEMBER_ENUM_PD_DIAGNOSTIC(type, name, doc)       FLAG_MEMBER_ENUM_(name)
+#define FLAG_MEMBER_ENUM_EXPERIMENTAL(type, name, value, doc) FLAG_MEMBER_ENUM_(name)
+#define FLAG_MEMBER_ENUM_MANAGEABLE(type, name, value, doc)   FLAG_MEMBER_ENUM_(name)
+#define FLAG_MEMBER_ENUM_PRODUCT_RW(type, name, value, doc)   FLAG_MEMBER_ENUM_(name)
+#define FLAG_MEMBER_ENUM_DEVELOP(type, name, value, doc)      FLAG_MEMBER_ENUM_(name)
+#define FLAG_MEMBER_ENUM_PD_DEVELOP(type, name, doc)          FLAG_MEMBER_ENUM_(name)
+#define FLAG_MEMBER_ENUM_NOTPRODUCT(type, name, value, doc)   FLAG_MEMBER_ENUM_(name)
 #ifdef _LP64
-#define RUNTIME_LP64_PRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
+#define FLAG_MEMBER_ENUM_LP64_PRODUCT(type, name, value, doc) FLAG_MEMBER_ENUM_(name)
 #else
-#define RUNTIME_LP64_PRODUCT_FLAG_MEMBER(type, name, value, doc) /* flag is constant */
+#define FLAG_MEMBER_ENUM_LP64_PRODUCT(type, name, value, doc) /* flag is constant */
 #endif // _LP64
 
-#define C1_PRODUCT_FLAG_MEMBER(type, name, value, doc)           FLAG_MEMBER(name),
-#define C1_PD_PRODUCT_FLAG_MEMBER(type, name, doc)               FLAG_MEMBER(name),
-#define C1_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc)        FLAG_MEMBER(name),
-#define C1_PD_DIAGNOSTIC_FLAG_MEMBER(type, name, doc)            FLAG_MEMBER(name),
-#define C1_DEVELOP_FLAG_MEMBER(type, name, value, doc)           FLAG_MEMBER(name),
-#define C1_PD_DEVELOP_FLAG_MEMBER(type, name, doc)               FLAG_MEMBER(name),
-#define C1_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc)        FLAG_MEMBER(name),
-
-#define C2_PRODUCT_FLAG_MEMBER(type, name, value, doc)           FLAG_MEMBER(name),
-#define C2_PD_PRODUCT_FLAG_MEMBER(type, name, doc)               FLAG_MEMBER(name),
-#define C2_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc)        FLAG_MEMBER(name),
-#define C2_PD_DIAGNOSTIC_FLAG_MEMBER(type, name, doc)            FLAG_MEMBER(name),
-#define C2_EXPERIMENTAL_FLAG_MEMBER(type, name, value, doc)      FLAG_MEMBER(name),
-#define C2_DEVELOP_FLAG_MEMBER(type, name, value, doc)           FLAG_MEMBER(name),
-#define C2_PD_DEVELOP_FLAG_MEMBER(type, name, doc)               FLAG_MEMBER(name),
-#define C2_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc)        FLAG_MEMBER(name),
-
-#define ARCH_PRODUCT_FLAG_MEMBER(type, name, value, doc)         FLAG_MEMBER(name),
-#define ARCH_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc)      FLAG_MEMBER(name),
-#define ARCH_EXPERIMENTAL_FLAG_MEMBER(type, name, value, doc)    FLAG_MEMBER(name),
-#define ARCH_DEVELOP_FLAG_MEMBER(type, name, value, doc)         FLAG_MEMBER(name),
-#define ARCH_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc)      FLAG_MEMBER(name),
-
 typedef enum {
- VM_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, \
-          RUNTIME_PD_DEVELOP_FLAG_MEMBER, \
-          RUNTIME_PRODUCT_FLAG_MEMBER, \
-          RUNTIME_PD_PRODUCT_FLAG_MEMBER, \
-          RUNTIME_DIAGNOSTIC_FLAG_MEMBER, \
-          RUNTIME_PD_DIAGNOSTIC_FLAG_MEMBER, \
-          RUNTIME_EXPERIMENTAL_FLAG_MEMBER, \
-          RUNTIME_NOTPRODUCT_FLAG_MEMBER, \
-          RUNTIME_MANAGEABLE_FLAG_MEMBER, \
-          RUNTIME_PRODUCT_RW_FLAG_MEMBER, \
-          RUNTIME_LP64_PRODUCT_FLAG_MEMBER, \
-          IGNORE_RANGE, \
-          IGNORE_CONSTRAINT, \
-          IGNORE_WRITEABLE)
-
- RUNTIME_OS_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER,    \
-                  RUNTIME_PD_DEVELOP_FLAG_MEMBER, \
-                  RUNTIME_PRODUCT_FLAG_MEMBER, \
-                  RUNTIME_PD_PRODUCT_FLAG_MEMBER, \
-                  RUNTIME_DIAGNOSTIC_FLAG_MEMBER, \
-                  RUNTIME_PD_DIAGNOSTIC_FLAG_MEMBER, \
-                  RUNTIME_NOTPRODUCT_FLAG_MEMBER, \
-                  IGNORE_RANGE, \
-                  IGNORE_CONSTRAINT, \
-                  IGNORE_WRITEABLE)
-#if INCLUDE_JVMCI
- JVMCI_FLAGS(JVMCI_DEVELOP_FLAG_MEMBER, \
-             JVMCI_PD_DEVELOP_FLAG_MEMBER, \
-             JVMCI_PRODUCT_FLAG_MEMBER, \
-             JVMCI_PD_PRODUCT_FLAG_MEMBER, \
-             JVMCI_DIAGNOSTIC_FLAG_MEMBER, \
-             JVMCI_PD_DIAGNOSTIC_FLAG_MEMBER, \
-             JVMCI_EXPERIMENTAL_FLAG_MEMBER, \
-             JVMCI_NOTPRODUCT_FLAG_MEMBER, \
-             IGNORE_RANGE, \
-             IGNORE_CONSTRAINT, \
-             IGNORE_WRITEABLE)
-#endif // INCLUDE_JVMCI
-#ifdef COMPILER1
- C1_FLAGS(C1_DEVELOP_FLAG_MEMBER, \
-          C1_PD_DEVELOP_FLAG_MEMBER, \
-          C1_PRODUCT_FLAG_MEMBER, \
-          C1_PD_PRODUCT_FLAG_MEMBER, \
-          C1_DIAGNOSTIC_FLAG_MEMBER, \
-          C1_PD_DIAGNOSTIC_FLAG_MEMBER, \
-          C1_NOTPRODUCT_FLAG_MEMBER, \
-          IGNORE_RANGE, \
-          IGNORE_CONSTRAINT, \
-          IGNORE_WRITEABLE)
-#endif
-#ifdef COMPILER2
- C2_FLAGS(C2_DEVELOP_FLAG_MEMBER, \
-          C2_PD_DEVELOP_FLAG_MEMBER, \
-          C2_PRODUCT_FLAG_MEMBER, \
-          C2_PD_PRODUCT_FLAG_MEMBER, \
-          C2_DIAGNOSTIC_FLAG_MEMBER, \
-          C2_PD_DIAGNOSTIC_FLAG_MEMBER, \
-          C2_EXPERIMENTAL_FLAG_MEMBER, \
-          C2_NOTPRODUCT_FLAG_MEMBER, \
-          IGNORE_RANGE, \
-          IGNORE_CONSTRAINT, \
-          IGNORE_WRITEABLE)
-#endif
- ARCH_FLAGS(ARCH_DEVELOP_FLAG_MEMBER, \
-            ARCH_PRODUCT_FLAG_MEMBER, \
-            ARCH_DIAGNOSTIC_FLAG_MEMBER, \
-            ARCH_EXPERIMENTAL_FLAG_MEMBER, \
-            ARCH_NOTPRODUCT_FLAG_MEMBER, \
-            IGNORE_RANGE, \
-            IGNORE_CONSTRAINT, \
+  ALL_FLAGS(FLAG_MEMBER_ENUM_DEVELOP,
+            FLAG_MEMBER_ENUM_PD_DEVELOP,
+            FLAG_MEMBER_ENUM_PRODUCT,
+            FLAG_MEMBER_ENUM_PD_PRODUCT,
+            FLAG_MEMBER_ENUM_DIAGNOSTIC,
+            FLAG_MEMBER_ENUM_PD_DIAGNOSTIC,
+            FLAG_MEMBER_ENUM_EXPERIMENTAL,
+            FLAG_MEMBER_ENUM_NOTPRODUCT,
+            FLAG_MEMBER_ENUM_MANAGEABLE,
+            FLAG_MEMBER_ENUM_PRODUCT_RW,
+            FLAG_MEMBER_ENUM_LP64_PRODUCT,
+            IGNORE_RANGE,
+            IGNORE_CONSTRAINT,
             IGNORE_WRITEABLE)
- JVMFLAGS_EXT
- NUM_JVMFlags
-} JVMFlags;
-
-// Construct enum of Flag_<cmdline-arg>_<type> constants.
-
-#define FLAG_MEMBER_WITH_TYPE(flag,type) Flag_##flag##_##type
-
-#define RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)      FLAG_MEMBER_WITH_TYPE(name,type),
-#define RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc)          FLAG_MEMBER_WITH_TYPE(name,type),
-#define RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)   FLAG_MEMBER_WITH_TYPE(name,type),
-#define RUNTIME_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, doc)       FLAG_MEMBER_WITH_TYPE(name,type),
-#define RUNTIME_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
-#define RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)   FLAG_MEMBER_WITH_TYPE(name,type),
-#define RUNTIME_PRODUCT_RW_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)   FLAG_MEMBER_WITH_TYPE(name,type),
-#define RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)      FLAG_MEMBER_WITH_TYPE(name,type),
-#define RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc)          FLAG_MEMBER_WITH_TYPE(name,type),
-#define RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)   FLAG_MEMBER_WITH_TYPE(name,type),
-
-#define JVMCI_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)        FLAG_MEMBER_WITH_TYPE(name,type),
-#define JVMCI_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc)            FLAG_MEMBER_WITH_TYPE(name,type),
-#define JVMCI_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)        FLAG_MEMBER_WITH_TYPE(name,type),
-#define JVMCI_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc)            FLAG_MEMBER_WITH_TYPE(name,type),
-#define JVMCI_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)     FLAG_MEMBER_WITH_TYPE(name,type),
-#define JVMCI_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, doc)         FLAG_MEMBER_WITH_TYPE(name,type),
-#define JVMCI_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)   FLAG_MEMBER_WITH_TYPE(name,type),
-#define JVMCI_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)     FLAG_MEMBER_WITH_TYPE(name,type),
+  JVMFLAGSENUM_EXT
+  NUM_JVMFlagsEnum
+} JVMFlagsEnum;
 
-#define C1_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)           FLAG_MEMBER_WITH_TYPE(name,type),
-#define C1_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc)               FLAG_MEMBER_WITH_TYPE(name,type),
-#define C1_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)        FLAG_MEMBER_WITH_TYPE(name,type),
-#define C1_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, doc)            FLAG_MEMBER_WITH_TYPE(name,type),
-#define C1_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)           FLAG_MEMBER_WITH_TYPE(name,type),
-#define C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc)               FLAG_MEMBER_WITH_TYPE(name,type),
-#define C1_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)        FLAG_MEMBER_WITH_TYPE(name,type),
-
-#ifdef _LP64
-#define RUNTIME_LP64_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
-#else
-#define RUNTIME_LP64_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) /* flag is constant */
-#endif // _LP64
-
-#define C2_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)           FLAG_MEMBER_WITH_TYPE(name,type),
-#define C2_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc)               FLAG_MEMBER_WITH_TYPE(name,type),
-#define C2_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)        FLAG_MEMBER_WITH_TYPE(name,type),
-#define C2_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, doc)            FLAG_MEMBER_WITH_TYPE(name,type),
-#define C2_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)      FLAG_MEMBER_WITH_TYPE(name,type),
-#define C2_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)           FLAG_MEMBER_WITH_TYPE(name,type),
-#define C2_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc)               FLAG_MEMBER_WITH_TYPE(name,type),
-#define C2_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)        FLAG_MEMBER_WITH_TYPE(name,type),
-
-#define ARCH_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)         FLAG_MEMBER_WITH_TYPE(name,type),
-#define ARCH_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)      FLAG_MEMBER_WITH_TYPE(name,type),
-#define ARCH_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)    FLAG_MEMBER_WITH_TYPE(name,type),
-#define ARCH_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)         FLAG_MEMBER_WITH_TYPE(name,type),
-#define ARCH_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)      FLAG_MEMBER_WITH_TYPE(name,type),
-
-typedef enum {
-  VM_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE,
-           RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
-           RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE,
-           RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
-           RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
-           RUNTIME_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
-           RUNTIME_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE,
-           RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
-           RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE,
-           RUNTIME_PRODUCT_RW_FLAG_MEMBER_WITH_TYPE,
-           RUNTIME_LP64_PRODUCT_FLAG_MEMBER_WITH_TYPE,
-           IGNORE_RANGE,
-           IGNORE_CONSTRAINT,
-           IGNORE_WRITEABLE)
-
- RUNTIME_OS_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE,
-                  RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
-                  RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE,
-                  RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
-                  RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
-                  RUNTIME_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
-                  RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
-                  IGNORE_RANGE,
-                  IGNORE_CONSTRAINT,
-                  IGNORE_WRITEABLE)
-#if INCLUDE_JVMCI
- JVMCI_FLAGS(JVMCI_DEVELOP_FLAG_MEMBER_WITH_TYPE,
-             JVMCI_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
-             JVMCI_PRODUCT_FLAG_MEMBER_WITH_TYPE,
-             JVMCI_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
-             JVMCI_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
-             JVMCI_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
-             JVMCI_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE,
-             JVMCI_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
-             IGNORE_RANGE,
-             IGNORE_CONSTRAINT,
-             IGNORE_WRITEABLE)
-#endif // INCLUDE_JVMCI
-#ifdef COMPILER1
- C1_FLAGS(C1_DEVELOP_FLAG_MEMBER_WITH_TYPE,
-          C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
-          C1_PRODUCT_FLAG_MEMBER_WITH_TYPE,
-          C1_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
-          C1_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
-          C1_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
-          C1_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
-          IGNORE_RANGE,
-          IGNORE_CONSTRAINT,
-          IGNORE_WRITEABLE)
-#endif
-#ifdef COMPILER2
- C2_FLAGS(C2_DEVELOP_FLAG_MEMBER_WITH_TYPE,
-          C2_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
-          C2_PRODUCT_FLAG_MEMBER_WITH_TYPE,
-          C2_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
-          C2_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
-          C2_PD_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
-          C2_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE,
-          C2_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
-          IGNORE_RANGE,
-          IGNORE_CONSTRAINT,
-          IGNORE_WRITEABLE)
-#endif
- ARCH_FLAGS(ARCH_DEVELOP_FLAG_MEMBER_WITH_TYPE,
-          ARCH_PRODUCT_FLAG_MEMBER_WITH_TYPE,
-          ARCH_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
-          ARCH_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE,
-          ARCH_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
-          IGNORE_RANGE,
-          IGNORE_CONSTRAINT,
-          IGNORE_WRITEABLE)
-  JVMFLAGSWITHTYPE_EXT
-  NUM_JVMFlagsWithType
-} JVMFlagsWithType;
-
-#define FLAG_IS_DEFAULT(name)         (JVMFlagEx::is_default(FLAG_MEMBER(name)))
-#define FLAG_IS_ERGO(name)            (JVMFlagEx::is_ergo(FLAG_MEMBER(name)))
-#define FLAG_IS_CMDLINE(name)         (JVMFlagEx::is_cmdline(FLAG_MEMBER(name)))
+#define FLAG_IS_DEFAULT(name)         (JVMFlagEx::is_default(FLAG_MEMBER_ENUM(name)))
+#define FLAG_IS_ERGO(name)            (JVMFlagEx::is_ergo(FLAG_MEMBER_ENUM(name)))
+#define FLAG_IS_CMDLINE(name)         (JVMFlagEx::is_cmdline(FLAG_MEMBER_ENUM(name)))
 
 #define FLAG_SET_DEFAULT(name, value) ((name) = (value))
 
-#define FLAG_SET_CMDLINE(type, name, value) (JVMFlagEx::setOnCmdLine(FLAG_MEMBER_WITH_TYPE(name, type)), \
-                                             JVMFlagEx::type##AtPut(FLAG_MEMBER_WITH_TYPE(name, type), (type)(value), JVMFlag::COMMAND_LINE))
-#define FLAG_SET_ERGO(type, name, value)    (JVMFlagEx::type##AtPut(FLAG_MEMBER_WITH_TYPE(name, type), (type)(value), JVMFlag::ERGONOMIC))
-#define FLAG_SET_MGMT(type, name, value)    (JVMFlagEx::type##AtPut(FLAG_MEMBER_WITH_TYPE(name, type), (type)(value), JVMFlag::MANAGEMENT))
+#define FLAG_SET_CMDLINE(type, name, value) (JVMFlagEx::setOnCmdLine(FLAG_MEMBER_ENUM(name)), \
+                                             JVMFlagEx::type##AtPut(FLAG_MEMBER_ENUM(name), (type)(value), JVMFlag::COMMAND_LINE))
+#define FLAG_SET_ERGO(type, name, value)    (JVMFlagEx::type##AtPut(FLAG_MEMBER_ENUM(name), (type)(value), JVMFlag::ERGONOMIC))
+#define FLAG_SET_MGMT(type, name, value)    (JVMFlagEx::type##AtPut(FLAG_MEMBER_ENUM(name), (type)(value), JVMFlag::MANAGEMENT))
 
 #define FLAG_SET_ERGO_IF_DEFAULT(type, name, value) \
   do {                                              \
@@ -318,22 +90,22 @@
 // of a circular dependency on the enum definition.
 class JVMFlagEx : JVMFlag {
  public:
-  static JVMFlag::Error boolAtPut(JVMFlagsWithType flag, bool value, JVMFlag::Flags origin);
-  static JVMFlag::Error intAtPut(JVMFlagsWithType flag, int value, JVMFlag::Flags origin);
-  static JVMFlag::Error uintAtPut(JVMFlagsWithType flag, uint value, JVMFlag::Flags origin);
-  static JVMFlag::Error intxAtPut(JVMFlagsWithType flag, intx value, JVMFlag::Flags origin);
-  static JVMFlag::Error uintxAtPut(JVMFlagsWithType flag, uintx value, JVMFlag::Flags origin);
-  static JVMFlag::Error uint64_tAtPut(JVMFlagsWithType flag, uint64_t value, JVMFlag::Flags origin);
-  static JVMFlag::Error size_tAtPut(JVMFlagsWithType flag, size_t value, JVMFlag::Flags origin);
-  static JVMFlag::Error doubleAtPut(JVMFlagsWithType flag, double value, JVMFlag::Flags origin);
+  static JVMFlag::Error boolAtPut(JVMFlagsEnum flag, bool value, JVMFlag::Flags origin);
+  static JVMFlag::Error intAtPut(JVMFlagsEnum flag, int value, JVMFlag::Flags origin);
+  static JVMFlag::Error uintAtPut(JVMFlagsEnum flag, uint value, JVMFlag::Flags origin);
+  static JVMFlag::Error intxAtPut(JVMFlagsEnum flag, intx value, JVMFlag::Flags origin);
+  static JVMFlag::Error uintxAtPut(JVMFlagsEnum flag, uintx value, JVMFlag::Flags origin);
+  static JVMFlag::Error uint64_tAtPut(JVMFlagsEnum flag, uint64_t value, JVMFlag::Flags origin);
+  static JVMFlag::Error size_tAtPut(JVMFlagsEnum flag, size_t value, JVMFlag::Flags origin);
+  static JVMFlag::Error doubleAtPut(JVMFlagsEnum flag, double value, JVMFlag::Flags origin);
   // Contract:  Flag will make private copy of the incoming value
-  static JVMFlag::Error ccstrAtPut(JVMFlagsWithType flag, ccstr value, JVMFlag::Flags origin);
+  static JVMFlag::Error ccstrAtPut(JVMFlagsEnum flag, ccstr value, JVMFlag::Flags origin);
 
-  static bool is_default(JVMFlags flag);
-  static bool is_ergo(JVMFlags flag);
-  static bool is_cmdline(JVMFlags flag);
+  static bool is_default(JVMFlagsEnum flag);
+  static bool is_ergo(JVMFlagsEnum flag);
+  static bool is_cmdline(JVMFlagsEnum flag);
 
-  static void setOnCmdLine(JVMFlagsWithType flag);
+  static void setOnCmdLine(JVMFlagsEnum flag);
 };
 
 #endif // SHARE_RUNTIME_GLOBALS_EXTENSION_HPP
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/hotspot/share/runtime/globals_shared.hpp	Wed May 22 13:05:37 2019 +0200
@@ -0,0 +1,223 @@
+/*
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#ifndef SHARE_RUNTIME_GLOBALS_SHARED_HPP
+#define SHARE_RUNTIME_GLOBALS_SHARED_HPP
+
+#include "utilities/align.hpp"
+#include "utilities/globalDefinitions.hpp"
+#include "utilities/macros.hpp"
+
+#include <float.h> // for DBL_MAX
+
+// The larger HeapWordSize for 64bit requires larger heaps
+// for the same application running in 64bit.  See bug 4967770.
+// The minimum alignment to a heap word size is done.  Other
+// parts of the memory system may require additional alignment
+// and are responsible for those alignments.
+#ifdef _LP64
+#define ScaleForWordSize(x) align_down_((x) * 13 / 10, HeapWordSize)
+#else
+#define ScaleForWordSize(x) (x)
+#endif
+
+// use this for flags that are true per default in the tiered build
+// but false in non-tiered builds, and vice versa
+#ifdef TIERED
+#define  trueInTiered true
+#define falseInTiered false
+#else
+#define  trueInTiered false
+#define falseInTiered true
+#endif
+
+// use this for flags that are true by default in the debug version but
+// false in the optimized version, and vice versa
+#ifdef ASSERT
+#define trueInDebug  true
+#define falseInDebug false
+#else
+#define trueInDebug  false
+#define falseInDebug true
+#endif
+
+// use this for flags that are true per default in the product build
+// but false in development builds, and vice versa
+#ifdef PRODUCT
+#define trueInProduct  true
+#define falseInProduct false
+#else
+#define trueInProduct  false
+#define falseInProduct true
+#endif
+
+// Only materialize src code for range checking when required, ignore otherwise
+#define IGNORE_RANGE(a, b)
+// Only materialize src code for contraint checking when required, ignore otherwise
+#define IGNORE_CONSTRAINT(func,type)
+
+#define IGNORE_WRITEABLE(type)
+
+#define VM_FLAGS(             \
+    develop,                  \
+    develop_pd,               \
+    product,                  \
+    product_pd,               \
+    diagnostic,               \
+    diagnostic_pd,            \
+    experimental,             \
+    notproduct,               \
+    manageable,               \
+    product_rw,               \
+    lp64_product,             \
+    range,                    \
+    constraint,               \
+    writeable)                \
+                              \
+  RUNTIME_FLAGS(              \
+    develop,                  \
+    develop_pd,               \
+    product,                  \
+    product_pd,               \
+    diagnostic,               \
+    diagnostic_pd,            \
+    experimental,             \
+    notproduct,               \
+    manageable,               \
+    product_rw,               \
+    lp64_product,             \
+    range,                    \
+    constraint,               \
+    writeable)                \
+                              \
+  GC_FLAGS(                   \
+    develop,                  \
+    develop_pd,               \
+    product,                  \
+    product_pd,               \
+    diagnostic,               \
+    diagnostic_pd,            \
+    experimental,             \
+    notproduct,               \
+    manageable,               \
+    product_rw,               \
+    lp64_product,             \
+    range,                    \
+    constraint,               \
+    writeable)                \
+
+
+#define ALL_FLAGS(            \
+    develop,                  \
+    develop_pd,               \
+    product,                  \
+    product_pd,               \
+    diagnostic,               \
+    diagnostic_pd,            \
+    experimental,             \
+    notproduct,               \
+    manageable,               \
+    product_rw,               \
+    lp64_product,             \
+    range,                    \
+    constraint,               \
+    writeable)                \
+                              \
+  VM_FLAGS(                   \
+    develop,                  \
+    develop_pd,               \
+    product,                  \
+    product_pd,               \
+    diagnostic,               \
+    diagnostic_pd,            \
+    experimental,             \
+    notproduct,               \
+    manageable,               \
+    product_rw,               \
+    lp64_product,             \
+    range,                    \
+    constraint,               \
+    writeable)                \
+                              \
+  RUNTIME_OS_FLAGS(           \
+    develop,                  \
+    develop_pd,               \
+    product,                  \
+    product_pd,               \
+    diagnostic,               \
+    diagnostic_pd,            \
+    notproduct,               \
+    range,                    \
+    constraint,               \
+    writeable)                \
+                              \
+  JVMCI_ONLY(JVMCI_FLAGS(     \
+    develop,                  \
+    develop_pd,               \
+    product,                  \
+    product_pd,               \
+    diagnostic,               \
+    diagnostic_pd,            \
+    experimental,             \
+    notproduct,               \
+    range,                    \
+    constraint,               \
+    writeable))               \
+                              \
+  COMPILER1_PRESENT(C1_FLAGS( \
+    develop,                  \
+    develop_pd,               \
+    product,                  \
+    product_pd,               \
+    diagnostic,               \
+    diagnostic_pd,            \
+    notproduct,               \
+    range,                    \
+    constraint,               \
+    writeable))               \
+                              \
+  COMPILER2_PRESENT(C2_FLAGS( \
+    develop,                  \
+    develop_pd,               \
+    product,                  \
+    product_pd,               \
+    diagnostic,               \
+    diagnostic_pd,            \
+    experimental,             \
+    notproduct,               \
+    range,                    \
+    constraint,               \
+    writeable))               \
+                              \
+  ARCH_FLAGS(                 \
+    develop,                  \
+    product,                  \
+    diagnostic,               \
+    experimental,             \
+    notproduct,               \
+    range,                    \
+    constraint,               \
+    writeable)
+
+#endif // SHARE_RUNTIME_GLOBALS_SHARED_HPP
--- a/src/hotspot/share/runtime/safepoint.cpp	Wed May 22 07:12:18 2019 -0400
+++ b/src/hotspot/share/runtime/safepoint.cpp	Wed May 22 13:05:37 2019 +0200
@@ -67,9 +67,6 @@
 #include "services/runtimeService.hpp"
 #include "utilities/events.hpp"
 #include "utilities/macros.hpp"
-#ifdef COMPILER1
-#include "c1/c1_globals.hpp"
-#endif
 
 static void post_safepoint_begin_event(EventSafepointBegin& event,
                                        uint64_t safepoint_id,