Summary
Change the Z Garbage Collector from an experimental feature into a product feature.
Problem
ZGC is currently an experimental feature enabled via the command-line options -XX:+UnlockExperimentalVMOptions -XX:+UseZGC. JEP 377 proposes to make ZGC a product (non-experimental) feature, meaning it should be possible to enable without using -XX:+UnlockExperimentalVMOptions.
Solution
The following existing command-line options will be changed from experimental to product. Their default values will remain unchanged.
- UseZGC
- ZAllocationSpikeTolerance
- ZFragmentationLimit
- ZMarkStackSpaceLimit
- ZCollectionInterval
- ZProactive
- ZUncommit
- ZUncommitDelay
Specification
diff --git a/src/hotspot/share/gc/shared/gc_globals.hpp b/src/hotspot/share/gc/shared/gc_globals.hpp
--- a/src/hotspot/share/gc/shared/gc_globals.hpp
+++ b/src/hotspot/share/gc/shared/gc_globals.hpp
@@ -164,7 +164,7 @@
   experimental(bool, UseEpsilonGC, false,                                   \
           "Use the Epsilon (no-op) garbage collector")                      \
                                                                             \
-  experimental(bool, UseZGC, false,                                         \
+  product(bool, UseZGC, false,                                              \
           "Use the Z garbage collector")                                    \
                                                                             \
   experimental(bool, UseShenandoahGC, false,                                \
diff --git a/src/hotspot/share/gc/z/z_globals.hpp b/src/hotspot/share/gc/z/z_globals.hpp
--- a/src/hotspot/share/gc/z/z_globals.hpp
+++ b/src/hotspot/share/gc/z/z_globals.hpp
@@ -38,26 +38,26 @@
                    range,                                                   \
                    constraint)                                              \
                                                                             \
-  experimental(double, ZAllocationSpikeTolerance, 2.0,                      \
+  product(double, ZAllocationSpikeTolerance, 2.0,                           \
           "Allocation spike tolerance factor")                              \
                                                                             \
-  experimental(double, ZFragmentationLimit, 25.0,                           \
+  product(double, ZFragmentationLimit, 25.0,                                \
           "Maximum allowed heap fragmentation")                             \
                                                                             \
-  experimental(size_t, ZMarkStackSpaceLimit, 8*G,                           \
+  product(size_t, ZMarkStackSpaceLimit, 8*G,                                \
           "Maximum number of bytes allocated for mark stacks")              \
           range(32*M, 1024*G)                                               \
                                                                             \
-  experimental(uint, ZCollectionInterval, 0,                                \
+  product(uint, ZCollectionInterval, 0,                                     \
           "Force GC at a fixed time interval (in seconds)")                  \
                                                                             \
-  experimental(bool, ZProactive, true,                                      \
+  product(bool, ZProactive, true,                                           \
           "Enable proactive GC cycles")                                     \
                                                                             \
-  experimental(bool, ZUncommit, true,                                       \
+  product(bool, ZUncommit, true,                                            \
           "Uncommit unused memory")                                         \
                                                                             \
-  experimental(uintx, ZUncommitDelay, 5 * 60,                               \
+  product(uintx, ZUncommitDelay, 5 * 60,                                    \
           "Uncommit memory if it has been unused for the specified "         \
           "amount of time (in seconds)")                                    \
                                                                             \- csr of
- 
                    JDK-8240745 Implementation: JEP 377: ZGC: A Scalable Low-Latency Garbage Collector (Production) -           
- Resolved
 
-         
- relates to
- 
                    JDK-8209683 JEP 377: ZGC: A Scalable Low-Latency Garbage Collector (Production) -           
- Closed
 
-