1 /*
   2  * Copyright (c) 1997, 2020, 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 
  25 #ifndef SHARE_RUNTIME_GLOBALS_HPP
  26 #define SHARE_RUNTIME_GLOBALS_HPP
  27 
  28 #include "compiler/compiler_globals.hpp"
  29 #include "gc/shared/gc_globals.hpp"
  30 #include "runtime/globals_shared.hpp"
  31 #include "utilities/align.hpp"
  32 #include "utilities/globalDefinitions.hpp"
  33 #include "utilities/macros.hpp"
  34 #include CPU_HEADER(globals)
  35 #include OS_HEADER(globals)
  36 #include OS_CPU_HEADER(globals)
  37 
  38 // develop flags are settable / visible only during development and are constant in the PRODUCT version
  39 // product flags are always settable / visible
  40 // notproduct flags are settable / visible only during development and are not declared in the PRODUCT version
  41 
  42 // A flag must be declared with one of the following types:
  43 // bool, int, uint, intx, uintx, size_t, ccstr, ccstrlist, double, or uint64_t.
  44 // The type "ccstr" and "ccstrlist" are an alias for "const char*" and is used
  45 // only in this file, because the macrology requires single-token type names.
  46 
  47 // Note: Diagnostic options not meant for VM tuning or for product modes.
  48 // They are to be used for VM quality assurance or field diagnosis
  49 // of VM bugs.  They are hidden so that users will not be encouraged to
  50 // try them as if they were VM ordinary execution options.  However, they
  51 // are available in the product version of the VM.  Under instruction
  52 // from support engineers, VM customers can turn them on to collect
  53 // diagnostic information about VM problems.  To use a VM diagnostic
  54 // option, you must first specify +UnlockDiagnosticVMOptions.
  55 // (This master switch also affects the behavior of -Xprintflags.)
  56 //
  57 // experimental flags are in support of features that are not
  58 //    part of the officially supported product, but are available
  59 //    for experimenting with. They could, for example, be performance
  60 //    features that may not have undergone full or rigorous QA, but which may
  61 //    help performance in some cases and released for experimentation
  62 //    by the community of users and developers. This flag also allows one to
  63 //    be able to build a fully supported product that nonetheless also
  64 //    ships with some unsupported, lightly tested, experimental features.
  65 //    Like the UnlockDiagnosticVMOptions flag above, there is a corresponding
  66 //    UnlockExperimentalVMOptions flag, which allows the control and
  67 //    modification of the experimental flags.
  68 //
  69 // Nota bene: neither diagnostic nor experimental options should be used casually,
  70 //    and they are not supported on production loads, except under explicit
  71 //    direction from support engineers.
  72 //
  73 // manageable flags are writeable external product flags.
  74 //    They are dynamically writeable through the JDK management interface
  75 //    (com.sun.management.HotSpotDiagnosticMXBean API) and also through JConsole.
  76 //    These flags are external exported interface (see CCC).  The list of
  77 //    manageable flags can be queried programmatically through the management
  78 //    interface.
  79 //
  80 //    A flag can be made as "manageable" only if
  81 //    - the flag is defined in a CCC as an external exported interface.
  82 //    - the VM implementation supports dynamic setting of the flag.
  83 //      This implies that the VM must *always* query the flag variable
  84 //      and not reuse state related to the flag state at any given time.
  85 //    - you want the flag to be queried programmatically by the customers.
  86 //
  87 // product_rw flags are writeable internal product flags.
  88 //    They are like "manageable" flags but for internal/private use.
  89 //    The list of product_rw flags are internal/private flags which
  90 //    may be changed/removed in a future release.  It can be set
  91 //    through the management interface to get/set value
  92 //    when the name of flag is supplied.
  93 //
  94 //    A flag can be made as "product_rw" only if
  95 //    - the VM implementation supports dynamic setting of the flag.
  96 //      This implies that the VM must *always* query the flag variable
  97 //      and not reuse state related to the flag state at any given time.
  98 //
  99 // Note that when there is a need to support develop flags to be writeable,
 100 // it can be done in the same way as product_rw.
 101 //
 102 // range is a macro that will expand to min and max arguments for range
 103 //    checking code if provided - see jvmFlagRangeList.hpp
 104 //
 105 // constraint is a macro that will expand to custom function call
 106 //    for constraint checking if provided - see jvmFlagConstraintList.hpp
 107 
 108 // Default and minimum StringTable and SymbolTable size values
 109 // Must be powers of 2
 110 const size_t defaultStringTableSize = NOT_LP64(1024) LP64_ONLY(65536);
 111 const size_t minimumStringTableSize = 128;
 112 const size_t defaultSymbolTableSize = 32768; // 2^15
 113 const size_t minimumSymbolTableSize = 1024;
 114 
 115 #define RUNTIME_FLAGS(develop, \
 116                       develop_pd, \
 117                       product, \
 118                       product_pd, \
 119                       diagnostic, \
 120                       diagnostic_pd, \
 121                       experimental, \
 122                       notproduct, \
 123                       manageable, \
 124                       product_rw, \
 125                       lp64_product, \
 126                       range, \
 127                       constraint) \
 128                                                                             \
 129   lp64_product(bool, UseCompressedOops, false,                              \
 130           "Use 32-bit object references in 64-bit VM. "                     \
 131           "lp64_product means flag is always constant in 32 bit VM")        \
 132                                                                             \
 133   lp64_product(bool, UseCompressedClassPointers, false,                     \
 134           "Use 32-bit class pointers in 64-bit VM. "                        \
 135           "lp64_product means flag is always constant in 32 bit VM")        \
 136                                                                             \
 137   notproduct(bool, CheckCompressedOops, true,                               \
 138           "Generate checks in encoding/decoding code in debug VM")          \
 139                                                                             \
 140   product(uintx, HeapSearchSteps, 3 PPC64_ONLY(+17),                        \
 141           "Heap allocation steps through preferred address regions to find" \
 142           " where it can allocate the heap. Number of steps to take per "   \
 143           "region.")                                                        \
 144           range(1, max_uintx)                                               \
 145                                                                             \
 146   lp64_product(intx, ObjectAlignmentInBytes, 8,                             \
 147           "Default object alignment in bytes, 8 is minimum")                \
 148           range(8, 256)                                                     \
 149           constraint(ObjectAlignmentInBytesConstraintFunc,AtParse)          \
 150                                                                             \
 151   develop(bool, CleanChunkPoolAsync, true,                                  \
 152           "Clean the chunk pool asynchronously")                            \
 153                                                                             \
 154   diagnostic(uint, HandshakeTimeout, 0,                                     \
 155           "If nonzero set a timeout in milliseconds for handshakes")        \
 156                                                                             \
 157   experimental(bool, AlwaysSafeConstructors, false,                         \
 158           "Force safe construction, as if all fields are final.")           \
 159                                                                             \
 160   diagnostic(bool, UnlockDiagnosticVMOptions, trueInDebug,                  \
 161           "Enable normal processing of flags relating to field diagnostics")\
 162                                                                             \
 163   experimental(bool, UnlockExperimentalVMOptions, false,                    \
 164           "Enable normal processing of flags relating to experimental "     \
 165           "features")                                                       \
 166                                                                             \
 167   product(bool, JavaMonitorsInStackTrace, true,                             \
 168           "Print information about Java monitor locks when the stacks are"  \
 169           "dumped")                                                         \
 170                                                                             \
 171   product_pd(bool, UseLargePages,                                           \
 172           "Use large page memory")                                          \
 173                                                                             \
 174   product_pd(bool, UseLargePagesIndividualAllocation,                       \
 175           "Allocate large pages individually for better affinity")          \
 176                                                                             \
 177   develop(bool, LargePagesIndividualAllocationInjectError, false,           \
 178           "Fail large pages individual allocation")                         \
 179                                                                             \
 180   product(bool, UseLargePagesInMetaspace, false,                            \
 181           "Use large page memory in metaspace. "                            \
 182           "Only used if UseLargePages is enabled.")                         \
 183                                                                             \
 184   product(bool, UseNUMA, false,                                             \
 185           "Use NUMA if available")                                          \
 186                                                                             \
 187   product(bool, UseNUMAInterleaving, false,                                 \
 188           "Interleave memory across NUMA nodes if available")               \
 189                                                                             \
 190   product(size_t, NUMAInterleaveGranularity, 2*M,                           \
 191           "Granularity to use for NUMA interleaving on Windows OS")         \
 192           range(os::vm_allocation_granularity(), NOT_LP64(2*G) LP64_ONLY(8192*G)) \
 193                                                                             \
 194   product(bool, ForceNUMA, false,                                           \
 195           "Force NUMA optimizations on single-node/UMA systems")            \
 196                                                                             \
 197   product(uintx, NUMAChunkResizeWeight, 20,                                 \
 198           "Percentage (0-100) used to weight the current sample when "      \
 199           "computing exponentially decaying average for "                   \
 200           "AdaptiveNUMAChunkSizing")                                        \
 201           range(0, 100)                                                     \
 202                                                                             \
 203   product(size_t, NUMASpaceResizeRate, 1*G,                                 \
 204           "Do not reallocate more than this amount per collection")         \
 205           range(0, max_uintx)                                               \
 206                                                                             \
 207   product(bool, UseAdaptiveNUMAChunkSizing, true,                           \
 208           "Enable adaptive chunk sizing for NUMA")                          \
 209                                                                             \
 210   product(bool, NUMAStats, false,                                           \
 211           "Print NUMA stats in detailed heap information")                  \
 212                                                                             \
 213   product(uintx, NUMAPageScanRate, 256,                                     \
 214           "Maximum number of pages to include in the page scan procedure")  \
 215           range(0, max_uintx)                                               \
 216                                                                             \
 217   product(intx, UseSSE, 99,                                                 \
 218           "Highest supported SSE instructions set on x86/x64")              \
 219           range(0, 99)                                                      \
 220                                                                             \
 221   product(bool, UseAES, false,                                              \
 222           "Control whether AES instructions are used when available")       \
 223                                                                             \
 224   product(bool, UseFMA, false,                                              \
 225           "Control whether FMA instructions are used when available")       \
 226                                                                             \
 227   product(bool, UseSHA, false,                                              \
 228           "Control whether SHA instructions are used when available")       \
 229                                                                             \
 230   diagnostic(bool, UseGHASHIntrinsics, false,                               \
 231           "Use intrinsics for GHASH versions of crypto")                    \
 232                                                                             \
 233   product(bool, UseBASE64Intrinsics, false,                                 \
 234           "Use intrinsics for java.util.Base64")                            \
 235                                                                             \
 236   product(size_t, LargePageSizeInBytes, 0,                                  \
 237           "Large page size (0 to let VM choose the page size)")             \
 238           range(0, max_uintx)                                               \
 239                                                                             \
 240   product(size_t, LargePageHeapSizeThreshold, 128*M,                        \
 241           "Use large pages if maximum heap is at least this big")           \
 242           range(0, max_uintx)                                               \
 243                                                                             \
 244   product(bool, ForceTimeHighResolution, false,                             \
 245           "Using high time resolution (for Win32 only)")                    \
 246                                                                             \
 247   develop(bool, TracePcPatching, false,                                     \
 248           "Trace usage of frame::patch_pc")                                 \
 249                                                                             \
 250   develop(bool, TraceRelocator, false,                                      \
 251           "Trace the bytecode relocator")                                   \
 252                                                                             \
 253   develop(bool, TraceLongCompiles, false,                                   \
 254           "Print out every time compilation is longer than "                \
 255           "a given threshold")                                              \
 256                                                                             \
 257   diagnostic(bool, SafepointALot, false,                                    \
 258           "Generate a lot of safepoints. This works with "                  \
 259           "GuaranteedSafepointInterval")                                    \
 260                                                                             \
 261   diagnostic(bool, HandshakeALot, false,                                    \
 262           "Generate a lot of handshakes. This works with "                  \
 263           "GuaranteedSafepointInterval")                                    \
 264                                                                             \
 265   product_pd(bool, BackgroundCompilation,                                   \
 266           "A thread requesting compilation is not blocked during "          \
 267           "compilation")                                                    \
 268                                                                             \
 269   product(bool, PrintVMQWaitTime, false,                                    \
 270           "(Deprecated) Print out the waiting time in VM operation queue")  \
 271                                                                             \
 272   product(bool, MethodFlushing, true,                                       \
 273           "Reclamation of zombie and not-entrant methods")                  \
 274                                                                             \
 275   develop(bool, VerifyStack, false,                                         \
 276           "Verify stack of each thread when it is entering a runtime call") \
 277                                                                             \
 278   diagnostic(bool, ForceUnreachable, false,                                 \
 279           "Make all non code cache addresses to be unreachable by "         \
 280           "forcing use of 64bit literal fixups")                            \
 281                                                                             \
 282   notproduct(bool, StressDerivedPointers, false,                            \
 283           "Force scavenge when a derived pointer is detected on stack "     \
 284           "after rtm call")                                                 \
 285                                                                             \
 286   develop(bool, TraceDerivedPointers, false,                                \
 287           "Trace traversal of derived pointers on stack")                   \
 288                                                                             \
 289   notproduct(bool, TraceCodeBlobStacks, false,                              \
 290           "Trace stack-walk of codeblobs")                                  \
 291                                                                             \
 292   notproduct(bool, PrintRewrites, false,                                    \
 293           "Print methods that are being rewritten")                         \
 294                                                                             \
 295   product(bool, UseInlineCaches, true,                                      \
 296           "Use Inline Caches for virtual calls ")                           \
 297                                                                             \
 298   diagnostic(bool, InlineArrayCopy, true,                                   \
 299           "Inline arraycopy native that is known to be part of "            \
 300           "base library DLL")                                               \
 301                                                                             \
 302   diagnostic(bool, InlineObjectHash, true,                                  \
 303           "Inline Object::hashCode() native that is known to be part "      \
 304           "of base library DLL")                                            \
 305                                                                             \
 306   diagnostic(bool, InlineNatives, true,                                     \
 307           "Inline natives that are known to be part of base library DLL")   \
 308                                                                             \
 309   diagnostic(bool, InlineMathNatives, true,                                 \
 310           "Inline SinD, CosD, etc.")                                        \
 311                                                                             \
 312   diagnostic(bool, InlineClassNatives, true,                                \
 313           "Inline Class.isInstance, etc")                                   \
 314                                                                             \
 315   diagnostic(bool, InlineThreadNatives, true,                               \
 316           "Inline Thread.currentThread, etc")                               \
 317                                                                             \
 318   diagnostic(bool, InlineUnsafeOps, true,                                   \
 319           "Inline memory ops (native methods) from Unsafe")                 \
 320                                                                             \
 321   product(bool, CriticalJNINatives, true,                                   \
 322           "Check for critical JNI entry points")                            \
 323                                                                             \
 324   notproduct(bool, StressCriticalJNINatives, false,                         \
 325           "Exercise register saving code in critical natives")              \
 326                                                                             \
 327   diagnostic(bool, UseAESIntrinsics, false,                                 \
 328           "Use intrinsics for AES versions of crypto")                      \
 329                                                                             \
 330   diagnostic(bool, UseAESCTRIntrinsics, false,                              \
 331           "Use intrinsics for the paralleled version of AES/CTR crypto")    \
 332                                                                             \
 333   diagnostic(bool, UseSHA1Intrinsics, false,                                \
 334           "Use intrinsics for SHA-1 crypto hash function. "                 \
 335           "Requires that UseSHA is enabled.")                               \
 336                                                                             \
 337   diagnostic(bool, UseSHA256Intrinsics, false,                              \
 338           "Use intrinsics for SHA-224 and SHA-256 crypto hash functions. "  \
 339           "Requires that UseSHA is enabled.")                               \
 340                                                                             \
 341   diagnostic(bool, UseSHA512Intrinsics, false,                              \
 342           "Use intrinsics for SHA-384 and SHA-512 crypto hash functions. "  \
 343           "Requires that UseSHA is enabled.")                               \
 344                                                                             \
 345   diagnostic(bool, UseCRC32Intrinsics, false,                               \
 346           "use intrinsics for java.util.zip.CRC32")                         \
 347                                                                             \
 348   diagnostic(bool, UseCRC32CIntrinsics, false,                              \
 349           "use intrinsics for java.util.zip.CRC32C")                        \
 350                                                                             \
 351   diagnostic(bool, UseAdler32Intrinsics, false,                             \
 352           "use intrinsics for java.util.zip.Adler32")                       \
 353                                                                             \
 354   diagnostic(bool, UseVectorizedMismatchIntrinsic, false,                   \
 355           "Enables intrinsification of ArraysSupport.vectorizedMismatch()") \
 356                                                                             \
 357   diagnostic(ccstrlist, DisableIntrinsic, "",                               \
 358          "do not expand intrinsics whose (internal) names appear here")     \
 359                                                                             \
 360   develop(bool, TraceCallFixup, false,                                      \
 361           "Trace all call fixups")                                          \
 362                                                                             \
 363   develop(bool, DeoptimizeALot, false,                                      \
 364           "Deoptimize at every exit from the runtime system")               \
 365                                                                             \
 366   notproduct(ccstrlist, DeoptimizeOnlyAt, "",                               \
 367           "A comma separated list of bcis to deoptimize at")                \
 368                                                                             \
 369   develop(bool, DeoptimizeRandom, false,                                    \
 370           "Deoptimize random frames on random exit from the runtime system")\
 371                                                                             \
 372   notproduct(bool, ZombieALot, false,                                       \
 373           "Create zombies (non-entrant) at exit from the runtime system")   \
 374                                                                             \
 375   notproduct(bool, WalkStackALot, false,                                    \
 376           "Trace stack (no print) at every exit from the runtime system")   \
 377                                                                             \
 378   product(bool, Debugging, false,                                           \
 379           "Set when executing debug methods in debug.cpp "                  \
 380           "(to prevent triggering assertions)")                             \
 381                                                                             \
 382   notproduct(bool, VerifyLastFrame, false,                                  \
 383           "Verify oops on last frame on entry to VM")                       \
 384                                                                             \
 385   product(bool, SafepointTimeout, false,                                    \
 386           "Time out and warn or fail after SafepointTimeoutDelay "          \
 387           "milliseconds if failed to reach safepoint")                      \
 388                                                                             \
 389   diagnostic(bool, AbortVMOnSafepointTimeout, false,                        \
 390           "Abort upon failure to reach safepoint (see SafepointTimeout)")   \
 391                                                                             \
 392   diagnostic(bool, AbortVMOnVMOperationTimeout, false,                      \
 393           "Abort upon failure to complete VM operation promptly")           \
 394                                                                             \
 395   diagnostic(intx, AbortVMOnVMOperationTimeoutDelay, 1000,                  \
 396           "Delay in milliseconds for option AbortVMOnVMOperationTimeout")   \
 397           range(0, max_intx)                                                \
 398                                                                             \
 399   /* 50 retries * (5 * current_retry_count) millis = ~6.375 seconds */      \
 400   /* typically, at most a few retries are needed                    */      \
 401   product(intx, SuspendRetryCount, 50,                                      \
 402           "Maximum retry count for an external suspend request")            \
 403           range(0, max_intx)                                                \
 404                                                                             \
 405   product(intx, SuspendRetryDelay, 5,                                       \
 406           "Milliseconds to delay per retry (* current_retry_count)")        \
 407           range(0, max_intx)                                                \
 408                                                                             \
 409   product(bool, AssertOnSuspendWaitFailure, false,                          \
 410           "Assert/Guarantee on external suspend wait failure")              \
 411                                                                             \
 412   product(bool, TraceSuspendWaitFailures, false,                            \
 413           "Trace external suspend wait failures")                           \
 414                                                                             \
 415   product(bool, MaxFDLimit, true,                                           \
 416           "Bump the number of file descriptors to maximum in Solaris")      \
 417                                                                             \
 418   diagnostic(bool, LogEvents, true,                                         \
 419           "Enable the various ring buffer event logs")                      \
 420                                                                             \
 421   diagnostic(uintx, LogEventsBufferEntries, 20,                             \
 422           "Number of ring buffer event logs")                               \
 423           range(1, NOT_LP64(1*K) LP64_ONLY(1*M))                            \
 424                                                                             \
 425   diagnostic(bool, BytecodeVerificationRemote, true,                        \
 426           "Enable the Java bytecode verifier for remote classes")           \
 427                                                                             \
 428   diagnostic(bool, BytecodeVerificationLocal, false,                        \
 429           "Enable the Java bytecode verifier for local classes")            \
 430                                                                             \
 431   develop(bool, ForceFloatExceptions, trueInDebug,                          \
 432           "Force exceptions on FP stack under/overflow")                    \
 433                                                                             \
 434   develop(bool, VerifyStackAtCalls, false,                                  \
 435           "Verify that the stack pointer is unchanged after calls")         \
 436                                                                             \
 437   develop(bool, TraceJavaAssertions, false,                                 \
 438           "Trace java language assertions")                                 \
 439                                                                             \
 440   notproduct(bool, VerifyCodeCache, false,                                  \
 441           "Verify code cache on memory allocation/deallocation")            \
 442                                                                             \
 443   develop(bool, UseMallocOnly, false,                                       \
 444           "Use only malloc/free for allocation (no resource area/arena)")   \
 445                                                                             \
 446   develop(bool, ZapResourceArea, trueInDebug,                               \
 447           "Zap freed resource/arena space with 0xABABABAB")                 \
 448                                                                             \
 449   notproduct(bool, ZapVMHandleArea, trueInDebug,                            \
 450           "Zap freed VM handle space with 0xBCBCBCBC")                      \
 451                                                                             \
 452   notproduct(bool, ZapStackSegments, trueInDebug,                           \
 453           "Zap allocated/freed stack segments with 0xFADFADED")             \
 454                                                                             \
 455   develop(bool, ZapUnusedHeapArea, trueInDebug,                             \
 456           "Zap unused heap space with 0xBAADBABE")                          \
 457                                                                             \
 458   develop(bool, CheckZapUnusedHeapArea, false,                              \
 459           "Check zapping of unused heap space")                             \
 460                                                                             \
 461   develop(bool, ZapFillerObjects, trueInDebug,                              \
 462           "Zap filler objects with 0xDEAFBABE")                             \
 463                                                                             \
 464   develop(bool, PrintVMMessages, true,                                      \
 465           "Print VM messages on console")                                   \
 466                                                                             \
 467   notproduct(uintx, ErrorHandlerTest, 0,                                    \
 468           "If > 0, provokes an error after VM initialization; the value "   \
 469           "determines which error to provoke. See test_error_handler() "    \
 470           "in vmError.cpp.")                                                \
 471                                                                             \
 472   notproduct(uintx, TestCrashInErrorHandler, 0,                             \
 473           "If > 0, provokes an error inside VM error handler (a secondary " \
 474           "crash). see test_error_handler() in vmError.cpp")                \
 475                                                                             \
 476   notproduct(bool, TestSafeFetchInErrorHandler, false,                      \
 477           "If true, tests SafeFetch inside error handler.")                 \
 478                                                                             \
 479   notproduct(bool, TestUnresponsiveErrorHandler, false,                     \
 480           "If true, simulates an unresponsive error handler.")              \
 481                                                                             \
 482   develop(bool, Verbose, false,                                             \
 483           "Print additional debugging information from other modes")        \
 484                                                                             \
 485   develop(bool, PrintMiscellaneous, false,                                  \
 486           "Print uncategorized debugging information (requires +Verbose)")  \
 487                                                                             \
 488   develop(bool, WizardMode, false,                                          \
 489           "Print much more debugging information")                          \
 490                                                                             \
 491   product(bool, ShowMessageBoxOnError, false,                               \
 492           "Keep process alive on VM fatal error")                           \
 493                                                                             \
 494   product(bool, CreateCoredumpOnCrash, true,                                \
 495           "Create core/mini dump on VM fatal error")                        \
 496                                                                             \
 497   product(uint64_t, ErrorLogTimeout, 2 * 60,                                \
 498           "Timeout, in seconds, to limit the time spent on writing an "     \
 499           "error log in case of a crash.")                                  \
 500           range(0, (uint64_t)max_jlong/1000)                                \
 501                                                                             \
 502   product_pd(bool, UseOSErrorReporting,                                     \
 503           "Let VM fatal error propagate to the OS (ie. WER on Windows)")    \
 504                                                                             \
 505   product(bool, SuppressFatalErrorMessage, false,                           \
 506           "Report NO fatal error message (avoid deadlock)")                 \
 507                                                                             \
 508   product(ccstrlist, OnError, "",                                           \
 509           "Run user-defined commands on fatal error; see VMError.cpp "      \
 510           "for examples")                                                   \
 511                                                                             \
 512   product(ccstrlist, OnOutOfMemoryError, "",                                \
 513           "Run user-defined commands on first java.lang.OutOfMemoryError")  \
 514                                                                             \
 515   manageable(bool, HeapDumpBeforeFullGC, false,                             \
 516           "Dump heap to file before any major stop-the-world GC")           \
 517                                                                             \
 518   manageable(bool, HeapDumpAfterFullGC, false,                              \
 519           "Dump heap to file after any major stop-the-world GC")            \
 520                                                                             \
 521   manageable(bool, HeapDumpOnOutOfMemoryError, false,                       \
 522           "Dump heap to file when java.lang.OutOfMemoryError is thrown")    \
 523                                                                             \
 524   manageable(ccstr, HeapDumpPath, NULL,                                     \
 525           "When HeapDumpOnOutOfMemoryError is on, the path (filename or "   \
 526           "directory) of the dump file (defaults to java_pid<pid>.hprof "   \
 527           "in the working directory)")                                      \
 528                                                                             \
 529   develop(bool, BreakAtWarning, false,                                      \
 530           "Execute breakpoint upon encountering VM warning")                \
 531                                                                             \
 532   product(ccstr, NativeMemoryTracking, "off",                               \
 533           "Native memory tracking options")                                 \
 534                                                                             \
 535   diagnostic(bool, PrintNMTStatistics, false,                               \
 536           "Print native memory tracking summary data if it is on")          \
 537                                                                             \
 538   diagnostic(bool, LogCompilation, false,                                   \
 539           "Log compilation activity in detail to LogFile")                  \
 540                                                                             \
 541   product(bool, PrintCompilation, false,                                    \
 542           "Print compilations")                                             \
 543                                                                             \
 544   product(bool, PrintExtendedThreadInfo, false,                             \
 545           "Print more information in thread dump")                          \
 546                                                                             \
 547   diagnostic(intx, ScavengeRootsInCode, 2,                                  \
 548           "0: do not allow scavengable oops in the code cache; "            \
 549           "1: allow scavenging from the code cache; "                       \
 550           "2: emit as many constants as the compiler can see")              \
 551           range(0, 2)                                                       \
 552                                                                             \
 553   product(bool, AlwaysRestoreFPU, false,                                    \
 554           "Restore the FPU control word after every JNI call (expensive)")  \
 555                                                                             \
 556   diagnostic(bool, PrintCompilation2, false,                                \
 557           "Print additional statistics per compilation")                    \
 558                                                                             \
 559   diagnostic(bool, PrintAdapterHandlers, false,                             \
 560           "Print code generated for i2c/c2i adapters")                      \
 561                                                                             \
 562   diagnostic(bool, VerifyAdapterCalls, trueInDebug,                         \
 563           "Verify that i2c/c2i adapters are called properly")               \
 564                                                                             \
 565   develop(bool, VerifyAdapterSharing, false,                                \
 566           "Verify that the code for shared adapters is the equivalent")     \
 567                                                                             \
 568   diagnostic(bool, PrintAssembly, false,                                    \
 569           "Print assembly code (using external disassembler.so)")           \
 570                                                                             \
 571   diagnostic(ccstr, PrintAssemblyOptions, NULL,                             \
 572           "Print options string passed to disassembler.so")                 \
 573                                                                             \
 574   notproduct(bool, PrintNMethodStatistics, false,                           \
 575           "Print a summary statistic for the generated nmethods")           \
 576                                                                             \
 577   diagnostic(bool, PrintNMethods, false,                                    \
 578           "Print assembly code for nmethods when generated")                \
 579                                                                             \
 580   diagnostic(bool, PrintNativeNMethods, false,                              \
 581           "Print assembly code for native nmethods when generated")         \
 582                                                                             \
 583   develop(bool, PrintDebugInfo, false,                                      \
 584           "Print debug information for all nmethods when generated")        \
 585                                                                             \
 586   develop(bool, PrintRelocations, false,                                    \
 587           "Print relocation information for all nmethods when generated")   \
 588                                                                             \
 589   develop(bool, PrintDependencies, false,                                   \
 590           "Print dependency information for all nmethods when generated")   \
 591                                                                             \
 592   develop(bool, PrintExceptionHandlers, false,                              \
 593           "Print exception handler tables for all nmethods when generated") \
 594                                                                             \
 595   develop(bool, StressCompiledExceptionHandlers, false,                     \
 596           "Exercise compiled exception handlers")                           \
 597                                                                             \
 598   develop(bool, InterceptOSException, false,                                \
 599           "Start debugger when an implicit OS (e.g. NULL) "                 \
 600           "exception happens")                                              \
 601                                                                             \
 602   product(bool, PrintCodeCache, false,                                      \
 603           "Print the code cache memory usage when exiting")                 \
 604                                                                             \
 605   develop(bool, PrintCodeCache2, false,                                     \
 606           "Print detailed usage information on the code cache when exiting")\
 607                                                                             \
 608   product(bool, PrintCodeCacheOnCompilation, false,                         \
 609           "Print the code cache memory usage each time a method is "        \
 610           "compiled")                                                       \
 611                                                                             \
 612   diagnostic(bool, PrintCodeHeapAnalytics, false,                           \
 613           "Print code heap usage statistics on exit and on full condition") \
 614                                                                             \
 615   diagnostic(bool, PrintStubCode, false,                                    \
 616           "Print generated stub code")                                      \
 617                                                                             \
 618   product(bool, StackTraceInThrowable, true,                                \
 619           "Collect backtrace in throwable when exception happens")          \
 620                                                                             \
 621   product(bool, OmitStackTraceInFastThrow, true,                            \
 622           "Omit backtraces for some 'hot' exceptions in optimized code")    \
 623                                                                             \
 624   manageable(bool, ShowCodeDetailsInExceptionMessages, false,               \
 625           "Show exception messages from RuntimeExceptions that contain "    \
 626           "snippets of the failing code. Disable this to improve privacy.") \
 627                                                                             \
 628   product(bool, PrintWarnings, true,                                        \
 629           "Print JVM warnings to output stream")                            \
 630                                                                             \
 631   notproduct(uintx, WarnOnStalledSpinLock, 0,                               \
 632           "Print warnings for stalled SpinLocks")                           \
 633                                                                             \
 634   product(bool, RegisterFinalizersAtInit, true,                             \
 635           "Register finalizable objects at end of Object.<init> or "        \
 636           "after allocation")                                               \
 637                                                                             \
 638   develop(bool, RegisterReferences, true,                                   \
 639           "Tell whether the VM should register soft/weak/final/phantom "    \
 640           "references")                                                     \
 641                                                                             \
 642   develop(bool, IgnoreRewrites, false,                                      \
 643           "Suppress rewrites of bytecodes in the oopmap generator. "        \
 644           "This is unsafe!")                                                \
 645                                                                             \
 646   develop(bool, PrintCodeCacheExtension, false,                             \
 647           "Print extension of code cache")                                  \
 648                                                                             \
 649   develop(bool, UsePrivilegedStack, true,                                   \
 650           "Enable the security JVM functions")                              \
 651                                                                             \
 652   develop(bool, ProtectionDomainVerification, true,                         \
 653           "Verify protection domain before resolution in system dictionary")\
 654                                                                             \
 655   product(bool, ClassUnloading, true,                                       \
 656           "Do unloading of classes")                                        \
 657                                                                             \
 658   product(bool, ClassUnloadingWithConcurrentMark, true,                     \
 659           "Do unloading of classes with a concurrent marking cycle")        \
 660                                                                             \
 661   develop(bool, DisableStartThread, false,                                  \
 662           "Disable starting of additional Java threads "                    \
 663           "(for debugging only)")                                           \
 664                                                                             \
 665   develop(bool, MemProfiling, false,                                        \
 666           "Write memory usage profiling to log file")                       \
 667                                                                             \
 668   notproduct(bool, PrintSystemDictionaryAtExit, false,                      \
 669           "Print the system dictionary at exit")                            \
 670                                                                             \
 671   diagnostic(bool, DynamicallyResizeSystemDictionaries, true,               \
 672           "Dynamically resize system dictionaries as needed")               \
 673                                                                             \
 674   product(bool, AlwaysLockClassLoader, false,                               \
 675           "Require the VM to acquire the class loader lock before calling " \
 676           "loadClass() even for class loaders registering "                 \
 677           "as parallel capable")                                            \
 678                                                                             \
 679   product(bool, AllowParallelDefineClass, false,                            \
 680           "Allow parallel defineClass requests for class loaders "          \
 681           "registering as parallel capable")                                \
 682                                                                             \
 683   product_pd(bool, DontYieldALot,                                           \
 684           "Throw away obvious excess yield calls")                          \
 685                                                                             \
 686   develop(bool, UseDetachedThreads, true,                                   \
 687           "Use detached threads that are recycled upon termination "        \
 688           "(for Solaris only)")                                             \
 689                                                                             \
 690   experimental(bool, DisablePrimordialThreadGuardPages, false,              \
 691                "Disable the use of stack guard pages if the JVM is loaded " \
 692                "on the primordial process thread")                          \
 693                                                                             \
 694   product(bool, UseLWPSynchronization, true,                                \
 695           "Use LWP-based instead of libthread-based synchronization "       \
 696           "(SPARC only)")                                                   \
 697                                                                             \
 698   product(intx, MonitorBound, 0, "(Deprecated) Bound Monitor population")   \
 699           range(0, max_jint)                                                \
 700                                                                             \
 701   experimental(intx, MonitorUsedDeflationThreshold, 90,                     \
 702                 "Percentage of used monitors before triggering cleanup "    \
 703                 "safepoint which deflates monitors (0 is off). "            \
 704                 "The check is performed on GuaranteedSafepointInterval.")   \
 705                 range(0, 100)                                               \
 706                                                                             \
 707   experimental(intx, hashCode, 5,                                           \
 708                "(Unstable) select hashCode generation algorithm")           \
 709                                                                             \
 710   product(bool, FilterSpuriousWakeups, true,                                \
 711           "When true prevents OS-level spurious, or premature, wakeups "    \
 712           "from Object.wait (Ignored for Windows)")                         \
 713                                                                             \
 714   develop(bool, UsePthreads, false,                                         \
 715           "Use pthread-based instead of libthread-based synchronization "   \
 716           "(SPARC only)")                                                   \
 717                                                                             \
 718   product(bool, ReduceSignalUsage, false,                                   \
 719           "Reduce the use of OS signals in Java and/or the VM")             \
 720                                                                             \
 721   develop(bool, LoadLineNumberTables, true,                                 \
 722           "Tell whether the class file parser loads line number tables")    \
 723                                                                             \
 724   develop(bool, LoadLocalVariableTables, true,                              \
 725           "Tell whether the class file parser loads local variable tables") \
 726                                                                             \
 727   develop(bool, LoadLocalVariableTypeTables, true,                          \
 728           "Tell whether the class file parser loads local variable type"    \
 729           "tables")                                                         \
 730                                                                             \
 731   product(bool, AllowUserSignalHandlers, false,                             \
 732           "Do not complain if the application installs signal handlers "    \
 733           "(Solaris & Linux only)")                                         \
 734                                                                             \
 735   product(bool, UseSignalChaining, true,                                    \
 736           "Use signal-chaining to invoke signal handlers installed "        \
 737           "by the application (Solaris & Linux only)")                      \
 738                                                                             \
 739   product(bool, RestoreMXCSROnJNICalls, false,                              \
 740           "Restore MXCSR when returning from JNI calls")                    \
 741                                                                             \
 742   product(bool, CheckJNICalls, false,                                       \
 743           "Verify all arguments to JNI calls")                              \
 744                                                                             \
 745   product(bool, UseFastJNIAccessors, true,                                  \
 746           "Use optimized versions of Get<Primitive>Field")                  \
 747                                                                             \
 748   product(intx, MaxJNILocalCapacity, 65536,                                 \
 749           "Maximum allowable local JNI handle capacity to "                 \
 750           "EnsureLocalCapacity() and PushLocalFrame(), "                    \
 751           "where <= 0 is unlimited, default: 65536")                        \
 752           range(min_intx, max_intx)                                         \
 753                                                                             \
 754   product(bool, EagerXrunInit, false,                                       \
 755           "Eagerly initialize -Xrun libraries; allows startup profiling, "  \
 756           "but not all -Xrun libraries may support the state of the VM "    \
 757           "at this time")                                                   \
 758                                                                             \
 759   product(bool, PreserveAllAnnotations, false,                              \
 760           "Preserve RuntimeInvisibleAnnotations as well "                   \
 761           "as RuntimeVisibleAnnotations")                                   \
 762                                                                             \
 763   develop(uintx, PreallocatedOutOfMemoryErrorCount, 4,                      \
 764           "Number of OutOfMemoryErrors preallocated with backtrace")        \
 765                                                                             \
 766   product(bool, UseXMMForArrayCopy, false,                                  \
 767           "Use SSE2 MOVQ instruction for Arraycopy")                        \
 768                                                                             \
 769   notproduct(bool, PrintFieldLayout, false,                                 \
 770           "Print field layout for each class")                              \
 771                                                                             \
 772   notproduct(bool, PrintValueLayout, false,                                 \
 773           "Print field layout for each value type")                         \
 774                                                                             \
 775   notproduct(bool, PrintValueArrayLayout, false,                            \
 776           "Print array layout for each value type array")                   \
 777                                                                             \
 778   product(intx, ValueArrayElemMaxFlatSize, -1,                              \
 779           "Max size for flattening value array elements, <0 no limit")      \
 780                                                                             \
 781   product(intx, ValueFieldMaxFlatSize, 128,                                 \
 782           "Max size for flattening value type fields, <0 no limit")         \
 783                                                                             \
 784   product(intx, ValueArrayElemMaxFlatOops, 4,                               \
 785           "Max nof embedded object references in a value type to flatten, <0 no limit")  \
 786                                                                             \
 787   product(bool, ValueArrayAtomicAccess, false,                              \
 788           "Atomic value array accesses by-default, for all value arrays")   \
 789                                                                             \
 790   /* Need to limit the extent of the padding to reasonable size.          */\
 791   /* 8K is well beyond the reasonable HW cache line size, even with       */\
 792   /* aggressive prefetching, while still leaving the room for segregating */\
 793   /* among the distinct pages.                                            */\
 794   product(intx, ContendedPaddingWidth, 128,                                 \
 795           "How many bytes to pad the fields/classes marked @Contended with")\
 796           range(0, 8192)                                                    \
 797           constraint(ContendedPaddingWidthConstraintFunc,AfterErgo)         \
 798                                                                             \
 799   product(bool, EnableContended, true,                                      \
 800           "Enable @Contended annotation support")                           \
 801                                                                             \
 802   product(bool, RestrictContended, true,                                    \
 803           "Restrict @Contended to trusted classes")                         \
 804                                                                             \
 805   product(bool, UseBiasedLocking, true,                                     \
 806           "Enable biased locking in JVM")                                   \
 807                                                                             \
 808   product(intx, BiasedLockingStartupDelay, 0,                               \
 809           "Number of milliseconds to wait before enabling biased locking")  \
 810           range(0, (intx)(max_jint-(max_jint%PeriodicTask::interval_gran))) \
 811           constraint(BiasedLockingStartupDelayFunc,AfterErgo)               \
 812                                                                             \
 813   diagnostic(bool, PrintBiasedLockingStatistics, false,                     \
 814           "Print statistics of biased locking in JVM")                      \
 815                                                                             \
 816   product(intx, BiasedLockingBulkRebiasThreshold, 20,                       \
 817           "Threshold of number of revocations per type to try to "          \
 818           "rebias all objects in the heap of that type")                    \
 819           range(0, max_intx)                                                \
 820           constraint(BiasedLockingBulkRebiasThresholdFunc,AfterErgo)        \
 821                                                                             \
 822   product(intx, BiasedLockingBulkRevokeThreshold, 40,                       \
 823           "Threshold of number of revocations per type to permanently "     \
 824           "revoke biases of all objects in the heap of that type")          \
 825           range(0, max_intx)                                                \
 826           constraint(BiasedLockingBulkRevokeThresholdFunc,AfterErgo)        \
 827                                                                             \
 828   product(intx, BiasedLockingDecayTime, 25000,                              \
 829           "Decay time (in milliseconds) to re-enable bulk rebiasing of a "  \
 830           "type after previous bulk rebias")                                \
 831           range(500, max_intx)                                              \
 832           constraint(BiasedLockingDecayTimeFunc,AfterErgo)                  \
 833                                                                             \
 834   product(bool, ExitOnOutOfMemoryError, false,                              \
 835           "JVM exits on the first occurrence of an out-of-memory error")    \
 836                                                                             \
 837   product(bool, CrashOnOutOfMemoryError, false,                             \
 838           "JVM aborts, producing an error log and core/mini dump, on the "  \
 839           "first occurrence of an out-of-memory error")                     \
 840                                                                             \
 841   /* tracing */                                                             \
 842                                                                             \
 843   develop(bool, StressRewriter, false,                                      \
 844           "Stress linktime bytecode rewriting")                             \
 845                                                                             \
 846   product(ccstr, TraceJVMTI, NULL,                                          \
 847           "Trace flags for JVMTI functions and events")                     \
 848                                                                             \
 849   /* This option can change an EMCP method into an obsolete method. */      \
 850   /* This can affect tests that except specific methods to be EMCP. */      \
 851   /* This option should be used with caution.                       */      \
 852   product(bool, StressLdcRewrite, false,                                    \
 853           "Force ldc -> ldc_w rewrite during RedefineClasses")              \
 854                                                                             \
 855   /* change to false by default sometime after Mustang */                   \
 856   product(bool, VerifyMergedCPBytecodes, true,                              \
 857           "Verify bytecodes after RedefineClasses constant pool merging")   \
 858                                                                             \
 859   product(bool, AllowRedefinitionToAddDeleteMethods, false,                 \
 860           "(Deprecated) Allow redefinition to add and delete private "      \
 861           "static or final methods for compatibility with old releases")    \
 862                                                                             \
 863   develop(bool, TraceBytecodes, false,                                      \
 864           "Trace bytecode execution")                                       \
 865                                                                             \
 866   develop(bool, TraceICs, false,                                            \
 867           "Trace inline cache changes")                                     \
 868                                                                             \
 869   notproduct(bool, TraceInvocationCounterOverflow, false,                   \
 870           "Trace method invocation counter overflow")                       \
 871                                                                             \
 872   develop(bool, TraceInlineCacheClearing, false,                            \
 873           "Trace clearing of inline caches in nmethods")                    \
 874                                                                             \
 875   develop(bool, TraceDependencies, false,                                   \
 876           "Trace dependencies")                                             \
 877                                                                             \
 878   develop(bool, VerifyDependencies, trueInDebug,                            \
 879           "Exercise and verify the compilation dependency mechanism")       \
 880                                                                             \
 881   develop(bool, TraceNewOopMapGeneration, false,                            \
 882           "Trace OopMapGeneration")                                         \
 883                                                                             \
 884   develop(bool, TraceNewOopMapGenerationDetailed, false,                    \
 885           "Trace OopMapGeneration: print detailed cell states")             \
 886                                                                             \
 887   develop(bool, TimeOopMap, false,                                          \
 888           "Time calls to GenerateOopMap::compute_map() in sum")             \
 889                                                                             \
 890   develop(bool, TimeOopMap2, false,                                         \
 891           "Time calls to GenerateOopMap::compute_map() individually")       \
 892                                                                             \
 893   develop(bool, TraceOopMapRewrites, false,                                 \
 894           "Trace rewriting of method oops during oop map generation")       \
 895                                                                             \
 896   develop(bool, TraceICBuffer, false,                                       \
 897           "Trace usage of IC buffer")                                       \
 898                                                                             \
 899   develop(bool, TraceCompiledIC, false,                                     \
 900           "Trace changes of compiled IC")                                   \
 901                                                                             \
 902   develop(bool, FLSVerifyDictionary, false,                                 \
 903           "Do lots of (expensive) FLS dictionary verification")             \
 904                                                                             \
 905                                                                             \
 906   notproduct(bool, CheckMemoryInitialization, false,                        \
 907           "Check memory initialization")                                    \
 908                                                                             \
 909   product(uintx, ProcessDistributionStride, 4,                              \
 910           "Stride through processors when distributing processes")          \
 911           range(0, max_juint)                                               \
 912                                                                             \
 913   develop(bool, TraceFinalizerRegistration, false,                          \
 914           "Trace registration of final references")                         \
 915                                                                             \
 916   product(bool, IgnoreEmptyClassPaths, false,                               \
 917           "Ignore empty path elements in -classpath")                       \
 918                                                                             \
 919   product(size_t, InitialBootClassLoaderMetaspaceSize,                      \
 920           NOT_LP64(2200*K) LP64_ONLY(4*M),                                  \
 921           "Initial size of the boot class loader data metaspace")           \
 922           range(30*K, max_uintx/BytesPerWord)                               \
 923           constraint(InitialBootClassLoaderMetaspaceSizeConstraintFunc, AfterErgo)\
 924                                                                             \
 925   product(bool, PrintHeapAtSIGBREAK, true,                                  \
 926           "Print heap layout in response to SIGBREAK")                      \
 927                                                                             \
 928   manageable(bool, PrintClassHistogram, false,                              \
 929           "Print a histogram of class instances")                           \
 930                                                                             \
 931   experimental(double, ObjectCountCutOffPercent, 0.5,                       \
 932           "The percentage of the used heap that the instances of a class "  \
 933           "must occupy for the class to generate a trace event")            \
 934           range(0.0, 100.0)                                                 \
 935                                                                             \
 936   /* JVMTI heap profiling */                                                \
 937                                                                             \
 938   diagnostic(bool, TraceJVMTIObjectTagging, false,                          \
 939           "Trace JVMTI object tagging calls")                               \
 940                                                                             \
 941   diagnostic(bool, VerifyBeforeIteration, false,                            \
 942           "Verify memory system before JVMTI iteration")                    \
 943                                                                             \
 944   /* compiler interface */                                                  \
 945                                                                             \
 946   develop(bool, CIPrintCompilerName, false,                                 \
 947           "when CIPrint is active, print the name of the active compiler")  \
 948                                                                             \
 949   diagnostic(bool, CIPrintCompileQueue, false,                              \
 950           "display the contents of the compile queue whenever a "           \
 951           "compilation is enqueued")                                        \
 952                                                                             \
 953   develop(bool, CIPrintRequests, false,                                     \
 954           "display every request for compilation")                          \
 955                                                                             \
 956   product(bool, CITime, false,                                              \
 957           "collect timing information for compilation")                     \
 958                                                                             \
 959   develop(bool, CITimeVerbose, false,                                       \
 960           "be more verbose in compilation timings")                         \
 961                                                                             \
 962   develop(bool, CITimeEach, false,                                          \
 963           "display timing information after each successful compilation")   \
 964                                                                             \
 965   develop(bool, CICountOSR, false,                                          \
 966           "use a separate counter when assigning ids to osr compilations")  \
 967                                                                             \
 968   develop(bool, CICompileNatives, true,                                     \
 969           "compile native methods if supported by the compiler")            \
 970                                                                             \
 971   develop_pd(bool, CICompileOSR,                                            \
 972           "compile on stack replacement methods if supported by the "       \
 973           "compiler")                                                       \
 974                                                                             \
 975   develop(bool, CIPrintMethodCodes, false,                                  \
 976           "print method bytecodes of the compiled code")                    \
 977                                                                             \
 978   develop(bool, CIPrintTypeFlow, false,                                     \
 979           "print the results of ciTypeFlow analysis")                       \
 980                                                                             \
 981   develop(bool, CITraceTypeFlow, false,                                     \
 982           "detailed per-bytecode tracing of ciTypeFlow analysis")           \
 983                                                                             \
 984   develop(intx, OSROnlyBCI, -1,                                             \
 985           "OSR only at this bci.  Negative values mean exclude that bci")   \
 986                                                                             \
 987   /* compiler */                                                            \
 988                                                                             \
 989   /* notice: the max range value here is max_jint, not max_intx  */         \
 990   /* because of overflow issue                                   */         \
 991   product(intx, CICompilerCount, CI_COMPILER_COUNT,                         \
 992           "Number of compiler threads to run")                              \
 993           range(0, max_jint)                                                \
 994           constraint(CICompilerCountConstraintFunc, AfterErgo)              \
 995                                                                             \
 996   product(bool, UseDynamicNumberOfCompilerThreads, true,                    \
 997           "Dynamically choose the number of parallel compiler threads")     \
 998                                                                             \
 999   diagnostic(bool, ReduceNumberOfCompilerThreads, true,                     \
1000              "Reduce the number of parallel compiler threads when they "    \
1001              "are not used")                                                \
1002                                                                             \
1003   diagnostic(bool, TraceCompilerThreads, false,                             \
1004              "Trace creation and removal of compiler threads")              \
1005                                                                             \
1006   develop(bool, InjectCompilerCreationFailure, false,                       \
1007           "Inject thread creation failures for "                            \
1008           "UseDynamicNumberOfCompilerThreads")                              \
1009                                                                             \
1010   develop(bool, UseStackBanging, true,                                      \
1011           "use stack banging for stack overflow checks (required for "      \
1012           "proper StackOverflow handling; disable only to measure cost "    \
1013           "of stackbanging)")                                               \
1014                                                                             \
1015   develop(bool, GenerateSynchronizationCode, true,                          \
1016           "generate locking/unlocking code for synchronized methods and "   \
1017           "monitors")                                                       \
1018                                                                             \
1019   develop(bool, GenerateRangeChecks, true,                                  \
1020           "Generate range checks for array accesses")                       \
1021                                                                             \
1022   diagnostic_pd(bool, ImplicitNullChecks,                                   \
1023           "Generate code for implicit null checks")                         \
1024                                                                             \
1025   product_pd(bool, TrapBasedNullChecks,                                     \
1026           "Generate code for null checks that uses a cmp and trap "         \
1027           "instruction raising SIGTRAP.  This is only used if an access to" \
1028           "null (+offset) will not raise a SIGSEGV, i.e.,"                  \
1029           "ImplicitNullChecks don't work (PPC64).")                         \
1030                                                                             \
1031   diagnostic(bool, EnableThreadSMRExtraValidityChecks, true,                \
1032              "Enable Thread SMR extra validity checks")                     \
1033                                                                             \
1034   diagnostic(bool, EnableThreadSMRStatistics, trueInDebug,                  \
1035              "Enable Thread SMR Statistics")                                \
1036                                                                             \
1037   product(bool, UseNotificationThread, true,                                \
1038           "Use Notification Thread")                                        \
1039                                                                             \
1040   product(bool, Inline, true,                                               \
1041           "Enable inlining")                                                \
1042                                                                             \
1043   product(bool, ClipInlining, true,                                         \
1044           "Clip inlining if aggregate method exceeds DesiredMethodLimit")   \
1045                                                                             \
1046   develop(bool, UseCHA, true,                                               \
1047           "Enable CHA")                                                     \
1048                                                                             \
1049   product(bool, UseTypeProfile, true,                                       \
1050           "Check interpreter profile for historically monomorphic calls")   \
1051                                                                             \
1052   diagnostic(bool, PrintInlining, false,                                    \
1053           "Print inlining optimizations")                                   \
1054                                                                             \
1055   product(bool, UsePopCountInstruction, false,                              \
1056           "Use population count instruction")                               \
1057                                                                             \
1058   develop(bool, EagerInitialization, false,                                 \
1059           "Eagerly initialize classes if possible")                         \
1060                                                                             \
1061   diagnostic(bool, LogTouchedMethods, false,                                \
1062           "Log methods which have been ever touched in runtime")            \
1063                                                                             \
1064   diagnostic(bool, PrintTouchedMethodsAtExit, false,                        \
1065           "Print all methods that have been ever touched in runtime")       \
1066                                                                             \
1067   develop(bool, TraceMethodReplacement, false,                              \
1068           "Print when methods are replaced do to recompilation")            \
1069                                                                             \
1070   develop(bool, PrintMethodFlushing, false,                                 \
1071           "Print the nmethods being flushed")                               \
1072                                                                             \
1073   diagnostic(bool, PrintMethodFlushingStatistics, false,                    \
1074           "print statistics about method flushing")                         \
1075                                                                             \
1076   diagnostic(intx, HotMethodDetectionLimit, 100000,                         \
1077           "Number of compiled code invocations after which "                \
1078           "the method is considered as hot by the flusher")                 \
1079           range(1, max_jint)                                                \
1080                                                                             \
1081   diagnostic(intx, MinPassesBeforeFlush, 10,                                \
1082           "Minimum number of sweeper passes before an nmethod "             \
1083           "can be flushed")                                                 \
1084           range(0, max_intx)                                                \
1085                                                                             \
1086   product(bool, UseCodeAging, true,                                         \
1087           "Insert counter to detect warm methods")                          \
1088                                                                             \
1089   diagnostic(bool, StressCodeAging, false,                                  \
1090           "Start with counters compiled in")                                \
1091                                                                             \
1092   develop(bool, StressCodeBuffers, false,                                   \
1093           "Exercise code buffer expansion and other rare state changes")    \
1094                                                                             \
1095   diagnostic(bool, DebugNonSafepoints, trueInDebug,                         \
1096           "Generate extra debugging information for non-safepoints in "     \
1097           "nmethods")                                                       \
1098                                                                             \
1099   product(bool, PrintVMOptions, false,                                      \
1100           "Print flags that appeared on the command line")                  \
1101                                                                             \
1102   product(bool, IgnoreUnrecognizedVMOptions, false,                         \
1103           "Ignore unrecognized VM options")                                 \
1104                                                                             \
1105   product(bool, PrintCommandLineFlags, false,                               \
1106           "Print flags specified on command line or set by ergonomics")     \
1107                                                                             \
1108   product(bool, PrintFlagsInitial, false,                                   \
1109           "Print all VM flags before argument processing and exit VM")      \
1110                                                                             \
1111   product(bool, PrintFlagsFinal, false,                                     \
1112           "Print all VM flags after argument and ergonomic processing")     \
1113                                                                             \
1114   notproduct(bool, PrintFlagsWithComments, false,                           \
1115           "Print all VM flags with default values and descriptions and "    \
1116           "exit")                                                           \
1117                                                                             \
1118   product(bool, PrintFlagsRanges, false,                                    \
1119           "Print VM flags and their ranges")                                \
1120                                                                             \
1121   diagnostic(bool, SerializeVMOutput, true,                                 \
1122           "Use a mutex to serialize output to tty and LogFile")             \
1123                                                                             \
1124   diagnostic(bool, DisplayVMOutput, true,                                   \
1125           "Display all VM output on the tty, independently of LogVMOutput") \
1126                                                                             \
1127   diagnostic(bool, LogVMOutput, false,                                      \
1128           "Save VM output to LogFile")                                      \
1129                                                                             \
1130   diagnostic(ccstr, LogFile, NULL,                                          \
1131           "If LogVMOutput or LogCompilation is on, save VM output to "      \
1132           "this file [default: ./hotspot_pid%p.log] (%p replaced with pid)")\
1133                                                                             \
1134   product(ccstr, ErrorFile, NULL,                                           \
1135           "If an error occurs, save the error data to this file "           \
1136           "[default: ./hs_err_pid%p.log] (%p replaced with pid)")           \
1137                                                                             \
1138   product(bool, ExtensiveErrorReports,                                      \
1139           PRODUCT_ONLY(false) NOT_PRODUCT(true),                            \
1140           "Error reports are more extensive.")                              \
1141                                                                             \
1142   product(bool, DisplayVMOutputToStderr, false,                             \
1143           "If DisplayVMOutput is true, display all VM output to stderr")    \
1144                                                                             \
1145   product(bool, DisplayVMOutputToStdout, false,                             \
1146           "If DisplayVMOutput is true, display all VM output to stdout")    \
1147                                                                             \
1148   product(bool, ErrorFileToStderr, false,                                   \
1149           "If true, error data is printed to stderr instead of a file")     \
1150                                                                             \
1151   product(bool, ErrorFileToStdout, false,                                   \
1152           "If true, error data is printed to stdout instead of a file")     \
1153                                                                             \
1154   product(bool, UseHeavyMonitors, false,                                    \
1155           "use heavyweight instead of lightweight Java monitors")           \
1156                                                                             \
1157   product(bool, PrintStringTableStatistics, false,                          \
1158           "print statistics about the StringTable and SymbolTable")         \
1159                                                                             \
1160   diagnostic(bool, VerifyStringTableAtExit, false,                          \
1161           "verify StringTable contents at exit")                            \
1162                                                                             \
1163   notproduct(bool, PrintSymbolTableSizeHistogram, false,                    \
1164           "print histogram of the symbol table")                            \
1165                                                                             \
1166   notproduct(bool, ExitVMOnVerifyError, false,                              \
1167           "standard exit from VM if bytecode verify error "                 \
1168           "(only in debug mode)")                                           \
1169                                                                             \
1170   diagnostic(ccstr, AbortVMOnException, NULL,                               \
1171           "Call fatal if this exception is thrown.  Example: "              \
1172           "java -XX:AbortVMOnException=java.lang.NullPointerException Foo") \
1173                                                                             \
1174   diagnostic(ccstr, AbortVMOnExceptionMessage, NULL,                        \
1175           "Call fatal if the exception pointed by AbortVMOnException "      \
1176           "has this message")                                               \
1177                                                                             \
1178   develop(bool, DebugVtables, false,                                        \
1179           "add debugging code to vtable dispatch")                          \
1180                                                                             \
1181   notproduct(bool, PrintVtableStats, false,                                 \
1182           "print vtables stats at end of run")                              \
1183                                                                             \
1184   develop(bool, TraceCreateZombies, false,                                  \
1185           "trace creation of zombie nmethods")                              \
1186                                                                             \
1187   product(bool, RangeCheckElimination, true,                                \
1188           "Eliminate range checks")                                         \
1189                                                                             \
1190   develop_pd(bool, UncommonNullCast,                                        \
1191           "track occurrences of null in casts; adjust compiler tactics")    \
1192                                                                             \
1193   develop(bool, TypeProfileCasts,  true,                                    \
1194           "treat casts like calls for purposes of type profiling")          \
1195                                                                             \
1196   develop(bool, TraceLivenessGen, false,                                    \
1197           "Trace the generation of liveness analysis information")          \
1198                                                                             \
1199   notproduct(bool, TraceLivenessQuery, false,                               \
1200           "Trace queries of liveness analysis information")                 \
1201                                                                             \
1202   notproduct(bool, CollectIndexSetStatistics, false,                        \
1203           "Collect information about IndexSets")                            \
1204                                                                             \
1205   develop(bool, UseLoopSafepoints, true,                                    \
1206           "Generate Safepoint nodes in every loop")                         \
1207                                                                             \
1208   develop(intx, FastAllocateSizeLimit, 128*K,                               \
1209           /* Note:  This value is zero mod 1<<13 for a cheap sparc set. */  \
1210           "Inline allocations larger than this in doublewords must go slow")\
1211                                                                             \
1212   product_pd(bool, CompactStrings,                                          \
1213           "Enable Strings to use single byte chars in backing store")       \
1214                                                                             \
1215   product_pd(uintx, TypeProfileLevel,                                       \
1216           "=XYZ, with Z: Type profiling of arguments at call; "             \
1217                      "Y: Type profiling of return value at call; "          \
1218                      "X: Type profiling of parameters to methods; "         \
1219           "X, Y and Z in 0=off ; 1=jsr292 only; 2=all methods")             \
1220           constraint(TypeProfileLevelConstraintFunc, AfterErgo)             \
1221                                                                             \
1222   product(intx, TypeProfileArgsLimit,     2,                                \
1223           "max number of call arguments to consider for type profiling")    \
1224           range(0, 16)                                                      \
1225                                                                             \
1226   product(intx, TypeProfileParmsLimit,    2,                                \
1227           "max number of incoming parameters to consider for type profiling"\
1228           ", -1 for all")                                                   \
1229           range(-1, 64)                                                     \
1230                                                                             \
1231   /* statistics */                                                          \
1232   develop(bool, CountCompiledCalls, false,                                  \
1233           "Count method invocations")                                       \
1234                                                                             \
1235   notproduct(bool, CountRuntimeCalls, false,                                \
1236           "Count VM runtime calls")                                         \
1237                                                                             \
1238   develop(bool, CountJNICalls, false,                                       \
1239           "Count jni method invocations")                                   \
1240                                                                             \
1241   notproduct(bool, CountJVMCalls, false,                                    \
1242           "Count jvm method invocations")                                   \
1243                                                                             \
1244   notproduct(bool, CountRemovableExceptions, false,                         \
1245           "Count exceptions that could be replaced by branches due to "     \
1246           "inlining")                                                       \
1247                                                                             \
1248   notproduct(bool, ICMissHistogram, false,                                  \
1249           "Produce histogram of IC misses")                                 \
1250                                                                             \
1251   /* interpreter */                                                         \
1252   product_pd(bool, RewriteBytecodes,                                        \
1253           "Allow rewriting of bytecodes (bytecodes are not immutable)")     \
1254                                                                             \
1255   product_pd(bool, RewriteFrequentPairs,                                    \
1256           "Rewrite frequently used bytecode pairs into a single bytecode")  \
1257                                                                             \
1258   diagnostic(bool, PrintInterpreter, false,                                 \
1259           "Print the generated interpreter code")                           \
1260                                                                             \
1261   product(bool, UseInterpreter, true,                                       \
1262           "Use interpreter for non-compiled methods")                       \
1263                                                                             \
1264   develop(bool, UseFastSignatureHandlers, true,                             \
1265           "Use fast signature handlers for native calls")                   \
1266                                                                             \
1267   product(bool, UseLoopCounter, true,                                       \
1268           "Increment invocation counter on backward branch")                \
1269                                                                             \
1270   product_pd(bool, UseOnStackReplacement,                                   \
1271           "Use on stack replacement, calls runtime if invoc. counter "      \
1272           "overflows in loop")                                              \
1273                                                                             \
1274   notproduct(bool, TraceOnStackReplacement, false,                          \
1275           "Trace on stack replacement")                                     \
1276                                                                             \
1277   product_pd(bool, PreferInterpreterNativeStubs,                            \
1278           "Use always interpreter stubs for native methods invoked via "    \
1279           "interpreter")                                                    \
1280                                                                             \
1281   develop(bool, CountBytecodes, false,                                      \
1282           "Count number of bytecodes executed")                             \
1283                                                                             \
1284   develop(bool, PrintBytecodeHistogram, false,                              \
1285           "Print histogram of the executed bytecodes")                      \
1286                                                                             \
1287   develop(bool, PrintBytecodePairHistogram, false,                          \
1288           "Print histogram of the executed bytecode pairs")                 \
1289                                                                             \
1290   diagnostic(bool, PrintSignatureHandlers, false,                           \
1291           "Print code generated for native method signature handlers")      \
1292                                                                             \
1293   develop(bool, VerifyOops, false,                                          \
1294           "Do plausibility checks for oops")                                \
1295                                                                             \
1296   develop(bool, CheckUnhandledOops, false,                                  \
1297           "Check for unhandled oops in VM code")                            \
1298                                                                             \
1299   develop(bool, VerifyJNIFields, trueInDebug,                               \
1300           "Verify jfieldIDs for instance fields")                           \
1301                                                                             \
1302   notproduct(bool, VerifyJNIEnvThread, false,                               \
1303           "Verify JNIEnv.thread == Thread::current() when entering VM "     \
1304           "from JNI")                                                       \
1305                                                                             \
1306   develop(bool, VerifyFPU, false,                                           \
1307           "Verify FPU state (check for NaN's, etc.)")                       \
1308                                                                             \
1309   develop(bool, VerifyThread, false,                                        \
1310           "Watch the thread register for corruption (SPARC only)")          \
1311                                                                             \
1312   develop(bool, VerifyActivationFrameSize, false,                           \
1313           "Verify that activation frame didn't become smaller than its "    \
1314           "minimal size")                                                   \
1315                                                                             \
1316   develop(bool, TraceFrequencyInlining, false,                              \
1317           "Trace frequency based inlining")                                 \
1318                                                                             \
1319   develop_pd(bool, InlineIntrinsics,                                        \
1320           "Inline intrinsics that can be statically resolved")              \
1321                                                                             \
1322   product_pd(bool, ProfileInterpreter,                                      \
1323           "Profile at the bytecode level during interpretation")            \
1324                                                                             \
1325   develop(bool, TraceProfileInterpreter, false,                             \
1326           "Trace profiling at the bytecode level during interpretation. "   \
1327           "This outputs the profiling information collected to improve "    \
1328           "jit compilation.")                                               \
1329                                                                             \
1330   develop_pd(bool, ProfileTraps,                                            \
1331           "Profile deoptimization traps at the bytecode level")             \
1332                                                                             \
1333   product(intx, ProfileMaturityPercentage, 20,                              \
1334           "number of method invocations/branches (expressed as % of "       \
1335           "CompileThreshold) before using the method's profile")            \
1336           range(0, 100)                                                     \
1337                                                                             \
1338   diagnostic(bool, PrintMethodData, false,                                  \
1339           "Print the results of +ProfileInterpreter at end of run")         \
1340                                                                             \
1341   develop(bool, VerifyDataPointer, trueInDebug,                             \
1342           "Verify the method data pointer during interpreter profiling")    \
1343                                                                             \
1344   develop(bool, VerifyCompiledCode, false,                                  \
1345           "Include miscellaneous runtime verifications in nmethod code; "   \
1346           "default off because it disturbs nmethod size heuristics")        \
1347                                                                             \
1348   notproduct(bool, CrashGCForDumpingJavaThread, false,                      \
1349           "Manually make GC thread crash then dump java stack trace;  "     \
1350           "Test only")                                                      \
1351                                                                             \
1352   /* compilation */                                                         \
1353   product(bool, UseCompiler, true,                                          \
1354           "Use Just-In-Time compilation")                                   \
1355                                                                             \
1356   product(bool, UseCounterDecay, true,                                      \
1357           "Adjust recompilation counters")                                  \
1358                                                                             \
1359   develop(intx, CounterHalfLifeTime,    30,                                 \
1360           "Half-life time of invocation counters (in seconds)")             \
1361                                                                             \
1362   develop(intx, CounterDecayMinIntervalLength,   500,                       \
1363           "The minimum interval (in milliseconds) between invocation of "   \
1364           "CounterDecay")                                                   \
1365                                                                             \
1366   product(bool, AlwaysCompileLoopMethods, false,                            \
1367           "When using recompilation, never interpret methods "              \
1368           "containing loops")                                               \
1369                                                                             \
1370   product(bool, DontCompileHugeMethods, true,                               \
1371           "Do not compile methods > HugeMethodLimit")                       \
1372                                                                             \
1373   /* Bytecode escape analysis estimation. */                                \
1374   product(bool, EstimateArgEscape, true,                                    \
1375           "Analyze bytecodes to estimate escape state of arguments")        \
1376                                                                             \
1377   product(intx, BCEATraceLevel, 0,                                          \
1378           "How much tracing to do of bytecode escape analysis estimates "   \
1379           "(0-3)")                                                          \
1380           range(0, 3)                                                       \
1381                                                                             \
1382   product(intx, MaxBCEAEstimateLevel, 5,                                    \
1383           "Maximum number of nested calls that are analyzed by BC EA")      \
1384           range(0, max_jint)                                                \
1385                                                                             \
1386   product(intx, MaxBCEAEstimateSize, 150,                                   \
1387           "Maximum bytecode size of a method to be analyzed by BC EA")      \
1388           range(0, max_jint)                                                \
1389                                                                             \
1390   product(intx,  AllocatePrefetchStyle, 1,                                  \
1391           "0 = no prefetch, "                                               \
1392           "1 = generate prefetch instructions for each allocation, "        \
1393           "2 = use TLAB watermark to gate allocation prefetch, "            \
1394           "3 = generate one prefetch instruction per cache line")           \
1395           range(0, 3)                                                       \
1396                                                                             \
1397   product(intx,  AllocatePrefetchDistance, -1,                              \
1398           "Distance to prefetch ahead of allocation pointer. "              \
1399           "-1: use system-specific value (automatically determined")        \
1400           constraint(AllocatePrefetchDistanceConstraintFunc,AfterMemoryInit)\
1401                                                                             \
1402   product(intx,  AllocatePrefetchLines, 3,                                  \
1403           "Number of lines to prefetch ahead of array allocation pointer")  \
1404           range(1, 64)                                                      \
1405                                                                             \
1406   product(intx,  AllocateInstancePrefetchLines, 1,                          \
1407           "Number of lines to prefetch ahead of instance allocation "       \
1408           "pointer")                                                        \
1409           range(1, 64)                                                      \
1410                                                                             \
1411   product(intx,  AllocatePrefetchStepSize, 16,                              \
1412           "Step size in bytes of sequential prefetch instructions")         \
1413           range(1, 512)                                                     \
1414           constraint(AllocatePrefetchStepSizeConstraintFunc,AfterMemoryInit)\
1415                                                                             \
1416   product(intx,  AllocatePrefetchInstr, 0,                                  \
1417           "Select instruction to prefetch ahead of allocation pointer")     \
1418           constraint(AllocatePrefetchInstrConstraintFunc, AfterMemoryInit)  \
1419                                                                             \
1420   /* deoptimization */                                                      \
1421   develop(bool, TraceDeoptimization, false,                                 \
1422           "Trace deoptimization")                                           \
1423                                                                             \
1424   develop(bool, PrintDeoptimizationDetails, false,                          \
1425           "Print more information about deoptimization")                    \
1426                                                                             \
1427   develop(bool, DebugDeoptimization, false,                                 \
1428           "Tracing various information while debugging deoptimization")     \
1429                                                                             \
1430   product(intx, SelfDestructTimer, 0,                                       \
1431           "Will cause VM to terminate after a given time (in minutes) "     \
1432           "(0 means off)")                                                  \
1433           range(0, max_intx)                                                \
1434                                                                             \
1435   product(intx, MaxJavaStackTraceDepth, 1024,                               \
1436           "The maximum number of lines in the stack trace for Java "        \
1437           "exceptions (0 means all)")                                       \
1438           range(0, max_jint/2)                                              \
1439                                                                             \
1440   /* notice: the max range value here is max_jint, not max_intx  */         \
1441   /* because of overflow issue                                   */         \
1442   diagnostic(intx, GuaranteedSafepointInterval, 1000,                       \
1443           "Guarantee a safepoint (at least) every so many milliseconds "    \
1444           "(0 means none)")                                                 \
1445           range(0, max_jint)                                                \
1446                                                                             \
1447   product(intx, SafepointTimeoutDelay, 10000,                               \
1448           "Delay in milliseconds for option SafepointTimeout")              \
1449   LP64_ONLY(range(0, max_intx/MICROUNITS))                                  \
1450   NOT_LP64(range(0, max_intx))                                              \
1451                                                                             \
1452   product(intx, NmethodSweepActivity, 10,                                   \
1453           "Removes cold nmethods from code cache if > 0. Higher values "    \
1454           "result in more aggressive sweeping")                             \
1455           range(0, 2000)                                                    \
1456                                                                             \
1457   notproduct(bool, LogSweeper, false,                                       \
1458           "Keep a ring buffer of sweeper activity")                         \
1459                                                                             \
1460   notproduct(intx, SweeperLogEntries, 1024,                                 \
1461           "Number of records in the ring buffer of sweeper activity")       \
1462                                                                             \
1463   notproduct(intx, MemProfilingInterval, 500,                               \
1464           "Time between each invocation of the MemProfiler")                \
1465                                                                             \
1466   develop(intx, MallocCatchPtr, -1,                                         \
1467           "Hit breakpoint when mallocing/freeing this pointer")             \
1468                                                                             \
1469   notproduct(ccstrlist, SuppressErrorAt, "",                                \
1470           "List of assertions (file:line) to muzzle")                       \
1471                                                                             \
1472   develop(intx, StackPrintLimit, 100,                                       \
1473           "number of stack frames to print in VM-level stack dump")         \
1474                                                                             \
1475   notproduct(intx, MaxElementPrintSize, 256,                                \
1476           "maximum number of elements to print")                            \
1477                                                                             \
1478   notproduct(intx, MaxSubklassPrintSize, 4,                                 \
1479           "maximum number of subklasses to print when printing klass")      \
1480                                                                             \
1481   product(intx, MaxInlineLevel, 15,                                         \
1482           "maximum number of nested calls that are inlined")                \
1483           range(0, max_jint)                                                \
1484                                                                             \
1485   product(intx, MaxRecursiveInlineLevel, 1,                                 \
1486           "maximum number of nested recursive calls that are inlined")      \
1487           range(0, max_jint)                                                \
1488                                                                             \
1489   develop(intx, MaxForceInlineLevel, 100,                                   \
1490           "maximum number of nested calls that are forced for inlining "    \
1491           "(using CompileCommand or marked w/ @ForceInline)")               \
1492           range(0, max_jint)                                                \
1493                                                                             \
1494   product_pd(intx, InlineSmallCode,                                         \
1495           "Only inline already compiled methods if their code size is "     \
1496           "less than this")                                                 \
1497           range(0, max_jint)                                                \
1498                                                                             \
1499   product(intx, MaxInlineSize, 35,                                          \
1500           "The maximum bytecode size of a method to be inlined")            \
1501           range(0, max_jint)                                                \
1502                                                                             \
1503   product_pd(intx, FreqInlineSize,                                          \
1504           "The maximum bytecode size of a frequent method to be inlined")   \
1505           range(0, max_jint)                                                \
1506                                                                             \
1507   product(intx, MaxTrivialSize, 6,                                          \
1508           "The maximum bytecode size of a trivial method to be inlined")    \
1509           range(0, max_jint)                                                \
1510                                                                             \
1511   product(intx, MinInliningThreshold, 250,                                  \
1512           "The minimum invocation count a method needs to have to be "      \
1513           "inlined")                                                        \
1514           range(0, max_jint)                                                \
1515                                                                             \
1516   develop(intx, MethodHistogramCutoff, 100,                                 \
1517           "The cutoff value for method invocation histogram (+CountCalls)") \
1518                                                                             \
1519   develop(intx, DontYieldALotInterval,    10,                               \
1520           "Interval between which yields will be dropped (milliseconds)")   \
1521                                                                             \
1522   notproduct(intx, DeoptimizeALotInterval,     5,                           \
1523           "Number of exits until DeoptimizeALot kicks in")                  \
1524                                                                             \
1525   notproduct(intx, ZombieALotInterval,     5,                               \
1526           "Number of exits until ZombieALot kicks in")                      \
1527                                                                             \
1528   diagnostic(uintx, MallocMaxTestWords,     0,                              \
1529           "If non-zero, maximum number of words that malloc/realloc can "   \
1530           "allocate (for testing only)")                                    \
1531           range(0, max_uintx)                                               \
1532                                                                             \
1533   product(intx, TypeProfileWidth, 2,                                        \
1534           "Number of receiver types to record in call/cast profile")        \
1535           range(0, 8)                                                       \
1536                                                                             \
1537   develop(intx, BciProfileWidth,      2,                                    \
1538           "Number of return bci's to record in ret profile")                \
1539                                                                             \
1540   product(intx, PerMethodRecompilationCutoff, 400,                          \
1541           "After recompiling N times, stay in the interpreter (-1=>'Inf')") \
1542           range(-1, max_intx)                                               \
1543                                                                             \
1544   product(intx, PerBytecodeRecompilationCutoff, 200,                        \
1545           "Per-BCI limit on repeated recompilation (-1=>'Inf')")            \
1546           range(-1, max_intx)                                               \
1547                                                                             \
1548   product(intx, PerMethodTrapLimit,  100,                                   \
1549           "Limit on traps (of one kind) in a method (includes inlines)")    \
1550           range(0, max_jint)                                                \
1551                                                                             \
1552   experimental(intx, PerMethodSpecTrapLimit,  5000,                         \
1553           "Limit on speculative traps (of one kind) in a method "           \
1554           "(includes inlines)")                                             \
1555           range(0, max_jint)                                                \
1556                                                                             \
1557   product(intx, PerBytecodeTrapLimit,  4,                                   \
1558           "Limit on traps (of one kind) at a particular BCI")               \
1559           range(0, max_jint)                                                \
1560                                                                             \
1561   experimental(intx, SpecTrapLimitExtraEntries,  3,                         \
1562           "Extra method data trap entries for speculation")                 \
1563                                                                             \
1564   develop(intx, InlineFrequencyRatio,    20,                                \
1565           "Ratio of call site execution to caller method invocation")       \
1566           range(0, max_jint)                                                \
1567                                                                             \
1568   diagnostic_pd(intx, InlineFrequencyCount,                                 \
1569           "Count of call site execution necessary to trigger frequent "     \
1570           "inlining")                                                       \
1571           range(0, max_jint)                                                \
1572                                                                             \
1573   develop(intx, InlineThrowCount,    50,                                    \
1574           "Force inlining of interpreted methods that throw this often")    \
1575           range(0, max_jint)                                                \
1576                                                                             \
1577   develop(intx, InlineThrowMaxSize,   200,                                  \
1578           "Force inlining of throwing methods smaller than this")           \
1579           range(0, max_jint)                                                \
1580                                                                             \
1581   develop(intx, ProfilerNodeSize,  1024,                                    \
1582           "Size in K to allocate for the Profile Nodes of each thread")     \
1583           range(0, 1024)                                                    \
1584                                                                             \
1585   product_pd(size_t, MetaspaceSize,                                         \
1586           "Initial threshold (in bytes) at which a garbage collection "     \
1587           "is done to reduce Metaspace usage")                              \
1588           constraint(MetaspaceSizeConstraintFunc,AfterErgo)                 \
1589                                                                             \
1590   product(size_t, MaxMetaspaceSize, max_uintx,                              \
1591           "Maximum size of Metaspaces (in bytes)")                          \
1592           constraint(MaxMetaspaceSizeConstraintFunc,AfterErgo)              \
1593                                                                             \
1594   product(size_t, CompressedClassSpaceSize, 1*G,                            \
1595           "Maximum size of class area in Metaspace when compressed "        \
1596           "class pointers are used")                                        \
1597           range(1*M, 3*G)                                                   \
1598                                                                             \
1599   manageable(uintx, MinHeapFreeRatio, 40,                                   \
1600           "The minimum percentage of heap free after GC to avoid expansion."\
1601           " For most GCs this applies to the old generation. In G1 and"     \
1602           " ParallelGC it applies to the whole heap.")                      \
1603           range(0, 100)                                                     \
1604           constraint(MinHeapFreeRatioConstraintFunc,AfterErgo)              \
1605                                                                             \
1606   manageable(uintx, MaxHeapFreeRatio, 70,                                   \
1607           "The maximum percentage of heap free after GC to avoid shrinking."\
1608           " For most GCs this applies to the old generation. In G1 and"     \
1609           " ParallelGC it applies to the whole heap.")                      \
1610           range(0, 100)                                                     \
1611           constraint(MaxHeapFreeRatioConstraintFunc,AfterErgo)              \
1612                                                                             \
1613   product(bool, ShrinkHeapInSteps, true,                                    \
1614           "When disabled, informs the GC to shrink the java heap directly"  \
1615           " to the target size at the next full GC rather than requiring"   \
1616           " smaller steps during multiple full GCs.")                       \
1617                                                                             \
1618   product(intx, SoftRefLRUPolicyMSPerMB, 1000,                              \
1619           "Number of milliseconds per MB of free space in the heap")        \
1620           range(0, max_intx)                                                \
1621           constraint(SoftRefLRUPolicyMSPerMBConstraintFunc,AfterMemoryInit) \
1622                                                                             \
1623   product(size_t, MinHeapDeltaBytes, ScaleForWordSize(128*K),               \
1624           "The minimum change in heap space due to GC (in bytes)")          \
1625           range(0, max_uintx)                                               \
1626                                                                             \
1627   product(size_t, MinMetaspaceExpansion, ScaleForWordSize(256*K),           \
1628           "The minimum expansion of Metaspace (in bytes)")                  \
1629           range(0, max_uintx)                                               \
1630                                                                             \
1631   product(uintx, MaxMetaspaceFreeRatio,    70,                              \
1632           "The maximum percentage of Metaspace free after GC to avoid "     \
1633           "shrinking")                                                      \
1634           range(0, 100)                                                     \
1635           constraint(MaxMetaspaceFreeRatioConstraintFunc,AfterErgo)         \
1636                                                                             \
1637   product(uintx, MinMetaspaceFreeRatio,    40,                              \
1638           "The minimum percentage of Metaspace free after GC to avoid "     \
1639           "expansion")                                                      \
1640           range(0, 99)                                                      \
1641           constraint(MinMetaspaceFreeRatioConstraintFunc,AfterErgo)         \
1642                                                                             \
1643   product(size_t, MaxMetaspaceExpansion, ScaleForWordSize(4*M),             \
1644           "The maximum expansion of Metaspace without full GC (in bytes)")  \
1645           range(0, max_uintx)                                               \
1646                                                                             \
1647   /* stack parameters */                                                    \
1648   product_pd(intx, StackYellowPages,                                        \
1649           "Number of yellow zone (recoverable overflows) pages of size "    \
1650           "4KB. If pages are bigger yellow zone is aligned up.")            \
1651           range(MIN_STACK_YELLOW_PAGES, (DEFAULT_STACK_YELLOW_PAGES+5))     \
1652                                                                             \
1653   product_pd(intx, StackRedPages,                                           \
1654           "Number of red zone (unrecoverable overflows) pages of size "     \
1655           "4KB. If pages are bigger red zone is aligned up.")               \
1656           range(MIN_STACK_RED_PAGES, (DEFAULT_STACK_RED_PAGES+2))           \
1657                                                                             \
1658   product_pd(intx, StackReservedPages,                                      \
1659           "Number of reserved zone (reserved to annotated methods) pages"   \
1660           " of size 4KB. If pages are bigger reserved zone is aligned up.") \
1661           range(MIN_STACK_RESERVED_PAGES, (DEFAULT_STACK_RESERVED_PAGES+10))\
1662                                                                             \
1663   product(bool, RestrictReservedStack, true,                                \
1664           "Restrict @ReservedStackAccess to trusted classes")               \
1665                                                                             \
1666   /* greater stack shadow pages can't generate instruction to bang stack */ \
1667   product_pd(intx, StackShadowPages,                                        \
1668           "Number of shadow zone (for overflow checking) pages of size "    \
1669           "4KB. If pages are bigger shadow zone is aligned up. "            \
1670           "This should exceed the depth of the VM and native call stack.")  \
1671           range(MIN_STACK_SHADOW_PAGES, (DEFAULT_STACK_SHADOW_PAGES+30))    \
1672                                                                             \
1673   product_pd(intx, ThreadStackSize,                                         \
1674           "Thread Stack Size (in Kbytes)")                                  \
1675           range(0, 1 * M)                                                   \
1676                                                                             \
1677   product_pd(intx, VMThreadStackSize,                                       \
1678           "Non-Java Thread Stack Size (in Kbytes)")                         \
1679           range(0, max_intx/(1 * K))                                        \
1680                                                                             \
1681   product_pd(intx, CompilerThreadStackSize,                                 \
1682           "Compiler Thread Stack Size (in Kbytes)")                         \
1683           range(0, max_intx/(1 * K))                                        \
1684                                                                             \
1685   develop_pd(size_t, JVMInvokeMethodSlack,                                  \
1686           "Stack space (bytes) required for JVM_InvokeMethod to complete")  \
1687                                                                             \
1688   /* code cache parameters                                    */            \
1689   develop_pd(uintx, CodeCacheSegmentSize,                                   \
1690           "Code cache segment size (in bytes) - smallest unit of "          \
1691           "allocation")                                                     \
1692           range(1, 1024)                                                    \
1693           constraint(CodeCacheSegmentSizeConstraintFunc, AfterErgo)         \
1694                                                                             \
1695   develop_pd(intx, CodeEntryAlignment,                                      \
1696           "Code entry alignment for generated code (in bytes)")             \
1697           constraint(CodeEntryAlignmentConstraintFunc, AfterErgo)           \
1698                                                                             \
1699   product_pd(intx, OptoLoopAlignment,                                       \
1700           "Align inner loops to zero relative to this modulus")             \
1701           range(1, 16)                                                      \
1702           constraint(OptoLoopAlignmentConstraintFunc, AfterErgo)            \
1703                                                                             \
1704   product_pd(uintx, InitialCodeCacheSize,                                   \
1705           "Initial code cache size (in bytes)")                             \
1706           range(os::vm_page_size(), max_uintx)                              \
1707                                                                             \
1708   develop_pd(uintx, CodeCacheMinimumUseSpace,                               \
1709           "Minimum code cache size (in bytes) required to start VM.")       \
1710           range(0, max_uintx)                                               \
1711                                                                             \
1712   product(bool, SegmentedCodeCache, false,                                  \
1713           "Use a segmented code cache")                                     \
1714                                                                             \
1715   product_pd(uintx, ReservedCodeCacheSize,                                  \
1716           "Reserved code cache size (in bytes) - maximum code cache size")  \
1717           range(os::vm_page_size(), max_uintx)                              \
1718                                                                             \
1719   product_pd(uintx, NonProfiledCodeHeapSize,                                \
1720           "Size of code heap with non-profiled methods (in bytes)")         \
1721           range(0, max_uintx)                                               \
1722                                                                             \
1723   product_pd(uintx, ProfiledCodeHeapSize,                                   \
1724           "Size of code heap with profiled methods (in bytes)")             \
1725           range(0, max_uintx)                                               \
1726                                                                             \
1727   product_pd(uintx, NonNMethodCodeHeapSize,                                 \
1728           "Size of code heap with non-nmethods (in bytes)")                 \
1729           range(os::vm_page_size(), max_uintx)                              \
1730                                                                             \
1731   product_pd(uintx, CodeCacheExpansionSize,                                 \
1732           "Code cache expansion size (in bytes)")                           \
1733           range(32*K, max_uintx)                                            \
1734                                                                             \
1735   diagnostic_pd(uintx, CodeCacheMinBlockLength,                             \
1736           "Minimum number of segments in a code cache block")               \
1737           range(1, 100)                                                     \
1738                                                                             \
1739   notproduct(bool, ExitOnFullCodeCache, false,                              \
1740           "Exit the VM if we fill the code cache")                          \
1741                                                                             \
1742   product(bool, UseCodeCacheFlushing, true,                                 \
1743           "Remove cold/old nmethods from the code cache")                   \
1744                                                                             \
1745   product(uintx, StartAggressiveSweepingAt, 10,                             \
1746           "Start aggressive sweeping if X[%] of the code cache is free."    \
1747           "Segmented code cache: X[%] of the non-profiled heap."            \
1748           "Non-segmented code cache: X[%] of the total code cache")         \
1749           range(0, 100)                                                     \
1750                                                                             \
1751   /* AOT parameters */                                                      \
1752   experimental(bool, UseAOT, false,                                         \
1753           "Use AOT compiled files")                                         \
1754                                                                             \
1755   experimental(ccstrlist, AOTLibrary, NULL,                                 \
1756           "AOT library")                                                    \
1757                                                                             \
1758   experimental(bool, PrintAOT, false,                                       \
1759           "Print used AOT klasses and methods")                             \
1760                                                                             \
1761   notproduct(bool, PrintAOTStatistics, false,                               \
1762           "Print AOT statistics")                                           \
1763                                                                             \
1764   diagnostic(bool, UseAOTStrictLoading, false,                              \
1765           "Exit the VM if any of the AOT libraries has invalid config")     \
1766                                                                             \
1767   product(bool, CalculateClassFingerprint, false,                           \
1768           "Calculate class fingerprint")                                    \
1769                                                                             \
1770   /* interpreter debugging */                                               \
1771   develop(intx, BinarySwitchThreshold, 5,                                   \
1772           "Minimal number of lookupswitch entries for rewriting to binary " \
1773           "switch")                                                         \
1774                                                                             \
1775   develop(intx, StopInterpreterAt, 0,                                       \
1776           "Stop interpreter execution at specified bytecode number")        \
1777                                                                             \
1778   develop(intx, TraceBytecodesAt, 0,                                        \
1779           "Trace bytecodes starting with specified bytecode number")        \
1780                                                                             \
1781   /* compiler interface */                                                  \
1782   develop(intx, CIStart, 0,                                                 \
1783           "The id of the first compilation to permit")                      \
1784                                                                             \
1785   develop(intx, CIStop, max_jint,                                           \
1786           "The id of the last compilation to permit")                       \
1787                                                                             \
1788   develop(intx, CIStartOSR, 0,                                              \
1789           "The id of the first osr compilation to permit "                  \
1790           "(CICountOSR must be on)")                                        \
1791                                                                             \
1792   develop(intx, CIStopOSR, max_jint,                                        \
1793           "The id of the last osr compilation to permit "                   \
1794           "(CICountOSR must be on)")                                        \
1795                                                                             \
1796   develop(intx, CIBreakAtOSR, -1,                                           \
1797           "The id of osr compilation to break at")                          \
1798                                                                             \
1799   develop(intx, CIBreakAt, -1,                                              \
1800           "The id of compilation to break at")                              \
1801                                                                             \
1802   product(ccstrlist, CompileOnly, "",                                       \
1803           "List of methods (pkg/class.name) to restrict compilation to")    \
1804                                                                             \
1805   product(ccstr, CompileCommandFile, NULL,                                  \
1806           "Read compiler commands from this file [.hotspot_compiler]")      \
1807                                                                             \
1808   diagnostic(ccstr, CompilerDirectivesFile, NULL,                           \
1809           "Read compiler directives from this file")                        \
1810                                                                             \
1811   product(ccstrlist, CompileCommand, "",                                    \
1812           "Prepend to .hotspot_compiler; e.g. log,java/lang/String.<init>") \
1813                                                                             \
1814   develop(bool, ReplayCompiles, false,                                      \
1815           "Enable replay of compilations from ReplayDataFile")              \
1816                                                                             \
1817   product(ccstr, ReplayDataFile, NULL,                                      \
1818           "File containing compilation replay information"                  \
1819           "[default: ./replay_pid%p.log] (%p replaced with pid)")           \
1820                                                                             \
1821    product(ccstr, InlineDataFile, NULL,                                     \
1822           "File containing inlining replay information"                     \
1823           "[default: ./inline_pid%p.log] (%p replaced with pid)")           \
1824                                                                             \
1825   develop(intx, ReplaySuppressInitializers, 2,                              \
1826           "Control handling of class initialization during replay: "        \
1827           "0 - don't do anything special; "                                 \
1828           "1 - treat all class initializers as empty; "                     \
1829           "2 - treat class initializers for application classes as empty; " \
1830           "3 - allow all class initializers to run during bootstrap but "   \
1831           "    pretend they are empty after starting replay")               \
1832           range(0, 3)                                                       \
1833                                                                             \
1834   develop(bool, ReplayIgnoreInitErrors, false,                              \
1835           "Ignore exceptions thrown during initialization for replay")      \
1836                                                                             \
1837   product(bool, DumpReplayDataOnError, true,                                \
1838           "Record replay data for crashing compiler threads")               \
1839                                                                             \
1840   product(bool, CICompilerCountPerCPU, false,                               \
1841           "1 compiler thread for log(N CPUs)")                              \
1842                                                                             \
1843   notproduct(intx, CICrashAt, -1,                                           \
1844           "id of compilation to trigger assert in compiler thread for "     \
1845           "the purpose of testing, e.g. generation of replay data")         \
1846   notproduct(bool, CIObjectFactoryVerify, false,                            \
1847           "enable potentially expensive verification in ciObjectFactory")   \
1848                                                                             \
1849   diagnostic(bool, AbortVMOnCompilationFailure, false,                      \
1850           "Abort VM when method had failed to compile.")                    \
1851                                                                             \
1852   /* Priorities */                                                          \
1853   product_pd(bool, UseThreadPriorities,  "Use native thread priorities")    \
1854                                                                             \
1855   product(intx, ThreadPriorityPolicy, 0,                                    \
1856           "0 : Normal.                                                     "\
1857           "    VM chooses priorities that are appropriate for normal       "\
1858           "    applications. On Solaris NORM_PRIORITY and above are mapped "\
1859           "    to normal native priority. Java priorities below "           \
1860           "    NORM_PRIORITY map to lower native priority values. On       "\
1861           "    Windows applications are allowed to use higher native       "\
1862           "    priorities. However, with ThreadPriorityPolicy=0, VM will   "\
1863           "    not use the highest possible native priority,               "\
1864           "    THREAD_PRIORITY_TIME_CRITICAL, as it may interfere with     "\
1865           "    system threads. On Linux thread priorities are ignored      "\
1866           "    because the OS does not support static priority in          "\
1867           "    SCHED_OTHER scheduling class which is the only choice for   "\
1868           "    non-root, non-realtime applications.                        "\
1869           "1 : Aggressive.                                                 "\
1870           "    Java thread priorities map over to the entire range of      "\
1871           "    native thread priorities. Higher Java thread priorities map "\
1872           "    to higher native thread priorities. This policy should be   "\
1873           "    used with care, as sometimes it can cause performance       "\
1874           "    degradation in the application and/or the entire system. On "\
1875           "    Linux/BSD/macOS this policy requires root privilege or an   "\
1876           "    extended capability.")                                       \
1877           range(0, 1)                                                       \
1878                                                                             \
1879   product(bool, ThreadPriorityVerbose, false,                               \
1880           "Print priority changes")                                         \
1881                                                                             \
1882   product(intx, CompilerThreadPriority, -1,                                 \
1883           "The native priority at which compiler threads should run "       \
1884           "(-1 means no change)")                                           \
1885           range(min_jint, max_jint)                                         \
1886           constraint(CompilerThreadPriorityConstraintFunc, AfterErgo)       \
1887                                                                             \
1888   product(intx, VMThreadPriority, -1,                                       \
1889           "The native priority at which the VM thread should run "          \
1890           "(-1 means no change)")                                           \
1891           range(-1, 127)                                                    \
1892                                                                             \
1893   product(intx, JavaPriority1_To_OSPriority, -1,                            \
1894           "Map Java priorities to OS priorities")                           \
1895           range(-1, 127)                                                    \
1896                                                                             \
1897   product(intx, JavaPriority2_To_OSPriority, -1,                            \
1898           "Map Java priorities to OS priorities")                           \
1899           range(-1, 127)                                                    \
1900                                                                             \
1901   product(intx, JavaPriority3_To_OSPriority, -1,                            \
1902           "Map Java priorities to OS priorities")                           \
1903           range(-1, 127)                                                    \
1904                                                                             \
1905   product(intx, JavaPriority4_To_OSPriority, -1,                            \
1906           "Map Java priorities to OS priorities")                           \
1907           range(-1, 127)                                                    \
1908                                                                             \
1909   product(intx, JavaPriority5_To_OSPriority, -1,                            \
1910           "Map Java priorities to OS priorities")                           \
1911           range(-1, 127)                                                    \
1912                                                                             \
1913   product(intx, JavaPriority6_To_OSPriority, -1,                            \
1914           "Map Java priorities to OS priorities")                           \
1915           range(-1, 127)                                                    \
1916                                                                             \
1917   product(intx, JavaPriority7_To_OSPriority, -1,                            \
1918           "Map Java priorities to OS priorities")                           \
1919           range(-1, 127)                                                    \
1920                                                                             \
1921   product(intx, JavaPriority8_To_OSPriority, -1,                            \
1922           "Map Java priorities to OS priorities")                           \
1923           range(-1, 127)                                                    \
1924                                                                             \
1925   product(intx, JavaPriority9_To_OSPriority, -1,                            \
1926           "Map Java priorities to OS priorities")                           \
1927           range(-1, 127)                                                    \
1928                                                                             \
1929   product(intx, JavaPriority10_To_OSPriority,-1,                            \
1930           "Map Java priorities to OS priorities")                           \
1931           range(-1, 127)                                                    \
1932                                                                             \
1933   experimental(bool, UseCriticalJavaThreadPriority, false,                  \
1934           "Java thread priority 10 maps to critical scheduling priority")   \
1935                                                                             \
1936   experimental(bool, UseCriticalCompilerThreadPriority, false,              \
1937           "Compiler thread(s) run at critical scheduling priority")         \
1938                                                                             \
1939   develop(intx, NewCodeParameter,      0,                                   \
1940           "Testing Only: Create a dedicated integer parameter before "      \
1941           "putback")                                                        \
1942                                                                             \
1943   /* new oopmap storage allocation */                                       \
1944   develop(intx, MinOopMapAllocation,     8,                                 \
1945           "Minimum number of OopMap entries in an OopMapSet")               \
1946                                                                             \
1947   /* Background Compilation */                                              \
1948   develop(intx, LongCompileThreshold,     50,                               \
1949           "Used with +TraceLongCompiles")                                   \
1950                                                                             \
1951   /* recompilation */                                                       \
1952   product_pd(intx, CompileThreshold,                                        \
1953           "number of interpreted method invocations before (re-)compiling") \
1954           constraint(CompileThresholdConstraintFunc, AfterErgo)             \
1955                                                                             \
1956   product(double, CompileThresholdScaling, 1.0,                             \
1957           "Factor to control when first compilation happens "               \
1958           "(both with and without tiered compilation): "                    \
1959           "values greater than 1.0 delay counter overflow, "                \
1960           "values between 0 and 1.0 rush counter overflow, "                \
1961           "value of 1.0 leaves compilation thresholds unchanged "           \
1962           "value of 0.0 is equivalent to -Xint. "                           \
1963           ""                                                                \
1964           "Flag can be set as per-method option. "                          \
1965           "If a value is specified for a method, compilation thresholds "   \
1966           "for that method are scaled by both the value of the global flag "\
1967           "and the value of the per-method flag.")                          \
1968           range(0.0, DBL_MAX)                                               \
1969                                                                             \
1970   product(intx, Tier0InvokeNotifyFreqLog, 7,                                \
1971           "Interpreter (tier 0) invocation notification frequency")         \
1972           range(0, 30)                                                      \
1973                                                                             \
1974   product(intx, Tier2InvokeNotifyFreqLog, 11,                               \
1975           "C1 without MDO (tier 2) invocation notification frequency")      \
1976           range(0, 30)                                                      \
1977                                                                             \
1978   product(intx, Tier3InvokeNotifyFreqLog, 10,                               \
1979           "C1 with MDO profiling (tier 3) invocation notification "         \
1980           "frequency")                                                      \
1981           range(0, 30)                                                      \
1982                                                                             \
1983   product(intx, Tier23InlineeNotifyFreqLog, 20,                             \
1984           "Inlinee invocation (tiers 2 and 3) notification frequency")      \
1985           range(0, 30)                                                      \
1986                                                                             \
1987   product(intx, Tier0BackedgeNotifyFreqLog, 10,                             \
1988           "Interpreter (tier 0) invocation notification frequency")         \
1989           range(0, 30)                                                      \
1990                                                                             \
1991   product(intx, Tier2BackedgeNotifyFreqLog, 14,                             \
1992           "C1 without MDO (tier 2) invocation notification frequency")      \
1993           range(0, 30)                                                      \
1994                                                                             \
1995   product(intx, Tier3BackedgeNotifyFreqLog, 13,                             \
1996           "C1 with MDO profiling (tier 3) invocation notification "         \
1997           "frequency")                                                      \
1998           range(0, 30)                                                      \
1999                                                                             \
2000   product(intx, Tier2CompileThreshold, 0,                                   \
2001           "threshold at which tier 2 compilation is invoked")               \
2002           range(0, max_jint)                                                \
2003                                                                             \
2004   product(intx, Tier2BackEdgeThreshold, 0,                                  \
2005           "Back edge threshold at which tier 2 compilation is invoked")     \
2006           range(0, max_jint)                                                \
2007                                                                             \
2008   product(intx, Tier3InvocationThreshold, 200,                              \
2009           "Compile if number of method invocations crosses this "           \
2010           "threshold")                                                      \
2011           range(0, max_jint)                                                \
2012                                                                             \
2013   product(intx, Tier3MinInvocationThreshold, 100,                           \
2014           "Minimum invocation to compile at tier 3")                        \
2015           range(0, max_jint)                                                \
2016                                                                             \
2017   product(intx, Tier3CompileThreshold, 2000,                                \
2018           "Threshold at which tier 3 compilation is invoked (invocation "   \
2019           "minimum must be satisfied)")                                     \
2020           range(0, max_jint)                                                \
2021                                                                             \
2022   product(intx, Tier3BackEdgeThreshold,  60000,                             \
2023           "Back edge threshold at which tier 3 OSR compilation is invoked") \
2024           range(0, max_jint)                                                \
2025                                                                             \
2026   product(intx, Tier3AOTInvocationThreshold, 10000,                         \
2027           "Compile if number of method invocations crosses this "           \
2028           "threshold if coming from AOT")                                   \
2029           range(0, max_jint)                                                \
2030                                                                             \
2031   product(intx, Tier3AOTMinInvocationThreshold, 1000,                       \
2032           "Minimum invocation to compile at tier 3 if coming from AOT")     \
2033           range(0, max_jint)                                                \
2034                                                                             \
2035   product(intx, Tier3AOTCompileThreshold, 15000,                            \
2036           "Threshold at which tier 3 compilation is invoked (invocation "   \
2037           "minimum must be satisfied) if coming from AOT")                  \
2038           range(0, max_jint)                                                \
2039                                                                             \
2040   product(intx, Tier3AOTBackEdgeThreshold,  120000,                         \
2041           "Back edge threshold at which tier 3 OSR compilation is invoked " \
2042           "if coming from AOT")                                             \
2043           range(0, max_jint)                                                \
2044                                                                             \
2045   diagnostic(intx, Tier0AOTInvocationThreshold, 200,                        \
2046           "Switch to interpreter to profile if the number of method "       \
2047           "invocations crosses this threshold if coming from AOT "          \
2048           "(applicable only with "                                          \
2049           "CompilationMode=high-only|high-only-quick-internal)")            \
2050           range(0, max_jint)                                                \
2051                                                                             \
2052   diagnostic(intx, Tier0AOTMinInvocationThreshold, 100,                     \
2053           "Minimum number of invocations to switch to interpreter "         \
2054           "to profile if coming from AOT "                                  \
2055           "(applicable only with "                                          \
2056           "CompilationMode=high-only|high-only-quick-internal)")            \
2057           range(0, max_jint)                                                \
2058                                                                             \
2059   diagnostic(intx, Tier0AOTCompileThreshold, 2000,                          \
2060           "Threshold at which to switch to interpreter to profile "         \
2061           "if coming from AOT "                                             \
2062           "(invocation minimum must be satisfied, "                         \
2063           "applicable only with "                                           \
2064           "CompilationMode=high-only|high-only-quick-internal)")            \
2065           range(0, max_jint)                                                \
2066                                                                             \
2067   diagnostic(intx, Tier0AOTBackEdgeThreshold,  60000,                       \
2068           "Back edge threshold at which to switch to interpreter "          \
2069           "to profile if coming from AOT "                                  \
2070           "(applicable only with "                                          \
2071           "CompilationMode=high-only|high-only-quick-internal)")            \
2072           range(0, max_jint)                                                \
2073                                                                             \
2074   product(intx, Tier4InvocationThreshold, 5000,                             \
2075           "Compile if number of method invocations crosses this "           \
2076           "threshold")                                                      \
2077           range(0, max_jint)                                                \
2078                                                                             \
2079   product(intx, Tier4MinInvocationThreshold, 600,                           \
2080           "Minimum invocation to compile at tier 4")                        \
2081           range(0, max_jint)                                                \
2082                                                                             \
2083   product(intx, Tier4CompileThreshold, 15000,                               \
2084           "Threshold at which tier 4 compilation is invoked (invocation "   \
2085           "minimum must be satisfied)")                                     \
2086           range(0, max_jint)                                                \
2087                                                                             \
2088   product(intx, Tier4BackEdgeThreshold, 40000,                              \
2089           "Back edge threshold at which tier 4 OSR compilation is invoked") \
2090           range(0, max_jint)                                                \
2091                                                                             \
2092   diagnostic(intx, Tier40InvocationThreshold, 5000,                         \
2093           "Compile if number of method invocations crosses this "           \
2094           "threshold (applicable only with "                                \
2095           "CompilationMode=high-only|high-only-quick-internal)")            \
2096           range(0, max_jint)                                                \
2097                                                                             \
2098   diagnostic(intx, Tier40MinInvocationThreshold, 600,                       \
2099           "Minimum number of invocations to compile at tier 4 "             \
2100           "(applicable only with "                                          \
2101           "CompilationMode=high-only|high-only-quick-internal)")            \
2102           range(0, max_jint)                                                \
2103                                                                             \
2104   diagnostic(intx, Tier40CompileThreshold, 10000,                           \
2105           "Threshold at which tier 4 compilation is invoked (invocation "   \
2106           "minimum must be satisfied, applicable only with "                \
2107           "CompilationMode=high-only|high-only-quick-internal)")            \
2108           range(0, max_jint)                                                \
2109                                                                             \
2110   diagnostic(intx, Tier40BackEdgeThreshold, 15000,                          \
2111           "Back edge threshold at which tier 4 OSR compilation is invoked " \
2112           "(applicable only with "                                          \
2113           "CompilationMode=high-only|high-only-quick-internal)")            \
2114           range(0, max_jint)                                                \
2115                                                                             \
2116   diagnostic(intx, Tier0Delay, 5,                                           \
2117           "If C2 queue size grows over this amount per compiler thread "    \
2118           "do not start profiling in the interpreter "                      \
2119           "(applicable only with "                                          \
2120           "CompilationMode=high-only|high-only-quick-internal)")            \
2121           range(0, max_jint)                                                \
2122                                                                             \
2123   product(intx, Tier3DelayOn, 5,                                            \
2124           "If C2 queue size grows over this amount per compiler thread "    \
2125           "stop compiling at tier 3 and start compiling at tier 2")         \
2126           range(0, max_jint)                                                \
2127                                                                             \
2128   product(intx, Tier3DelayOff, 2,                                           \
2129           "If C2 queue size is less than this amount per compiler thread "  \
2130           "allow methods compiled at tier 2 transition to tier 3")          \
2131           range(0, max_jint)                                                \
2132                                                                             \
2133   product(intx, Tier3LoadFeedback, 5,                                       \
2134           "Tier 3 thresholds will increase twofold when C1 queue size "     \
2135           "reaches this amount per compiler thread")                        \
2136           range(0, max_jint)                                                \
2137                                                                             \
2138   product(intx, Tier4LoadFeedback, 3,                                       \
2139           "Tier 4 thresholds will increase twofold when C2 queue size "     \
2140           "reaches this amount per compiler thread")                        \
2141           range(0, max_jint)                                                \
2142                                                                             \
2143   product(intx, TieredCompileTaskTimeout, 50,                               \
2144           "Kill compile task if method was not used within "                \
2145           "given timeout in milliseconds")                                  \
2146           range(0, max_intx)                                                \
2147                                                                             \
2148   product(intx, TieredStopAtLevel, 4,                                       \
2149           "Stop at given compilation level")                                \
2150           range(0, 4)                                                       \
2151                                                                             \
2152   product(intx, Tier0ProfilingStartPercentage, 200,                         \
2153           "Start profiling in interpreter if the counters exceed tier 3 "   \
2154           "thresholds (tier 4 thresholds with "                             \
2155           "CompilationMode=high-only|high-only-quick-internal)"             \
2156           "by the specified percentage")                                    \
2157           range(0, max_jint)                                                \
2158                                                                             \
2159   product(uintx, IncreaseFirstTierCompileThresholdAt, 50,                   \
2160           "Increase the compile threshold for C1 compilation if the code "  \
2161           "cache is filled by the specified percentage")                    \
2162           range(0, 99)                                                      \
2163                                                                             \
2164   product(intx, TieredRateUpdateMinTime, 1,                                 \
2165           "Minimum rate sampling interval (in milliseconds)")               \
2166           range(0, max_intx)                                                \
2167                                                                             \
2168   product(intx, TieredRateUpdateMaxTime, 25,                                \
2169           "Maximum rate sampling interval (in milliseconds)")               \
2170           range(0, max_intx)                                                \
2171                                                                             \
2172   product(ccstr, CompilationMode, "default",                                \
2173           "Compilation modes: "                                             \
2174           "default: normal tiered compilation; "                            \
2175           "quick-only: C1-only mode; "                                      \
2176           "high-only: C2/JVMCI-only mode; "                                 \
2177           "high-only-quick-internal: C2/JVMCI-only mode, "                  \
2178           "with JVMCI compiler compiled with C1.")                          \
2179                                                                             \
2180   product_pd(bool, TieredCompilation,                                       \
2181           "Enable tiered compilation")                                      \
2182                                                                             \
2183   product(bool, PrintTieredEvents, false,                                   \
2184           "Print tiered events notifications")                              \
2185                                                                             \
2186   product_pd(intx, OnStackReplacePercentage,                                \
2187           "NON_TIERED number of method invocations/branches (expressed as " \
2188           "% of CompileThreshold) before (re-)compiling OSR code")          \
2189           constraint(OnStackReplacePercentageConstraintFunc, AfterErgo)     \
2190                                                                             \
2191   product(intx, InterpreterProfilePercentage, 33,                           \
2192           "NON_TIERED number of method invocations/branches (expressed as " \
2193           "% of CompileThreshold) before profiling in the interpreter")     \
2194           range(0, 100)                                                     \
2195                                                                             \
2196   develop(intx, DesiredMethodLimit,  8000,                                  \
2197           "The desired maximum method size (in bytecodes) after inlining")  \
2198                                                                             \
2199   develop(intx, HugeMethodLimit,  8000,                                     \
2200           "Don't compile methods larger than this if "                      \
2201           "+DontCompileHugeMethods")                                        \
2202                                                                             \
2203   /* Properties for Java libraries  */                                      \
2204                                                                             \
2205   product(uint64_t, MaxDirectMemorySize, 0,                                 \
2206           "Maximum total size of NIO direct-buffer allocations")            \
2207           range(0, max_jlong)                                               \
2208                                                                             \
2209   /* Flags used for temporary code during development  */                   \
2210                                                                             \
2211   diagnostic(bool, UseNewCode, false,                                       \
2212           "Testing Only: Use the new version while testing")                \
2213                                                                             \
2214   diagnostic(bool, UseNewCode2, false,                                      \
2215           "Testing Only: Use the new version while testing")                \
2216                                                                             \
2217   diagnostic(bool, UseNewCode3, false,                                      \
2218           "Testing Only: Use the new version while testing")                \
2219                                                                             \
2220   /* flags for performance data collection */                               \
2221                                                                             \
2222   product(bool, UsePerfData, true,                                          \
2223           "Flag to disable jvmstat instrumentation for performance testing "\
2224           "and problem isolation purposes")                                 \
2225                                                                             \
2226   product(bool, PerfDataSaveToFile, false,                                  \
2227           "Save PerfData memory to hsperfdata_<pid> file on exit")          \
2228                                                                             \
2229   product(ccstr, PerfDataSaveFile, NULL,                                    \
2230           "Save PerfData memory to the specified absolute pathname. "       \
2231           "The string %p in the file name (if present) "                    \
2232           "will be replaced by pid")                                        \
2233                                                                             \
2234   product(intx, PerfDataSamplingInterval, 50,                               \
2235           "Data sampling interval (in milliseconds)")                       \
2236           range(PeriodicTask::min_interval, max_jint)                       \
2237           constraint(PerfDataSamplingIntervalFunc, AfterErgo)               \
2238                                                                             \
2239   product(bool, PerfDisableSharedMem, false,                                \
2240           "Store performance data in standard memory")                      \
2241                                                                             \
2242   product(intx, PerfDataMemorySize, 32*K,                                   \
2243           "Size of performance data memory region. Will be rounded "        \
2244           "up to a multiple of the native os page size.")                   \
2245           range(128, 32*64*K)                                               \
2246                                                                             \
2247   product(intx, PerfMaxStringConstLength, 1024,                             \
2248           "Maximum PerfStringConstant string length before truncation")     \
2249           range(32, 32*K)                                                   \
2250                                                                             \
2251   product(bool, PerfAllowAtExitRegistration, false,                         \
2252           "Allow registration of atexit() methods")                         \
2253                                                                             \
2254   product(bool, PerfBypassFileSystemCheck, false,                           \
2255           "Bypass Win32 file system criteria checks (Windows Only)")        \
2256                                                                             \
2257   product(intx, UnguardOnExecutionViolation, 0,                             \
2258           "Unguard page and retry on no-execute fault (Win32 only) "        \
2259           "0=off, 1=conservative, 2=aggressive")                            \
2260           range(0, 2)                                                       \
2261                                                                             \
2262   /* Serviceability Support */                                              \
2263                                                                             \
2264   product(bool, ManagementServer, false,                                    \
2265           "Create JMX Management Server")                                   \
2266                                                                             \
2267   product(bool, DisableAttachMechanism, false,                              \
2268           "Disable mechanism that allows tools to attach to this VM")       \
2269                                                                             \
2270   product(bool, StartAttachListener, false,                                 \
2271           "Always start Attach Listener at VM startup")                     \
2272                                                                             \
2273   product(bool, EnableDynamicAgentLoading, true,                            \
2274           "Allow tools to load agents with the attach mechanism")           \
2275                                                                             \
2276   manageable(bool, PrintConcurrentLocks, false,                             \
2277           "Print java.util.concurrent locks in thread dump")                \
2278                                                                             \
2279   /* Shared spaces */                                                       \
2280                                                                             \
2281   product(bool, UseSharedSpaces, true,                                      \
2282           "Use shared spaces for metadata")                                 \
2283                                                                             \
2284   product(bool, VerifySharedSpaces, false,                                  \
2285           "Verify integrity of shared spaces")                              \
2286                                                                             \
2287   product(bool, RequireSharedSpaces, false,                                 \
2288           "Require shared spaces for metadata")                             \
2289                                                                             \
2290   product(bool, DumpSharedSpaces, false,                                    \
2291           "Special mode: JVM reads a class list, loads classes, builds "    \
2292           "shared spaces, and dumps the shared spaces to a file to be "     \
2293           "used in future JVM runs")                                        \
2294                                                                             \
2295   product(bool, DynamicDumpSharedSpaces, false,                             \
2296           "Dynamic archive")                                                \
2297                                                                             \
2298   product(bool, PrintSharedArchiveAndExit, false,                           \
2299           "Print shared archive file contents")                             \
2300                                                                             \
2301   product(bool, PrintSharedDictionary, false,                               \
2302           "If PrintSharedArchiveAndExit is true, also print the shared "    \
2303           "dictionary")                                                     \
2304                                                                             \
2305   product(size_t, SharedBaseAddress, LP64_ONLY(32*G)                        \
2306           NOT_LP64(LINUX_ONLY(2*G) NOT_LINUX(0)),                           \
2307           "Address to allocate shared memory region for class data")        \
2308           range(0, SIZE_MAX)                                                \
2309                                                                             \
2310   product(ccstr, SharedArchiveConfigFile, NULL,                             \
2311           "Data to add to the CDS archive file")                            \
2312                                                                             \
2313   product(uintx, SharedSymbolTableBucketSize, 4,                            \
2314           "Average number of symbols per bucket in shared table")           \
2315           range(2, 246)                                                     \
2316                                                                             \
2317   diagnostic(bool, AllowArchivingWithJavaAgent, false,                      \
2318           "Allow Java agent to be run with CDS dumping")                    \
2319                                                                             \
2320   diagnostic(bool, PrintMethodHandleStubs, false,                           \
2321           "Print generated stub code for method handles")                   \
2322                                                                             \
2323   develop(bool, TraceMethodHandles, false,                                  \
2324           "trace internal method handle operations")                        \
2325                                                                             \
2326   diagnostic(bool, VerifyMethodHandles, trueInDebug,                        \
2327           "perform extra checks when constructing method handles")          \
2328                                                                             \
2329   diagnostic(bool, ShowHiddenFrames, false,                                 \
2330           "show method handle implementation frames (usually hidden)")      \
2331                                                                             \
2332   experimental(bool, TrustFinalNonStaticFields, false,                      \
2333           "trust final non-static declarations for constant folding")       \
2334                                                                             \
2335   diagnostic(bool, FoldStableValues, true,                                  \
2336           "Optimize loads from stable fields (marked w/ @Stable)")          \
2337                                                                             \
2338   develop(bool, TraceInvokeDynamic, false,                                  \
2339           "trace internal invoke dynamic operations")                       \
2340                                                                             \
2341   diagnostic(int, UseBootstrapCallInfo, 1,                                  \
2342           "0: when resolving InDy or ConDy, force all BSM arguments to be " \
2343           "resolved before the bootstrap method is called; 1: when a BSM "  \
2344           "that may accept a BootstrapCallInfo is detected, use that API "  \
2345           "to pass BSM arguments, which allows the BSM to delay their "     \
2346           "resolution; 2+: stress test the BCI API by calling more BSMs "   \
2347           "via that API, instead of with the eagerly-resolved array.")      \
2348                                                                             \
2349   diagnostic(bool, PauseAtStartup,      false,                              \
2350           "Causes the VM to pause at startup time and wait for the pause "  \
2351           "file to be removed (default: ./vm.paused.<pid>)")                \
2352                                                                             \
2353   diagnostic(ccstr, PauseAtStartupFile, NULL,                               \
2354           "The file to create and for whose removal to await when pausing " \
2355           "at startup. (default: ./vm.paused.<pid>)")                       \
2356                                                                             \
2357   diagnostic(bool, PauseAtExit, false,                                      \
2358           "Pause and wait for keypress on exit if a debugger is attached")  \
2359                                                                             \
2360   product(bool, ExtendedDTraceProbes,    false,                             \
2361           "Enable performance-impacting dtrace probes")                     \
2362                                                                             \
2363   product(bool, DTraceMethodProbes, false,                                  \
2364           "Enable dtrace probes for method-entry and method-exit")          \
2365                                                                             \
2366   product(bool, DTraceAllocProbes, false,                                   \
2367           "Enable dtrace probes for object allocation")                     \
2368                                                                             \
2369   product(bool, DTraceMonitorProbes, false,                                 \
2370           "Enable dtrace probes for monitor events")                        \
2371                                                                             \
2372   product(bool, RelaxAccessControlCheck, false,                             \
2373           "Relax the access control checks in the verifier")                \
2374                                                                             \
2375   product(uintx, StringTableSize, defaultStringTableSize,                   \
2376           "Number of buckets in the interned String table "                 \
2377           "(will be rounded to nearest higher power of 2)")                 \
2378           range(minimumStringTableSize, 16777216ul /* 2^24 */)              \
2379                                                                             \
2380   experimental(uintx, SymbolTableSize, defaultSymbolTableSize,              \
2381           "Number of buckets in the JVM internal Symbol table")             \
2382           range(minimumSymbolTableSize, 16777216ul /* 2^24 */)              \
2383                                                                             \
2384   product(bool, UseStringDeduplication, false,                              \
2385           "Use string deduplication")                                       \
2386                                                                             \
2387   product(uintx, StringDeduplicationAgeThreshold, 3,                        \
2388           "A string must reach this age (or be promoted to an old region) " \
2389           "to be considered for deduplication")                             \
2390           range(1, markWord::max_age)                                       \
2391                                                                             \
2392   diagnostic(bool, StringDeduplicationResizeALot, false,                    \
2393           "Force table resize every time the table is scanned")             \
2394                                                                             \
2395   diagnostic(bool, StringDeduplicationRehashALot, false,                    \
2396           "Force table rehash every time the table is scanned")             \
2397                                                                             \
2398   diagnostic(bool, WhiteBoxAPI, false,                                      \
2399           "Enable internal testing APIs")                                   \
2400                                                                             \
2401   experimental(intx, SurvivorAlignmentInBytes, 0,                           \
2402            "Default survivor space alignment in bytes")                     \
2403            range(8, 256)                                                    \
2404            constraint(SurvivorAlignmentInBytesConstraintFunc,AfterErgo)     \
2405                                                                             \
2406   product(ccstr, DumpLoadedClassList, NULL,                                 \
2407           "Dump the names all loaded classes, that could be stored into "   \
2408           "the CDS archive, in the specified file")                         \
2409                                                                             \
2410   product(ccstr, SharedClassListFile, NULL,                                 \
2411           "Override the default CDS class list")                            \
2412                                                                             \
2413   product(ccstr, SharedArchiveFile, NULL,                                   \
2414           "Override the default location of the CDS archive file")          \
2415                                                                             \
2416   product(ccstr, ArchiveClassesAtExit, NULL,                                \
2417           "The path and name of the dynamic archive file")                  \
2418                                                                             \
2419   product(ccstr, ExtraSharedClassListFile, NULL,                            \
2420           "Extra classlist for building the CDS archive file")              \
2421                                                                             \
2422   diagnostic(intx, ArchiveRelocationMode, 0,                                \
2423            "(0) first map at preferred address, and if "                    \
2424            "unsuccessful, map at alternative address (default); "           \
2425            "(1) always map at alternative address; "                        \
2426            "(2) always map at preferred address, and if unsuccessful, "     \
2427            "do not map the archive")                                        \
2428            range(0, 2)                                                      \
2429                                                                             \
2430   experimental(size_t, ArrayAllocatorMallocLimit,                           \
2431           SOLARIS_ONLY(64*K) NOT_SOLARIS((size_t)-1),                       \
2432           "Allocation less than this value will be allocated "              \
2433           "using malloc. Larger allocations will use mmap.")                \
2434                                                                             \
2435   experimental(bool, AlwaysAtomicAccesses, false,                           \
2436           "Accesses to all variables should always be atomic")              \
2437                                                                             \
2438   diagnostic(bool, UseUnalignedAccesses, false,                             \
2439           "Use unaligned memory accesses in Unsafe")                        \
2440                                                                             \
2441   product_pd(bool, PreserveFramePointer,                                    \
2442              "Use the FP register for holding the frame pointer "           \
2443              "and not as a general purpose register.")                      \
2444                                                                             \
2445   diagnostic(bool, CheckIntrinsics, true,                                   \
2446              "When a class C is loaded, check that "                        \
2447              "(1) all intrinsics defined by the VM for class C are present "\
2448              "in the loaded class file and are marked with the "            \
2449              "@HotSpotIntrinsicCandidate annotation, that "                 \
2450              "(2) there is an intrinsic registered for all loaded methods " \
2451              "that are annotated with the @HotSpotIntrinsicCandidate "      \
2452              "annotation, and that "                                        \
2453              "(3) no orphan methods exist for class C (i.e., methods for "  \
2454              "which the VM declares an intrinsic but that are not declared "\
2455              "in the loaded class C. "                                      \
2456              "Check (3) is available only in debug builds.")                \
2457                                                                             \
2458   diagnostic_pd(intx, InitArrayShortSize,                                   \
2459           "Threshold small size (in bytes) for clearing arrays. "           \
2460           "Anything this size or smaller may get converted to discrete "    \
2461           "scalar stores.")                                                 \
2462           range(0, max_intx)                                                \
2463           constraint(InitArrayShortSizeConstraintFunc, AfterErgo)           \
2464                                                                             \
2465   diagnostic(bool, CompilerDirectivesIgnoreCompileCommands, false,          \
2466              "Disable backwards compatibility for compile commands.")       \
2467                                                                             \
2468   diagnostic(bool, CompilerDirectivesPrint, false,                          \
2469              "Print compiler directives on installation.")                  \
2470   diagnostic(int,  CompilerDirectivesLimit, 50,                             \
2471              "Limit on number of compiler directives.")                     \
2472                                                                             \
2473   product(ccstr, AllocateHeapAt, NULL,                                      \
2474           "Path to the directoy where a temporary file will be created "    \
2475           "to use as the backing store for Java Heap.")                     \
2476                                                                             \
2477   experimental(ccstr, AllocateOldGenAt, NULL,                               \
2478           "Path to the directoy where a temporary file will be "            \
2479           "created to use as the backing store for old generation."         \
2480           "File of size Xmx is pre-allocated for performance reason, so"    \
2481           "we need that much space available")                              \
2482                                                                             \
2483   develop(int, VerifyMetaspaceInterval, DEBUG_ONLY(500) NOT_DEBUG(0),       \
2484                "Run periodic metaspace verifications (0 - none, "           \
2485                "1 - always, >1 every nth interval)")                        \
2486                                                                             \
2487   diagnostic(bool, ShowRegistersOnAssert, true,                             \
2488           "On internal errors, include registers in error report.")         \
2489                                                                             \
2490   diagnostic(bool, UseSwitchProfiling, true,                                \
2491           "leverage profiling for table/lookup switch")                     \
2492                                                                             \
2493   develop(bool, TraceMemoryWriteback, false,                                \
2494           "Trace memory writeback operations")                              \
2495                                                                             \
2496   JFR_ONLY(product(bool, FlightRecorder, false,                             \
2497           "(Deprecated) Enable Flight Recorder"))                           \
2498                                                                             \
2499   JFR_ONLY(product(ccstr, FlightRecorderOptions, NULL,                      \
2500           "Flight Recorder options"))                                       \
2501                                                                             \
2502   JFR_ONLY(product(ccstr, StartFlightRecording, NULL,                       \
2503           "Start flight recording with options"))                           \
2504                                                                             \
2505   experimental(bool, UseFastUnorderedTimeStamps, false,                     \
2506           "Use platform unstable time where supported for timestamps only") \
2507                                                                             \
2508   product(bool, EnableValhalla, true,                                       \
2509           "Enable experimental Valhalla features")                          \
2510                                                                             \
2511   product_pd(bool, ValueTypePassFieldsAsArgs,                               \
2512           "Pass each value type field as an argument at calls")             \
2513                                                                             \
2514   product_pd(bool, ValueTypeReturnedAsFields,                               \
2515           "Return fields instead of a value type reference")                \
2516                                                                             \
2517   develop(bool, StressValueTypeReturnedAsFields, false,                     \
2518           "Stress return of fields instead of a value type reference")      \
2519                                                                             \
2520   develop(bool, ScalarizeValueTypes, true,                                  \
2521           "Scalarize value types in compiled code")                         \
2522                                                                             \
2523   diagnostic(ccstrlist, ForceNonTearable, "",                               \
2524           "List of inline classes which are forced to be atomic "           \
2525           "(whitespace and commas separate names, "                         \
2526           "and leading and trailing stars '*' are wildcards)")              \
2527                                                                             \
2528   product(bool, PrintNewLayout, false,                                      \
2529                "Print layout compute by new algorithm")                     \
2530                                                                             \
2531   product(bool, PrintFlattenableLayouts, false,                             \
2532                 "Print layout of inline classes and classes with "          \
2533                 "flattenable fields")                                       \
2534                                                                             \
2535   product(bool, UseNewLayout, true,                                         \
2536                 "(Deprecated) Use new algorithm to compute field layouts")  \
2537                                                                             \
2538   product(bool, UseEmptySlotsInSupers, true,                                \
2539                 "Allow allocating fields in empty slots of super-classes")  \
2540                                                                             \
2541 
2542 
2543 
2544 // Interface macros
2545 #define DECLARE_PRODUCT_FLAG(type, name, value, doc)      extern "C" type name;
2546 #define DECLARE_PD_PRODUCT_FLAG(type, name, doc)          extern "C" type name;
2547 #define DECLARE_DIAGNOSTIC_FLAG(type, name, value, doc)   extern "C" type name;
2548 #define DECLARE_PD_DIAGNOSTIC_FLAG(type, name, doc)       extern "C" type name;
2549 #define DECLARE_EXPERIMENTAL_FLAG(type, name, value, doc) extern "C" type name;
2550 #define DECLARE_MANAGEABLE_FLAG(type, name, value, doc)   extern "C" type name;
2551 #define DECLARE_PRODUCT_RW_FLAG(type, name, value, doc)   extern "C" type name;
2552 #ifdef PRODUCT
2553 #define DECLARE_DEVELOPER_FLAG(type, name, value, doc)    const type name = value;
2554 #define DECLARE_PD_DEVELOPER_FLAG(type, name, doc)        const type name = pd_##name;
2555 #define DECLARE_NOTPRODUCT_FLAG(type, name, value, doc)   const type name = value;
2556 #else
2557 #define DECLARE_DEVELOPER_FLAG(type, name, value, doc)    extern "C" type name;
2558 #define DECLARE_PD_DEVELOPER_FLAG(type, name, doc)        extern "C" type name;
2559 #define DECLARE_NOTPRODUCT_FLAG(type, name, value, doc)   extern "C" type name;
2560 #endif // PRODUCT
2561 // Special LP64 flags, product only needed for now.
2562 #ifdef _LP64
2563 #define DECLARE_LP64_PRODUCT_FLAG(type, name, value, doc) extern "C" type name;
2564 #else
2565 #define DECLARE_LP64_PRODUCT_FLAG(type, name, value, doc) const type name = value;
2566 #endif // _LP64
2567 
2568 ALL_FLAGS(DECLARE_DEVELOPER_FLAG,     \
2569           DECLARE_PD_DEVELOPER_FLAG,  \
2570           DECLARE_PRODUCT_FLAG,       \
2571           DECLARE_PD_PRODUCT_FLAG,    \
2572           DECLARE_DIAGNOSTIC_FLAG,    \
2573           DECLARE_PD_DIAGNOSTIC_FLAG, \
2574           DECLARE_EXPERIMENTAL_FLAG,  \
2575           DECLARE_NOTPRODUCT_FLAG,    \
2576           DECLARE_MANAGEABLE_FLAG,    \
2577           DECLARE_PRODUCT_RW_FLAG,    \
2578           DECLARE_LP64_PRODUCT_FLAG,  \
2579           IGNORE_RANGE,               \
2580           IGNORE_CONSTRAINT)
2581 
2582 #endif // SHARE_RUNTIME_GLOBALS_HPP