view src/share/vm/gc/shenandoah/shenandoah_globals.hpp @ 13102:555f3a32bf60

Fix bad constant definition
author zgu
date Tue, 21 Mar 2017 13:29:22 -0400
parents d945fcab1e9e
children 2e17f4bfa629
line wrap: on
line source
/*
 * Copyright (c) 2016, Red Hat, Inc. and/or its affiliates.
 *
 * 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_VM_GC_SHENANDOAH_SHENANDOAH_GLOBALS_HPP
#define SHARE_VM_GC_SHENANDOAH_SHENANDOAH_GLOBALS_HPP

#include "runtime/globals.hpp"

#define SHENANDOAH_FLAGS(develop, \
                         develop_pd, \
                         product, \
                         product_pd, \
                         diagnostic, \
                         experimental, \
                         notproduct, \
                         manageable, \
                         product_rw, \
                         range, \
                         constraint, \
                         writeable) \
                                                                            \
  product(bool, UseShenandoahGC, false,                                     \
          "Use the Shenandoah garbage collector")                           \
                                                                            \
  product(bool, ShenandoahOptimizeFinals, true,                             \
          "Optimize barriers on final and stable fields/arrays. "           \
          "Turn it off for maximum compatibility with reflection or JNI "   \
          "code that manipulates final fields."                             \
          "Defaults to true. ")                                             \
                                                                            \
  product(size_t, ShenandoahHeapRegionSize, 0,                              \
          "Size of the Shenandoah regions. "                                \
          "Determined automatically by default.")                           \
                                                                            \
  experimental(size_t, ShenandoahMinRegionSize, 256 * K,                    \
          "Minimum heap region size. ")                                     \
                                                                            \
  experimental(size_t, ShenandoahMaxRegionSize, 32 * M,                     \
          "Maximum heap region size. ")                                     \
                                                                            \
  experimental(size_t, ShenandoahTargetNumRegions, 2048,                    \
          "Target number of regions. We try to get around that many "       \
          "regions, based on ShenandoahMinRegionSize and "                  \
          "ShenandoahMaxRegionSizeSize. ")                                  \
                                                                            \
  product(bool, UseShenandoahMatrix, false,                                 \
          "Keep a connection matrix and use this to drive collection sets") \
                                                                            \
  product(bool, PrintShenandoahMatrix, false,                               \
          "Print connection matrix after marking")                          \
                                                                            \
  product(bool, VerifyShenandoahMatrix, false,                              \
          "Verify connection matrix after marking")                         \
                                                                            \
  product(ccstr, ShenandoahGCHeuristics, "adaptive",                        \
          "The heuristics to use in Shenandoah GC. Possible values: "       \
          "dynamic, adaptive, aggressive."                                  \
          "Defaults to adaptive")                                            \
                                                                            \
  product(uintx, ShenandoahRefProcFrequency, 5,                             \
          "How often should (weak, soft, etc) references be processed. "    \
          "References get processed at every Nth GC cycle. "                \
          "Set to 0 to disable reference processing. "                      \
          "Defaults to process references every 5 cycles.")                 \
                                                                            \
  product(uintx, ShenandoahUnloadClassesFrequency, 5,                       \
          "How often should classes get unloaded. "                         \
          "Class unloading is performed at every Nth GC cycle. "            \
          "Set to 0 to disable concurrent class unloading. "                \
          "Defaults to unload classes every 5 cycles.")                     \
                                                                            \
  experimental(uintx, ShenandoahFullGCThreshold, 3,                         \
          "How many cycles in a row to do degenerated marking on "          \
          "cancelled GC before triggering a full-gc"                        \
          "Defaults to 3")                                                  \
          writeable(Always)                                                 \
                                                                            \
  product_rw(uintx, ShenandoahGarbageThreshold, 60,                         \
          "Sets the percentage of garbage a region need to contain before " \
          "it can be marked for collection. Applies to "                    \
          "Shenandoah GC dynamic Heuristic mode only (ignored otherwise). " \
          "Defaults to 60%.")                                               \
          range(0,100)                                                      \
                                                                            \
  product_rw(uintx, ShenandoahFreeThreshold, 10,                            \
          "Set the percentage of free heap at which a GC cycle is started. " \
          "Applies to Shenandoah GC dynamic Heuristic mode only "           \
          "(ignored otherwise). Defaults to 10%.")                          \
          range(0,100)                                                      \
                                                                            \
  product_rw(uintx, ShenandoahCSetThreshold, 40,                            \
          "Set the approximate target percentage of the heap for the"       \
          "collection set. Defaults to 40%.")                               \
          range(0,100)                                                      \
                                                                            \
  product_rw(uintx, ShenandoahAllocationThreshold, 0,                       \
          "Set percentage of memory allocated since last GC cycle before "  \
          "a new GC cycle is started. "                                     \
          "Applies to Shenandoah GC dynamic Heuristic mode only "           \
          "(ignored otherwise). Defauls to 0%.")                            \
          range(0,100)                                                      \
                                                                            \
  experimental(double, ShenandoahGCWorkerPerJavaThread, 0.5,                \
          "Set GC worker to Java thread ratio when "                        \
          "UseDynamicNumberOfGCThreads is enabled")                         \
          range(0.1,10.0)                                                   \
                                                                            \
  experimental(uintx, ShenandoahInitFreeThreshold, 10,                      \
               "Initial remaininig free threshold for adaptive heuristics") \
          range(0,100)                                                      \
                                                                            \
  experimental(uintx, ShenandoahMinFreeThreshold, 3,                       \
               "Minimum remaininig free threshold for adaptive heuristics") \
          range(0,100)                                                      \
                                                                            \
  experimental(uintx, ShenandoahMaxFreeThreshold, 70,                       \
               "Maximum remaininig free threshold for adaptive heuristics") \
          range(0,100)                                                      \
                                                                            \
  experimental(uintx, ShenandoahHappyCyclesThreshold, 5,                    \
          "How many successful marking cycles before improving free "       \
               "threshold for adaptive heuristics")                    \
                                                                            \
  experimental(uintx, ShenandoahPartialInboundThreshold, 10,                \
          "Specifies how many inbound regions a region can have maximum "   \
          "to be considered for collection set in partial collections.")    \
          writeable(Always)                                                 \
                                                                            \
  experimental(uint, ShenandoahMarkLoopStride, 1000,                        \
          "How many items are processed during one marking step")           \
                                                                            \
  experimental(bool, ShenandoahConcurrentCodeRoots, true,                   \
          "Scan code roots concurrently, instead of during a pause")        \
                                                                            \
  experimental(bool, ShenandoahNoBarriersForConst, true,                    \
          "Constant oops don't need barriers")                              \
                                                                            \
  experimental(bool, ShenandoahDontIncreaseWBFreq, true,                    \
          "Common 2 WriteBarriers or WriteBarrier and a ReadBarrier only "  \
          "if the resulting WriteBarrier isn't executed more frequently")   \
                                                                            \
  experimental(bool, ShenandoahNoLivenessFullGC, true,                      \
          "Skip liveness counting for mark during full GC.")                \
                                                                            \
  experimental(bool, ShenandoahWriteBarrierToIR, true,                      \
          "Convert write barrier to IR instead of using assembly blob")     \
                                                                            \
  experimental(bool, ShenandoahWriteBarrierCsetTestInIR, true,              \
          "Perform cset test in IR rather than in the stub")                \
                                                                            \
  experimental(bool, ShenandoahLoopOptsAfterExpansion, true,                \
          "Attempt more loop opts after write barrier expansion")           \
                                                                            \
  experimental(bool, UseShenandoahOWST, true,                               \
          "Use Shenandoah work stealing termination protocol")              \
                                                                            \
  experimental(size_t, ShenandoahSATBBufferSize, 1 * K,                     \
          "Number of entries in an SATB log buffer.")                       \
          range(1, max_uintx)                                               \
                                                                            \
  experimental(int, ShenandoahRegionSamplingRate, 40,                       \
          "Sampling rate for heap region sampling. "                        \
          "Number of milliseconds between samples")                         \
           writeable(Always)                                                \
                                                                            \
  experimental(bool, ShenandoahRegionSampling, false,                       \
          "Turns on heap region sampling via JVMStat")                      \
           writeable(Always)                                                \
                                                                            \
  experimental(bool, ShenandoahReduceStoreValBarrier, false,                \
          "If true, only execute storeval barrier when updating "           \
          "references.")                                                    \
                                                                            \
  diagnostic(bool, ShenandoahSATBBarrier, true,                             \
          "Turn on/off SATB barriers in Shenandoah")                        \
                                                                            \
  diagnostic(bool, ShenandoahWriteBarrier, true,                            \
          "Turn on/off write barriers in Shenandoah")                       \
                                                                            \
  diagnostic(bool, ShenandoahReadBarrier, true,                             \
          "Turn on/off read barriers in Shenandoah")                        \
                                                                            \
  diagnostic(bool, ShenandoahCASBarrier, true,                              \
          "Turn on/off CAS barriers in Shenandoah")                         \
                                                                            \
  diagnostic(bool, ShenandoahAcmpBarrier, true,                             \
          "Turn on/off acmp barriers in Shenandoah")                        \
                                                                            \
  diagnostic(bool, ShenandoahCloneBarrier, true,                            \
          "Turn on/off clone barriers in Shenandoah")                       \
                                                                            \
  diagnostic(bool, ShenandoahStoreCheck, false,                             \
          "Emit additional code that checks objects are written to only"    \
          " in to-space")                                                   \
                                                                            \
  develop(bool, ShenandoahDumpHeapBeforeConcurrentMark, false,              \
          "Dump the ShenanodahHeap Before Each ConcurrentMark")             \
                                                                            \
  develop(bool, ShenandoahDumpHeapAfterConcurrentMark, false,               \
          "Dump the ShenanodahHeap After Each Concurrent Mark")             \
                                                                            \
  develop(bool, ShenandoahVerifyWritesToFromSpace, false,                   \
          "Use Memory Protection to signal illegal writes to from space")   \
                                                                            \
  develop(bool, ShenandoahVerifyReadsToFromSpace, false,                    \
          "Use Memory Protection to signal illegal reads to from space")    \
                                                                            \
  develop(bool, ShenandoahVerify, false,                                    \
          "Verify the  Shenandoah garbage collector")                       \
                                                                            \
  develop(bool, VerifyStrictOopOperations, false,                           \
          "Verify that == and != are not used on oops. Only in fastdebug")  \
                                                                            \
  develop(bool, ShenandoahVerifyOptoBarriers, false,                        \
          "Verify no missing barriers in c2")                               \
                                                                            \
  product(bool, ShenandoahAlwaysPreTouch, false,                            \
          "Pre-touch heap memory, overrides global AlwaysPreTouch")         \
                                                                            \
  experimental(intx, ShenandoahMarkScanPrefetch, 32,                        \
          "How many objects to prefetch ahead when traversing mark bitmaps." \
          "Set to 0 to disable prefetching.")                               \
          range(0, 1024)                                                    \
                                                                            \
  experimental(intx, ShenandoahFullGCTries, 3,                              \
          "How many times to try to do Full GC on allocation failure."      \
          "Set to 0 to never try, and fail instead.")                       \
          range(0, 16)                                                      \


SHENANDOAH_FLAGS(DECLARE_DEVELOPER_FLAG, \
                 DECLARE_PD_DEVELOPER_FLAG,     \
                 DECLARE_PRODUCT_FLAG,          \
                 DECLARE_PD_PRODUCT_FLAG,       \
                 DECLARE_DIAGNOSTIC_FLAG,       \
                 DECLARE_EXPERIMENTAL_FLAG,     \
                 DECLARE_NOTPRODUCT_FLAG,       \
                 DECLARE_MANAGEABLE_FLAG,       \
                 DECLARE_PRODUCT_RW_FLAG,       \
                 IGNORE_RANGE,                  \
                 IGNORE_CONSTRAINT, \
                 IGNORE_WRITEABLE)

#endif // SHARE_VM_GC_SHENANDOAH_SHENANDOAH_GLOBALS_HPP