1 /*
   2  * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 #ifndef SHARE_GC_Z_ZFLAGS_HPP
  25 #define SHARE_GC_Z_ZFLAGS_HPP
  26 
  27 #include "runtime/globals.hpp"
  28 
  29 #define Z_FLAGS(develop,       \
  30                 develop_pd,    \
  31                 product,       \
  32                 product_pd,    \
  33                 diagnostic,    \
  34                 diagnostic_pd, \
  35                 experimental,  \
  36                 notproduct,    \
  37                 manageable,    \
  38                 product_rw,    \
  39                 range,         \
  40                 constraint,    \
  41                 writeable)     \
  42                                                                             \
  43   product(bool, UseZGC, false,                                              \
  44           "Use the Z garbage collector")                                    \
  45                                                                             \
  46   product(bool, UseLoadBarrier, false,                                      \
  47           "Use load barrier on all reference loads")                        \
  48                                                                             \
  49   product(ccstr, ZPath, NULL,                                               \
  50           "Filesystem path for Java heap backing storage "                  \
  51           "(must be a tmpfs or a hugetlbfs filesystem)")                    \
  52                                                                             \
  53   product(double, ZAllocationSpikeTolerance, 2.0,                           \
  54           "Allocation spike tolerance factor")                              \
  55                                                                             \
  56   product(double, ZFragmentationLimit, 25.0,                                \
  57           "Maximum allowed heap fragmentation")                             \
  58                                                                             \
  59   product(bool, ZStallOnOutOfMemory, true,                                  \
  60           "Allow Java threads to stall and wait for GC to complete "        \
  61           "instead of immediately throwing an OutOfMemoryError")            \
  62                                                                             \
  63   product(uint, ZCollectionInterval, 0,                                     \
  64           "Time between GCs (in seconds)")                                  \
  65                                                                             \
  66   product(uint, ZStatisticsInterval, 10,                                    \
  67           "Time between statistics print outs (in seconds)")                \
  68           range(1, (uint)-1)                                                \
  69                                                                             \
  70   product(bool, ZStatisticsForceTrace, false,                               \
  71           "Force tracing of ZStats")                                        \
  72                                                                             \
  73   product(bool, ZUnmapBadViews, false,                                      \
  74           "Unmap bad address views (for debugging only)")                   \
  75                                                                             \
  76   product(bool, ZVerifyMarking, false,                                      \
  77           "Verify marking stacks (for debugging only)")                     \
  78                                                                             \
  79   product(bool, ZVerifyForwarding, false,                                   \
  80           "Verify forwarding tables (for debugging only)")                  \
  81                                                                             \
  82   product(bool, ZWeakRoots, true,                                           \
  83           "Treat JNI WeakGlobalRefs and StringTable as weak roots "         \
  84           "(for debugging only)")                                           \
  85                                                                             \
  86   product(bool, ZConcurrentJNIWeakGlobalHandles, true,                      \
  87           "Clean JNI WeakGlobalRefs concurrently (for debugging only)")     \
  88                                                                             \
  89   product(size_t, ZMarkStacksMax, NOT_LP64(512*M) LP64_ONLY(8*G),           \
  90           "Maximum number of bytes allocated for marking stacks")           \
  91           range(32*M, NOT_LP64(512*M) LP64_ONLY(1024*G))                    \
  92 
  93 Z_FLAGS(DECLARE_DEVELOPER_FLAG,     \
  94         DECLARE_PD_DEVELOPER_FLAG,  \
  95         DECLARE_PRODUCT_FLAG,       \
  96         DECLARE_PD_PRODUCT_FLAG,    \
  97         DECLARE_DIAGNOSTIC_FLAG,    \
  98         DECLARE_PD_DIAGNOSTIC_FLAG, \
  99         DECLARE_EXPERIMENTAL_FLAG,  \
 100         DECLARE_NOTPRODUCT_FLAG,    \
 101         DECLARE_MANAGEABLE_FLAG,    \
 102         DECLARE_PRODUCT_RW_FLAG,    \
 103         IGNORE_RANGE,               \
 104         IGNORE_CONSTRAINT,          \
 105         IGNORE_WRITEABLE)
 106 
 107 #endif // SHARE_GC_Z_ZFLAGS_HPP