1 /*
2 * Copyright (c) 1997, 2023, 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_pd.hpp"
29 #include "runtime/globals_shared.hpp"
30 #include "utilities/align.hpp"
31 #include "utilities/globalDefinitions.hpp"
32 #include "utilities/macros.hpp"
33 #include CPU_HEADER(globals)
34 #include OS_HEADER(globals)
35 #include OS_CPU_HEADER(globals)
36
37 // develop flags are settable / visible only during development and are constant in the PRODUCT version
38 // product flags are always settable / visible
39 // notproduct flags are settable / visible only during development and are not declared in the PRODUCT version
40 // develop_pd/product_pd flags are the same as develop/product, except that their default values
41 // are specified in platform-dependent header files.
42
43 // Flags must be declared with the following number of parameters:
44 // non-pd flags:
45 // (type, name, default_value, doc), or
46 // (type, name, default_value, extra_attrs, doc)
47 // pd flags:
48 // (type, name, doc), or
49 // (type, name, extra_attrs, doc)
50
51 // A flag must be declared with one of the following types:
52 // bool, int, uint, intx, uintx, size_t, ccstr, ccstrlist, double, or uint64_t.
53 // The type "ccstr" and "ccstrlist" are an alias for "const char*" and is used
54 // only in this file, because the macrology requires single-token type names.
55
56 // The optional extra_attrs parameter may have one of the following values:
57 // DIAGNOSTIC, EXPERIMENTAL, or MANAGEABLE. Currently extra_attrs can be used
58 // only with product/product_pd flags.
59 //
60 // DIAGNOSTIC options are not meant for VM tuning or for product modes.
61 // They are to be used for VM quality assurance or field diagnosis
62 // of VM bugs. They are hidden so that users will not be encouraged to
63 // try them as if they were VM ordinary execution options. However, they
64 // are available in the product version of the VM. Under instruction
65 // from support engineers, VM customers can turn them on to collect
66 // diagnostic information about VM problems. To use a VM diagnostic
67 // option, you must first specify +UnlockDiagnosticVMOptions.
68 // (This master switch also affects the behavior of -Xprintflags.)
69 //
70 // EXPERIMENTAL flags are in support of features that may not be
71 // an officially supported part of a product, but may be available
72 // for experimenting with. They could, for example, be performance
73 // features that may not have undergone full or rigorous QA, but which may
74 // help performance in some cases and released for experimentation
75 // by the community of users and developers. This flag also allows one to
76 // be able to build a fully supported product that nonetheless also
77 // ships with some unsupported, lightly tested, experimental features.
78 // Refer to the documentation of any products using this code for details
79 // on support and fitness for production.
80 // Like the UnlockDiagnosticVMOptions flag above, there is a corresponding
81 // UnlockExperimentalVMOptions flag, which allows the control and
82 // modification of the experimental flags.
83 //
84 // Nota bene: neither diagnostic nor experimental options should be used casually,
85 // Refer to the documentation of any products using this code for details.
86 //
87 // MANAGEABLE flags are writeable external product flags.
88 // They are dynamically writeable through the JDK management interface
89 // (com.sun.management.HotSpotDiagnosticMXBean API) and also through JConsole.
90 // These flags are external exported interface (see CCC). The list of
91 // manageable flags can be queried programmatically through the management
92 // interface.
93 //
94 // A flag can be made as "manageable" only if
95 // - the flag is defined in a CCC as an external exported interface.
96 // - the VM implementation supports dynamic setting of the flag.
97 // This implies that the VM must *always* query the flag variable
98 // and not reuse state related to the flag state at any given time.
99 // - you want the flag to be queried programmatically by the customers.
100 //
101
102 //
103 // range is a macro that will expand to min and max arguments for range
104 // checking code if provided - see jvmFlagLimit.hpp
105 //
106 // constraint is a macro that will expand to custom function call
107 // for constraint checking if provided - see jvmFlagLimit.hpp
108
109 // Default and minimum StringTable and SymbolTable size values
110 // Must be powers of 2
111 const size_t defaultStringTableSize = NOT_LP64(1024) LP64_ONLY(65536);
112 const size_t minimumStringTableSize = 128;
113 const size_t defaultSymbolTableSize = 32768; // 2^15
114 const size_t minimumSymbolTableSize = 1024;
115
116 #ifdef _LP64
117 #define LP64_RUNTIME_FLAGS(develop, \
118 develop_pd, \
119 product, \
120 product_pd, \
121 notproduct, \
122 range, \
123 constraint) \
124 \
125 product(bool, UseCompressedOops, false, \
126 "Use 32-bit object references in 64-bit VM. " \
127 "lp64_product means flag is always constant in 32 bit VM") \
128 \
129 product(bool, UseCompressedClassPointers, false, \
130 "Use 32-bit class pointers in 64-bit VM. " \
131 "lp64_product means flag is always constant in 32 bit VM") \
132 \
133 product(bool, UseCompactObjectHeaders, false, EXPERIMENTAL, \
134 "Use 64-bit object headers instead of 96-bit headers") \
135 \
136 product(intx, ObjectAlignmentInBytes, 8, \
137 "Default object alignment in bytes, 8 is minimum") \
138 range(8, 256) \
139 constraint(ObjectAlignmentInBytesConstraintFunc, AtParse)
140
141 #else
142 // !_LP64
143
144 #define LP64_RUNTIME_FLAGS(develop, \
145 develop_pd, \
146 product, \
147 product_pd, \
148 notproduct, \
149 range, \
150 constraint)
151 const bool UseCompressedOops = false;
152 const bool UseCompressedClassPointers = false;
153 const bool UseCompactObjectHeaders = false;
154 const intx ObjectAlignmentInBytes = 8;
155
156 #endif // _LP64
157
158 #define RUNTIME_FLAGS(develop, \
159 develop_pd, \
160 product, \
161 product_pd, \
162 notproduct, \
163 range, \
164 constraint) \
165 \
166 notproduct(bool, CheckCompressedOops, true, \
167 "Generate checks in encoding/decoding code in debug VM") \
168 \
169 product(uintx, HeapSearchSteps, 3 PPC64_ONLY(+17), \
170 "Heap allocation steps through preferred address regions to find" \
171 " where it can allocate the heap. Number of steps to take per " \
172 "region.") \
173 range(1, max_uintx) \
174 \
175 product(uint, HandshakeTimeout, 0, DIAGNOSTIC, \
176 "If nonzero set a timeout in milliseconds for handshakes") \
177 \
178 product(bool, AlwaysSafeConstructors, false, EXPERIMENTAL, \
179 "Force safe construction, as if all fields are final.") \
180 \
181 product(bool, UnlockDiagnosticVMOptions, trueInDebug, DIAGNOSTIC, \
182 "Enable normal processing of flags relating to field diagnostics")\
183 \
184 product(bool, UnlockExperimentalVMOptions, false, EXPERIMENTAL, \
185 "Enable normal processing of flags relating to experimental " \
186 "features") \
187 \
188 product(bool, JavaMonitorsInStackTrace, true, \
189 "Print information about Java monitor locks when the stacks are " \
190 "dumped") \
191 \
192 product_pd(bool, UseLargePages, \
193 "Use large page memory") \
194 \
195 product_pd(bool, UseLargePagesIndividualAllocation, \
196 "Allocate large pages individually for better affinity") \
197 \
198 develop(bool, LargePagesIndividualAllocationInjectError, false, \
199 "Fail large pages individual allocation") \
200 \
201 product(bool, UseNUMA, false, \
202 "Use NUMA if available") \
203 \
204 product(bool, UseNUMAInterleaving, false, \
205 "Interleave memory across NUMA nodes if available") \
206 \
207 product(size_t, NUMAInterleaveGranularity, 2*M, \
208 "Granularity to use for NUMA interleaving on Windows OS") \
209 constraint(NUMAInterleaveGranularityConstraintFunc, AtParse) \
210 \
211 product(uintx, NUMAChunkResizeWeight, 20, \
212 "Percentage (0-100) used to weight the current sample when " \
213 "computing exponentially decaying average for " \
214 "AdaptiveNUMAChunkSizing") \
215 range(0, 100) \
216 \
217 product(size_t, NUMASpaceResizeRate, 1*G, \
218 "Do not reallocate more than this amount per collection") \
219 range(0, max_uintx) \
220 \
221 product(bool, UseAdaptiveNUMAChunkSizing, true, \
222 "Enable adaptive chunk sizing for NUMA") \
223 \
224 product(bool, NUMAStats, false, \
225 "Print NUMA stats in detailed heap information") \
226 \
227 product(uintx, NUMAPageScanRate, 256, \
228 "Maximum number of pages to include in the page scan procedure") \
229 range(0, max_uintx) \
230 \
231 product(bool, UseAES, false, \
232 "Control whether AES instructions are used when available") \
233 \
234 product(bool, UseFMA, false, \
235 "Control whether FMA instructions are used when available") \
236 \
237 product(bool, UseSHA, false, \
238 "Control whether SHA instructions are used when available") \
239 \
240 product(bool, UseGHASHIntrinsics, false, DIAGNOSTIC, \
241 "Use intrinsics for GHASH versions of crypto") \
242 \
243 product(bool, UseBASE64Intrinsics, false, \
244 "Use intrinsics for java.util.Base64") \
245 \
246 product(size_t, LargePageSizeInBytes, 0, \
247 "Maximum large page size used (0 will use the default large " \
248 "page size for the environment as the maximum)") \
249 range(0, max_uintx) \
250 \
251 product(size_t, LargePageHeapSizeThreshold, 128*M, \
252 "Use large pages if maximum heap is at least this big") \
253 range(0, max_uintx) \
254 \
255 product(bool, ForceTimeHighResolution, false, \
256 "Using high time resolution (for Win32 only)") \
257 \
258 develop(bool, TracePcPatching, false, \
259 "Trace usage of frame::patch_pc") \
260 \
261 develop(bool, TraceRelocator, false, \
262 "Trace the bytecode relocator") \
263 \
264 \
265 product(bool, SafepointALot, false, DIAGNOSTIC, \
266 "Generate a lot of safepoints. This works with " \
267 "GuaranteedSafepointInterval") \
268 \
269 product(bool, HandshakeALot, false, DIAGNOSTIC, \
270 "Generate a lot of handshakes. This works with " \
271 "GuaranteedSafepointInterval") \
272 \
273 product_pd(bool, BackgroundCompilation, \
274 "A thread requesting compilation is not blocked during " \
275 "compilation") \
276 \
277 product(bool, MethodFlushing, true, \
278 "Reclamation of zombie and not-entrant methods") \
279 \
280 develop(bool, VerifyStack, false, \
281 "Verify stack of each thread when it is entering a runtime call") \
282 \
283 product(bool, ForceUnreachable, false, DIAGNOSTIC, \
284 "Make all non code cache addresses to be unreachable by " \
285 "forcing use of 64bit literal fixups") \
286 \
287 develop(bool, TraceDerivedPointers, false, \
288 "Trace traversal of derived pointers on stack") \
289 \
290 notproduct(bool, TraceCodeBlobStacks, false, \
291 "Trace stack-walk of codeblobs") \
292 \
293 notproduct(bool, PrintRewrites, false, \
294 "Print methods that are being rewritten") \
295 \
296 product(bool, UseInlineCaches, true, \
297 "Use Inline Caches for virtual calls ") \
298 \
299 product(size_t, InlineCacheBufferSize, 10*K, EXPERIMENTAL, \
300 "InlineCacheBuffer size") \
301 \
302 product(bool, InlineArrayCopy, true, DIAGNOSTIC, \
303 "Inline arraycopy native that is known to be part of " \
304 "base library DLL") \
305 \
306 product(bool, InlineObjectHash, true, DIAGNOSTIC, \
307 "Inline Object::hashCode() native that is known to be part " \
308 "of base library DLL") \
309 \
310 product(bool, InlineNatives, true, DIAGNOSTIC, \
311 "Inline natives that are known to be part of base library DLL") \
312 \
313 product(bool, InlineMathNatives, true, DIAGNOSTIC, \
314 "Inline SinD, CosD, etc.") \
315 \
316 product(bool, InlineClassNatives, true, DIAGNOSTIC, \
317 "Inline Class.isInstance, etc") \
318 \
319 product(bool, InlineThreadNatives, true, DIAGNOSTIC, \
320 "Inline Thread.currentThread, etc") \
321 \
322 product(bool, InlineUnsafeOps, true, DIAGNOSTIC, \
323 "Inline memory ops (native methods) from Unsafe") \
324 \
325 product(bool, CriticalJNINatives, false, \
326 "(Deprecated) Check for critical JNI entry points") \
327 \
328 product(bool, UseAESIntrinsics, false, DIAGNOSTIC, \
329 "Use intrinsics for AES versions of crypto") \
330 \
331 product(bool, UseAESCTRIntrinsics, false, DIAGNOSTIC, \
332 "Use intrinsics for the paralleled version of AES/CTR crypto") \
333 \
334 product(bool, UseMD5Intrinsics, false, DIAGNOSTIC, \
335 "Use intrinsics for MD5 crypto hash function") \
336 \
337 product(bool, UseSHA1Intrinsics, false, DIAGNOSTIC, \
338 "Use intrinsics for SHA-1 crypto hash function. " \
339 "Requires that UseSHA is enabled.") \
340 \
341 product(bool, UseSHA256Intrinsics, false, DIAGNOSTIC, \
342 "Use intrinsics for SHA-224 and SHA-256 crypto hash functions. " \
343 "Requires that UseSHA is enabled.") \
344 \
345 product(bool, UseSHA512Intrinsics, false, DIAGNOSTIC, \
346 "Use intrinsics for SHA-384 and SHA-512 crypto hash functions. " \
347 "Requires that UseSHA is enabled.") \
348 \
349 product(bool, UseSHA3Intrinsics, false, DIAGNOSTIC, \
350 "Use intrinsics for SHA3 crypto hash function. " \
351 "Requires that UseSHA is enabled.") \
352 \
353 product(bool, UseCRC32Intrinsics, false, DIAGNOSTIC, \
354 "use intrinsics for java.util.zip.CRC32") \
355 \
356 product(bool, UseCRC32CIntrinsics, false, DIAGNOSTIC, \
357 "use intrinsics for java.util.zip.CRC32C") \
358 \
359 product(bool, UseAdler32Intrinsics, false, DIAGNOSTIC, \
360 "use intrinsics for java.util.zip.Adler32") \
361 \
362 product(bool, UseVectorizedMismatchIntrinsic, false, DIAGNOSTIC, \
363 "Enables intrinsification of ArraysSupport.vectorizedMismatch()") \
364 \
365 product(bool, UseCopySignIntrinsic, false, DIAGNOSTIC, \
366 "Enables intrinsification of Math.copySign") \
367 \
368 product(bool, UseSignumIntrinsic, false, DIAGNOSTIC, \
369 "Enables intrinsification of Math.signum") \
370 \
371 product(ccstrlist, DisableIntrinsic, "", DIAGNOSTIC, \
372 "do not expand intrinsics whose (internal) names appear here") \
373 constraint(DisableIntrinsicConstraintFunc,AfterErgo) \
374 \
375 product(ccstrlist, ControlIntrinsic, "", DIAGNOSTIC, \
376 "Control intrinsics using a list of +/- (internal) names, " \
377 "separated by commas") \
378 constraint(ControlIntrinsicConstraintFunc,AfterErgo) \
379 \
380 develop(bool, TraceCallFixup, false, \
381 "Trace all call fixups") \
382 \
383 develop(bool, DeoptimizeALot, false, \
384 "Deoptimize at every exit from the runtime system") \
385 \
386 notproduct(ccstrlist, DeoptimizeOnlyAt, "", \
387 "A comma separated list of bcis to deoptimize at") \
388 \
389 develop(bool, DeoptimizeRandom, false, \
390 "Deoptimize random frames on random exit from the runtime system")\
391 \
392 notproduct(bool, ZombieALot, false, \
393 "Create zombies (non-entrant) at exit from the runtime system") \
394 \
395 notproduct(bool, WalkStackALot, false, \
396 "Trace stack (no print) at every exit from the runtime system") \
397 \
398 develop(bool, DeoptimizeObjectsALot, false, \
399 "For testing purposes concurrent threads revert optimizations " \
400 "based on escape analysis at intervals given with " \
401 "DeoptimizeObjectsALotInterval=n. The thread count is given " \
402 "with DeoptimizeObjectsALotThreadCountSingle and " \
403 "DeoptimizeObjectsALotThreadCountAll.") \
404 \
405 develop(uint64_t, DeoptimizeObjectsALotInterval, 5, \
406 "Interval for DeoptimizeObjectsALot.") \
407 range(0, max_jlong) \
408 \
409 develop(int, DeoptimizeObjectsALotThreadCountSingle, 1, \
410 "The number of threads that revert optimizations based on " \
411 "escape analysis for a single thread if DeoptimizeObjectsALot " \
412 "is enabled. The target thread is selected round robin." ) \
413 range(0, max_jint) \
414 \
415 develop(int, DeoptimizeObjectsALotThreadCountAll, 1, \
416 "The number of threads that revert optimizations based on " \
417 "escape analysis for all threads if DeoptimizeObjectsALot " \
418 "is enabled." ) \
419 range(0, max_jint) \
420 \
421 notproduct(bool, VerifyLastFrame, false, \
422 "Verify oops on last frame on entry to VM") \
423 \
424 product(bool, SafepointTimeout, false, \
425 "Time out and warn or fail after SafepointTimeoutDelay " \
426 "milliseconds if failed to reach safepoint") \
427 \
428 product(bool, AbortVMOnSafepointTimeout, false, DIAGNOSTIC, \
429 "Abort upon failure to reach safepoint (see SafepointTimeout)") \
430 \
431 product(bool, AbortVMOnVMOperationTimeout, false, DIAGNOSTIC, \
432 "Abort upon failure to complete VM operation promptly") \
433 \
434 product(intx, AbortVMOnVMOperationTimeoutDelay, 1000, DIAGNOSTIC, \
435 "Delay in milliseconds for option AbortVMOnVMOperationTimeout") \
436 range(0, max_intx) \
437 \
438 product(bool, MaxFDLimit, true, \
439 "Bump the number of file descriptors to maximum (Unix only)") \
440 \
441 product(bool, LogEvents, true, DIAGNOSTIC, \
442 "Enable the various ring buffer event logs") \
443 \
444 product(uintx, LogEventsBufferEntries, 20, DIAGNOSTIC, \
445 "Number of ring buffer event logs") \
446 range(1, NOT_LP64(1*K) LP64_ONLY(1*M)) \
447 \
448 product(bool, BytecodeVerificationRemote, true, DIAGNOSTIC, \
449 "Enable the Java bytecode verifier for remote classes") \
450 \
451 product(bool, BytecodeVerificationLocal, false, DIAGNOSTIC, \
452 "Enable the Java bytecode verifier for local classes") \
453 \
454 develop(bool, VerifyStackAtCalls, false, \
455 "Verify that the stack pointer is unchanged after calls") \
456 \
457 develop(bool, TraceJavaAssertions, false, \
458 "Trace java language assertions") \
459 \
460 notproduct(bool, VerifyCodeCache, false, \
461 "Verify code cache on memory allocation/deallocation") \
462 \
463 develop(bool, UseMallocOnly, false, \
464 "Use only malloc/free for allocation (no resource area/arena)") \
465 \
466 develop(bool, ZapResourceArea, trueInDebug, \
467 "Zap freed resource/arena space") \
468 \
469 notproduct(bool, ZapVMHandleArea, trueInDebug, \
470 "Zap freed VM handle space") \
471 \
472 notproduct(bool, ZapStackSegments, trueInDebug, \
473 "Zap allocated/freed stack segments") \
474 \
475 develop(bool, ZapUnusedHeapArea, trueInDebug, \
476 "Zap unused heap space") \
477 \
478 develop(bool, CheckZapUnusedHeapArea, false, \
479 "Check zapping of unused heap space") \
480 \
481 develop(bool, ZapFillerObjects, trueInDebug, \
482 "Zap filler objects") \
483 \
484 product(bool, ExecutingUnitTests, false, \
485 "Whether the JVM is running unit tests or not") \
486 \
487 develop(uintx, ErrorHandlerTest, 0, \
488 "If > 0, provokes an error after VM initialization; the value " \
489 "determines which error to provoke. See controlled_crash() " \
490 "in vmError.cpp.") \
491 range(0, 17) \
492 \
493 develop(uintx, TestCrashInErrorHandler, 0, \
494 "If > 0, provokes an error inside VM error handler (a secondary " \
495 "crash). see controlled_crash() in vmError.cpp") \
496 range(0, 17) \
497 \
498 develop(bool, TestSafeFetchInErrorHandler, false , \
499 "If true, tests SafeFetch inside error handler.") \
500 \
501 develop(bool, TestUnresponsiveErrorHandler, false, \
502 "If true, simulates an unresponsive error handler.") \
503 \
504 develop(bool, Verbose, false, \
505 "Print additional debugging information from other modes") \
506 \
507 develop(bool, PrintMiscellaneous, false, \
508 "Print uncategorized debugging information (requires +Verbose)") \
509 \
510 develop(bool, WizardMode, false, \
511 "Print much more debugging information") \
512 \
513 product(bool, ShowMessageBoxOnError, false, \
514 "Keep process alive on VM fatal error") \
515 \
516 product(bool, CreateCoredumpOnCrash, true, \
517 "Create core/mini dump on VM fatal error") \
518 \
519 product(uint64_t, ErrorLogTimeout, 2 * 60, \
520 "Timeout, in seconds, to limit the time spent on writing an " \
521 "error log in case of a crash.") \
522 range(0, (uint64_t)max_jlong/1000) \
523 \
524 product(bool, SuppressFatalErrorMessage, false, \
525 "Report NO fatal error message (avoid deadlock)") \
526 \
527 product(ccstrlist, OnError, "", \
528 "Run user-defined commands on fatal error; see VMError.cpp " \
529 "for examples") \
530 \
531 product(ccstrlist, OnOutOfMemoryError, "", \
532 "Run user-defined commands on first java.lang.OutOfMemoryError " \
533 "thrown from JVM") \
534 \
535 product(bool, HeapDumpBeforeFullGC, false, MANAGEABLE, \
536 "Dump heap to file before any major stop-the-world GC") \
537 \
538 product(bool, HeapDumpAfterFullGC, false, MANAGEABLE, \
539 "Dump heap to file after any major stop-the-world GC") \
540 \
541 product(bool, HeapDumpOnOutOfMemoryError, false, MANAGEABLE, \
542 "Dump heap to file when java.lang.OutOfMemoryError is thrown " \
543 "from JVM") \
544 \
545 product(ccstr, HeapDumpPath, NULL, MANAGEABLE, \
546 "When HeapDumpOnOutOfMemoryError is on, the path (filename or " \
547 "directory) of the dump file (defaults to java_pid<pid>.hprof " \
548 "in the working directory)") \
549 \
550 product(intx, HeapDumpGzipLevel, 0, MANAGEABLE, \
551 "When HeapDumpOnOutOfMemoryError is on, the gzip compression " \
552 "level of the dump file. 0 (the default) disables gzip " \
553 "compression. Otherwise the level must be between 1 and 9.") \
554 range(0, 9) \
555 \
556 product(ccstr, NativeMemoryTracking, DEBUG_ONLY("summary") NOT_DEBUG("off"), \
557 "Native memory tracking options") \
558 \
559 product(bool, PrintNMTStatistics, false, DIAGNOSTIC, \
560 "Print native memory tracking summary data if it is on") \
561 \
562 product(bool, LogCompilation, false, DIAGNOSTIC, \
563 "Log compilation activity in detail to LogFile") \
564 \
565 product(bool, PrintCompilation, false, \
566 "Print compilations") \
567 \
568 product(intx, RepeatCompilation, 0, DIAGNOSTIC, \
569 "Repeat compilation without installing code (number of times)") \
570 range(0, max_jint) \
571 \
572 product(bool, PrintExtendedThreadInfo, false, \
573 "Print more information in thread dump") \
574 \
575 product(intx, ScavengeRootsInCode, 2, DIAGNOSTIC, \
576 "0: do not allow scavengable oops in the code cache; " \
577 "1: allow scavenging from the code cache; " \
578 "2: emit as many constants as the compiler can see") \
579 range(0, 2) \
580 \
581 product(bool, AlwaysRestoreFPU, false, \
582 "Restore the FPU control word after every JNI call (expensive)") \
583 \
584 product(bool, PrintCompilation2, false, DIAGNOSTIC, \
585 "Print additional statistics per compilation") \
586 \
587 product(bool, PrintAdapterHandlers, false, DIAGNOSTIC, \
588 "Print code generated for i2c/c2i adapters") \
589 \
590 product(bool, VerifyAdapterCalls, trueInDebug, DIAGNOSTIC, \
591 "Verify that i2c/c2i adapters are called properly") \
592 \
593 develop(bool, VerifyAdapterSharing, false, \
594 "Verify that the code for shared adapters is the equivalent") \
595 \
596 product(bool, PrintAssembly, false, DIAGNOSTIC, \
597 "Print assembly code (using external disassembler.so)") \
598 \
599 product(ccstr, PrintAssemblyOptions, NULL, DIAGNOSTIC, \
600 "Print options string passed to disassembler.so") \
601 \
602 notproduct(bool, PrintNMethodStatistics, false, \
603 "Print a summary statistic for the generated nmethods") \
604 \
605 product(bool, PrintNMethods, false, DIAGNOSTIC, \
606 "Print assembly code for nmethods when generated") \
607 \
608 product(bool, PrintNativeNMethods, false, DIAGNOSTIC, \
609 "Print assembly code for native nmethods when generated") \
610 \
611 develop(bool, PrintDebugInfo, false, \
612 "Print debug information for all nmethods when generated") \
613 \
614 develop(bool, PrintRelocations, false, \
615 "Print relocation information for all nmethods when generated") \
616 \
617 develop(bool, PrintDependencies, false, \
618 "Print dependency information for all nmethods when generated") \
619 \
620 develop(bool, PrintExceptionHandlers, false, \
621 "Print exception handler tables for all nmethods when generated") \
622 \
623 develop(bool, StressCompiledExceptionHandlers, false, \
624 "Exercise compiled exception handlers") \
625 \
626 develop(bool, InterceptOSException, false, \
627 "Start debugger when an implicit OS (e.g. NULL) " \
628 "exception happens") \
629 \
630 product(bool, PrintCodeCache, false, \
631 "Print the code cache memory usage when exiting") \
632 \
633 develop(bool, PrintCodeCache2, false, \
634 "Print detailed usage information on the code cache when exiting")\
635 \
636 product(bool, PrintCodeCacheOnCompilation, false, \
637 "Print the code cache memory usage each time a method is " \
638 "compiled") \
639 \
640 product(bool, PrintCodeHeapAnalytics, false, DIAGNOSTIC, \
641 "Print code heap usage statistics on exit and on full condition") \
642 \
643 product(bool, PrintStubCode, false, DIAGNOSTIC, \
644 "Print generated stub code") \
645 \
646 product(bool, StackTraceInThrowable, true, \
647 "Collect backtrace in throwable when exception happens") \
648 \
649 product(bool, OmitStackTraceInFastThrow, true, \
650 "Omit backtraces for some 'hot' exceptions in optimized code") \
651 \
652 product(bool, ShowCodeDetailsInExceptionMessages, true, MANAGEABLE, \
653 "Show exception messages from RuntimeExceptions that contain " \
654 "snippets of the failing code. Disable this to improve privacy.") \
655 \
656 product(bool, PrintWarnings, true, \
657 "Print JVM warnings to output stream") \
658 \
659 product(bool, RegisterFinalizersAtInit, true, \
660 "Register finalizable objects at end of Object.<init> or " \
661 "after allocation") \
662 \
663 develop(bool, RegisterReferences, true, \
664 "Tell whether the VM should register soft/weak/final/phantom " \
665 "references") \
666 \
667 develop(bool, PrintCodeCacheExtension, false, \
668 "Print extension of code cache") \
669 \
670 develop(bool, UsePrivilegedStack, true, \
671 "Enable the security JVM functions") \
672 \
673 product(bool, ClassUnloading, true, \
674 "Do unloading of classes") \
675 \
676 product(bool, ClassUnloadingWithConcurrentMark, true, \
677 "Do unloading of classes with a concurrent marking cycle") \
678 \
679 notproduct(bool, PrintSystemDictionaryAtExit, false, \
680 "Print the system dictionary at exit") \
681 \
682 notproduct(bool, PrintClassLoaderDataGraphAtExit, false, \
683 "Print the class loader data graph at exit") \
684 \
685 product(bool, DynamicallyResizeSystemDictionaries, true, DIAGNOSTIC, \
686 "Dynamically resize system dictionaries as needed") \
687 \
688 product(bool, AlwaysLockClassLoader, false, \
689 "(Deprecated) Require the VM to acquire the class loader lock " \
690 "before calling loadClass() even for class loaders registering " \
691 "as parallel capable") \
692 \
693 product(bool, AllowParallelDefineClass, false, \
694 "Allow parallel defineClass requests for class loaders " \
695 "registering as parallel capable") \
696 \
697 product_pd(bool, DontYieldALot, \
698 "Throw away obvious excess yield calls") \
699 \
700 product(bool, DisablePrimordialThreadGuardPages, false, EXPERIMENTAL, \
701 "Disable the use of stack guard pages if the JVM is loaded " \
702 "on the primordial process thread") \
703 \
704 /* notice: the max range value here is max_jint, not max_intx */ \
705 /* because of overflow issue */ \
706 product(intx, AsyncDeflationInterval, 250, DIAGNOSTIC, \
707 "Async deflate idle monitors every so many milliseconds when " \
708 "MonitorUsedDeflationThreshold is exceeded (0 is off).") \
709 range(0, max_jint) \
710 \
711 /* notice: the max range value here is max_jint, not max_intx */ \
712 /* because of overflow issue */ \
713 product(intx, GuaranteedAsyncDeflationInterval, 60000, DIAGNOSTIC, \
714 "Async deflate idle monitors every so many milliseconds even " \
715 "when MonitorUsedDeflationThreshold is NOT exceeded (0 is off).") \
716 range(0, max_jint) \
717 \
718 product(size_t, AvgMonitorsPerThreadEstimate, 1024, DIAGNOSTIC, \
719 "Used to estimate a variable ceiling based on number of threads " \
720 "for use with MonitorUsedDeflationThreshold (0 is off).") \
721 range(0, max_uintx) \
722 \
723 /* notice: the max range value here is max_jint, not max_intx */ \
724 /* because of overflow issue */ \
725 product(intx, MonitorDeflationMax, 1000000, DIAGNOSTIC, \
726 "The maximum number of monitors to deflate, unlink and delete " \
727 "at one time (minimum is 1024).") \
728 range(1024, max_jint) \
729 \
730 product(intx, MonitorUsedDeflationThreshold, 90, DIAGNOSTIC, \
731 "Percentage of used monitors before triggering deflation (0 is " \
732 "off). The check is performed on GuaranteedSafepointInterval, " \
733 "AsyncDeflationInterval or GuaranteedAsyncDeflationInterval, " \
734 "whichever is lower.") \
735 range(0, 100) \
736 \
737 product(uintx, NoAsyncDeflationProgressMax, 3, DIAGNOSTIC, \
738 "Max number of no progress async deflation attempts to tolerate " \
739 "before adjusting the in_use_list_ceiling up (0 is off).") \
740 range(0, max_uintx) \
741 \
742 product(intx, hashCode, 5, EXPERIMENTAL, \
743 "(Unstable) select hashCode generation algorithm") \
744 \
745 product(bool, FilterSpuriousWakeups, true, \
746 "When true prevents OS-level spurious, or premature, wakeups " \
747 "from Object.wait (Ignored for Windows)") \
748 \
749 product(bool, ReduceSignalUsage, false, \
750 "Reduce the use of OS signals in Java and/or the VM") \
751 \
752 develop(bool, LoadLineNumberTables, true, \
753 "Tell whether the class file parser loads line number tables") \
754 \
755 develop(bool, LoadLocalVariableTables, true, \
756 "Tell whether the class file parser loads local variable tables") \
757 \
758 develop(bool, LoadLocalVariableTypeTables, true, \
759 "Tell whether the class file parser loads local variable type" \
760 "tables") \
761 \
762 product(bool, AllowUserSignalHandlers, false, \
763 "Application will install primary signal handlers for the JVM " \
764 "(Unix only)") \
765 \
766 product(bool, UseSignalChaining, true, \
767 "Use signal-chaining to invoke signal handlers installed " \
768 "by the application (Unix only)") \
769 \
770 product(bool, RestoreMXCSROnJNICalls, false, \
771 "Restore MXCSR when returning from JNI calls") \
772 \
773 product(bool, CheckJNICalls, false, \
774 "Verify all arguments to JNI calls") \
775 \
776 product(bool, UseFastJNIAccessors, true, \
777 "Use optimized versions of Get<Primitive>Field") \
778 \
779 product(intx, MaxJNILocalCapacity, 65536, \
780 "Maximum allowable local JNI handle capacity to " \
781 "EnsureLocalCapacity() and PushLocalFrame(), " \
782 "where <= 0 is unlimited, default: 65536") \
783 range(min_intx, max_intx) \
784 \
785 product(bool, EagerXrunInit, false, \
786 "Eagerly initialize -Xrun libraries; allows startup profiling, " \
787 "but not all -Xrun libraries may support the state of the VM " \
788 "at this time") \
789 \
790 product(bool, PreserveAllAnnotations, false, \
791 "Preserve RuntimeInvisibleAnnotations as well " \
792 "as RuntimeVisibleAnnotations") \
793 \
794 develop(uintx, PreallocatedOutOfMemoryErrorCount, 4, \
795 "Number of OutOfMemoryErrors preallocated with backtrace") \
796 \
797 product(bool, UseXMMForArrayCopy, false, \
798 "Use SSE2 MOVQ instruction for Arraycopy") \
799 \
800 notproduct(bool, PrintFieldLayout, false, \
801 "Print field layout for each class") \
802 \
803 /* Need to limit the extent of the padding to reasonable size. */\
804 /* 8K is well beyond the reasonable HW cache line size, even with */\
805 /* aggressive prefetching, while still leaving the room for segregating */\
806 /* among the distinct pages. */\
807 product(intx, ContendedPaddingWidth, 128, \
808 "How many bytes to pad the fields/classes marked @Contended with")\
809 range(0, 8192) \
810 constraint(ContendedPaddingWidthConstraintFunc,AfterErgo) \
811 \
812 product(bool, EnableContended, true, \
813 "Enable @Contended annotation support") \
814 \
815 product(bool, RestrictContended, true, \
816 "Restrict @Contended to trusted classes") \
817 \
818 product(bool, UseBiasedLocking, false, \
819 "(Deprecated) Enable biased locking in JVM") \
820 \
821 product(intx, BiasedLockingStartupDelay, 0, \
822 "(Deprecated) Number of milliseconds to wait before enabling " \
823 "biased locking") \
824 range(0, (intx)(max_jint-(max_jint%PeriodicTask::interval_gran))) \
825 constraint(BiasedLockingStartupDelayFunc,AfterErgo) \
826 \
827 product(bool, PrintBiasedLockingStatistics, false, DIAGNOSTIC, \
828 "(Deprecated) Print statistics of biased locking in JVM") \
829 \
830 product(intx, BiasedLockingBulkRebiasThreshold, 20, \
831 "(Deprecated) Threshold of number of revocations per type to " \
832 "try to rebias all objects in the heap of that type") \
833 range(0, max_intx) \
834 constraint(BiasedLockingBulkRebiasThresholdFunc,AfterErgo) \
835 \
836 product(intx, BiasedLockingBulkRevokeThreshold, 40, \
837 "(Deprecated) Threshold of number of revocations per type to " \
838 "permanently revoke biases of all objects in the heap of that " \
839 "type") \
840 range(0, max_intx) \
841 constraint(BiasedLockingBulkRevokeThresholdFunc,AfterErgo) \
842 \
843 product(intx, BiasedLockingDecayTime, 25000, \
844 "(Deprecated) Decay time (in milliseconds) to re-enable bulk " \
845 "rebiasing of a type after previous bulk rebias") \
846 range(500, max_intx) \
847 constraint(BiasedLockingDecayTimeFunc,AfterErgo) \
848 \
849 product(intx, DiagnoseSyncOnValueBasedClasses, 0, DIAGNOSTIC, \
850 "Detect and take action upon identifying synchronization on " \
851 "value based classes. Modes: " \
852 "0: off; " \
853 "1: exit with fatal error; " \
854 "2: log message to stdout. Output file can be specified with " \
855 " -Xlog:valuebasedclasses. If JFR is running it will " \
856 " also generate JFR events.") \
857 range(0, 2) \
858 \
859 product(bool, ExitOnOutOfMemoryError, false, \
860 "JVM exits on the first occurrence of an out-of-memory error " \
861 "thrown from JVM") \
862 \
863 product(bool, CrashOnOutOfMemoryError, false, \
864 "JVM aborts, producing an error log and core/mini dump, on the " \
865 "first occurrence of an out-of-memory error thrown from JVM") \
866 \
867 /* tracing */ \
868 \
869 develop(bool, StressRewriter, false, \
870 "Stress linktime bytecode rewriting") \
871 \
872 product(ccstr, TraceJVMTI, NULL, \
873 "Trace flags for JVMTI functions and events") \
874 \
875 product(bool, StressLdcRewrite, false, DIAGNOSTIC, \
876 "Force ldc -> ldc_w rewrite during RedefineClasses. " \
877 "This option can change an EMCP method into an obsolete method " \
878 "and can affect tests that expect specific methods to be EMCP. " \
879 "This option should be used with caution.") \
880 \
881 product(bool, AllowRedefinitionToAddDeleteMethods, false, \
882 "(Deprecated) Allow redefinition to add and delete private " \
883 "static or final methods for compatibility with old releases") \
884 \
885 develop(bool, TraceBytecodes, false, \
886 "Trace bytecode execution") \
887 \
888 develop(bool, TraceICs, false, \
889 "Trace inline cache changes") \
890 \
891 notproduct(bool, TraceInvocationCounterOverflow, false, \
892 "Trace method invocation counter overflow") \
893 \
894 develop(bool, TraceInlineCacheClearing, false, \
895 "Trace clearing of inline caches in nmethods") \
896 \
897 develop(bool, TraceDependencies, false, \
898 "Trace dependencies") \
899 \
900 develop(bool, VerifyDependencies, trueInDebug, \
901 "Exercise and verify the compilation dependency mechanism") \
902 \
903 develop(bool, TraceNewOopMapGeneration, false, \
904 "Trace OopMapGeneration") \
905 \
906 develop(bool, TraceNewOopMapGenerationDetailed, false, \
907 "Trace OopMapGeneration: print detailed cell states") \
908 \
909 develop(bool, TimeOopMap, false, \
910 "Time calls to GenerateOopMap::compute_map() in sum") \
911 \
912 develop(bool, TimeOopMap2, false, \
913 "Time calls to GenerateOopMap::compute_map() individually") \
914 \
915 develop(bool, TraceOopMapRewrites, false, \
916 "Trace rewriting of methods during oop map generation") \
917 \
918 develop(bool, TraceICBuffer, false, \
919 "Trace usage of IC buffer") \
920 \
921 develop(bool, TraceCompiledIC, false, \
922 "Trace changes of compiled IC") \
923 \
924 develop(bool, FLSVerifyDictionary, false, \
925 "Do lots of (expensive) FLS dictionary verification") \
926 \
927 product(uintx, ProcessDistributionStride, 4, \
928 "Stride through processors when distributing processes") \
929 range(0, max_juint) \
930 \
931 develop(bool, TraceFinalizerRegistration, false, \
932 "Trace registration of final references") \
933 \
934 product(bool, IgnoreEmptyClassPaths, false, \
935 "Ignore empty path elements in -classpath") \
936 \
937 product(bool, PrintHeapAtSIGBREAK, true, \
938 "Print heap layout in response to SIGBREAK") \
939 \
940 product(bool, PrintClassHistogram, false, MANAGEABLE, \
941 "Print a histogram of class instances") \
942 \
943 product(double, ObjectCountCutOffPercent, 0.5, EXPERIMENTAL, \
944 "The percentage of the used heap that the instances of a class " \
945 "must occupy for the class to generate a trace event") \
946 range(0.0, 100.0) \
947 \
948 /* JVMTI heap profiling */ \
949 \
950 product(bool, VerifyBeforeIteration, false, DIAGNOSTIC, \
951 "Verify memory system before JVMTI iteration") \
952 \
953 /* compiler */ \
954 \
955 /* notice: the max range value here is max_jint, not max_intx */ \
956 /* because of overflow issue */ \
957 product(intx, CICompilerCount, CI_COMPILER_COUNT, \
958 "Number of compiler threads to run") \
959 range(0, max_jint) \
960 constraint(CICompilerCountConstraintFunc, AfterErgo) \
961 \
962 product(bool, UseDynamicNumberOfCompilerThreads, true, \
963 "Dynamically choose the number of parallel compiler threads") \
964 \
965 product(bool, ReduceNumberOfCompilerThreads, true, DIAGNOSTIC, \
966 "Reduce the number of parallel compiler threads when they " \
967 "are not used") \
968 \
969 product(bool, TraceCompilerThreads, false, DIAGNOSTIC, \
970 "Trace creation and removal of compiler threads") \
971 \
972 develop(bool, InjectCompilerCreationFailure, false, \
973 "Inject thread creation failures for " \
974 "UseDynamicNumberOfCompilerThreads") \
975 \
976 develop(bool, GenerateSynchronizationCode, true, \
977 "generate locking/unlocking code for synchronized methods and " \
978 "monitors") \
979 \
980 develop(bool, GenerateRangeChecks, true, \
981 "Generate range checks for array accesses") \
982 \
983 product_pd(bool, ImplicitNullChecks, DIAGNOSTIC, \
984 "Generate code for implicit null checks") \
985 \
986 product_pd(bool, TrapBasedNullChecks, \
987 "Generate code for null checks that uses a cmp and trap " \
988 "instruction raising SIGTRAP. This is only used if an access to" \
989 "null (+offset) will not raise a SIGSEGV, i.e.," \
990 "ImplicitNullChecks don't work (PPC64).") \
991 \
992 product(bool, EnableThreadSMRStatistics, trueInDebug, DIAGNOSTIC, \
993 "Enable Thread SMR Statistics") \
994 \
995 product(bool, UseNotificationThread, true, \
996 "Use Notification Thread") \
997 \
998 product(bool, Inline, true, \
999 "Enable inlining") \
1000 \
1001 product(bool, ClipInlining, true, \
1002 "Clip inlining if aggregate method exceeds DesiredMethodLimit") \
1003 \
1004 develop(bool, UseCHA, true, \
1005 "Enable CHA") \
1006 \
1007 product(bool, UseVtableBasedCHA, true, DIAGNOSTIC, \
1008 "Use vtable information during CHA") \
1009 \
1010 product(bool, UseTypeProfile, true, \
1011 "Check interpreter profile for historically monomorphic calls") \
1012 \
1013 product(bool, PrintInlining, false, DIAGNOSTIC, \
1014 "Print inlining optimizations") \
1015 \
1016 product(bool, UsePopCountInstruction, false, \
1017 "Use population count instruction") \
1018 \
1019 develop(bool, EagerInitialization, false, \
1020 "Eagerly initialize classes if possible") \
1021 \
1022 product(bool, LogTouchedMethods, false, DIAGNOSTIC, \
1023 "Log methods which have been ever touched in runtime") \
1024 \
1025 product(bool, PrintTouchedMethodsAtExit, false, DIAGNOSTIC, \
1026 "Print all methods that have been ever touched in runtime") \
1027 \
1028 develop(bool, TraceMethodReplacement, false, \
1029 "Print when methods are replaced do to recompilation") \
1030 \
1031 develop(bool, PrintMethodFlushing, false, \
1032 "Print the nmethods being flushed") \
1033 \
1034 product(bool, PrintMethodFlushingStatistics, false, DIAGNOSTIC, \
1035 "print statistics about method flushing") \
1036 \
1037 product(intx, HotMethodDetectionLimit, 100000, DIAGNOSTIC, \
1038 "Number of compiled code invocations after which " \
1039 "the method is considered as hot by the flusher") \
1040 range(1, max_jint) \
1041 \
1042 product(intx, MinPassesBeforeFlush, 10, DIAGNOSTIC, \
1043 "Minimum number of sweeper passes before an nmethod " \
1044 "can be flushed") \
1045 range(0, max_intx) \
1046 \
1047 product(bool, UseCodeAging, true, \
1048 "Insert counter to detect warm methods") \
1049 \
1050 product(bool, StressCodeAging, false, DIAGNOSTIC, \
1051 "Start with counters compiled in") \
1052 \
1053 develop(bool, StressCodeBuffers, false, \
1054 "Exercise code buffer expansion and other rare state changes") \
1055 \
1056 product(bool, DebugNonSafepoints, trueInDebug, DIAGNOSTIC, \
1057 "Generate extra debugging information for non-safepoints in " \
1058 "nmethods") \
1059 \
1060 product(bool, PrintVMOptions, false, \
1061 "Print flags that appeared on the command line") \
1062 \
1063 product(bool, IgnoreUnrecognizedVMOptions, false, \
1064 "Ignore unrecognized VM options") \
1065 \
1066 product(bool, PrintCommandLineFlags, false, \
1067 "Print flags specified on command line or set by ergonomics") \
1068 \
1069 product(bool, PrintFlagsInitial, false, \
1070 "Print all VM flags before argument processing and exit VM") \
1071 \
1072 product(bool, PrintFlagsFinal, false, \
1073 "Print all VM flags after argument and ergonomic processing") \
1074 \
1075 notproduct(bool, PrintFlagsWithComments, false, \
1076 "Print all VM flags with default values and descriptions and " \
1077 "exit") \
1078 \
1079 product(bool, PrintFlagsRanges, false, \
1080 "Print VM flags and their ranges") \
1081 \
1082 product(bool, SerializeVMOutput, true, DIAGNOSTIC, \
1083 "Use a mutex to serialize output to tty and LogFile") \
1084 \
1085 product(bool, DisplayVMOutput, true, DIAGNOSTIC, \
1086 "Display all VM output on the tty, independently of LogVMOutput") \
1087 \
1088 product(bool, LogVMOutput, false, DIAGNOSTIC, \
1089 "Save VM output to LogFile") \
1090 \
1091 product(ccstr, LogFile, NULL, DIAGNOSTIC, \
1092 "If LogVMOutput or LogCompilation is on, save VM output to " \
1093 "this file [default: ./hotspot_pid%p.log] (%p replaced with pid)")\
1094 \
1095 product(ccstr, ErrorFile, NULL, \
1096 "If an error occurs, save the error data to this file " \
1097 "[default: ./hs_err_pid%p.log] (%p replaced with pid)") \
1098 \
1099 product(bool, ExtensiveErrorReports, \
1100 PRODUCT_ONLY(false) NOT_PRODUCT(true), \
1101 "Error reports are more extensive.") \
1102 \
1103 product(bool, DisplayVMOutputToStderr, false, \
1104 "If DisplayVMOutput is true, display all VM output to stderr") \
1105 \
1106 product(bool, DisplayVMOutputToStdout, false, \
1107 "If DisplayVMOutput is true, display all VM output to stdout") \
1108 \
1109 product(bool, ErrorFileToStderr, false, \
1110 "If true, error data is printed to stderr instead of a file") \
1111 \
1112 product(bool, ErrorFileToStdout, false, \
1113 "If true, error data is printed to stdout instead of a file") \
1114 \
1115 product(bool, UseHeavyMonitors, false, \
1116 "use heavyweight instead of lightweight Java monitors") \
1117 \
1118 product(bool, PrintStringTableStatistics, false, \
1119 "print statistics about the StringTable and SymbolTable") \
1120 \
1121 product(bool, VerifyStringTableAtExit, false, DIAGNOSTIC, \
1122 "verify StringTable contents at exit") \
1123 \
1124 notproduct(bool, PrintSymbolTableSizeHistogram, false, \
1125 "print histogram of the symbol table") \
1126 \
1127 product(ccstr, AbortVMOnException, NULL, DIAGNOSTIC, \
1128 "Call fatal if this exception is thrown. Example: " \
1129 "java -XX:AbortVMOnException=java.lang.NullPointerException Foo") \
1130 \
1131 product(ccstr, AbortVMOnExceptionMessage, NULL, DIAGNOSTIC, \
1132 "Call fatal if the exception pointed by AbortVMOnException " \
1133 "has this message") \
1134 \
1135 develop(bool, DebugVtables, false, \
1136 "add debugging code to vtable dispatch") \
1137 \
1138 notproduct(bool, PrintVtableStats, false, \
1139 "print vtables stats at end of run") \
1140 \
1141 develop(bool, TraceCreateZombies, false, \
1142 "trace creation of zombie nmethods") \
1143 \
1144 product(bool, RangeCheckElimination, true, \
1145 "Eliminate range checks") \
1146 \
1147 develop_pd(bool, UncommonNullCast, \
1148 "track occurrences of null in casts; adjust compiler tactics") \
1149 \
1150 develop(bool, TypeProfileCasts, true, \
1151 "treat casts like calls for purposes of type profiling") \
1152 \
1153 develop(bool, TraceLivenessGen, false, \
1154 "Trace the generation of liveness analysis information") \
1155 \
1156 notproduct(bool, TraceLivenessQuery, false, \
1157 "Trace queries of liveness analysis information") \
1158 \
1159 notproduct(bool, CollectIndexSetStatistics, false, \
1160 "Collect information about IndexSets") \
1161 \
1162 develop(intx, FastAllocateSizeLimit, 128*K, \
1163 /* Note: This value is zero mod 1<<13 for a cheap sparc set. */ \
1164 "Inline allocations larger than this in doublewords must go slow")\
1165 \
1166 product_pd(bool, CompactStrings, \
1167 "Enable Strings to use single byte chars in backing store") \
1168 \
1169 product_pd(uintx, TypeProfileLevel, \
1170 "=XYZ, with Z: Type profiling of arguments at call; " \
1171 "Y: Type profiling of return value at call; " \
1172 "X: Type profiling of parameters to methods; " \
1173 "X, Y and Z in 0=off ; 1=jsr292 only; 2=all methods") \
1174 constraint(TypeProfileLevelConstraintFunc, AfterErgo) \
1175 \
1176 product(intx, TypeProfileArgsLimit, 2, \
1177 "max number of call arguments to consider for type profiling") \
1178 range(0, 16) \
1179 \
1180 product(intx, TypeProfileParmsLimit, 2, \
1181 "max number of incoming parameters to consider for type profiling"\
1182 ", -1 for all") \
1183 range(-1, 64) \
1184 \
1185 /* statistics */ \
1186 develop(bool, CountCompiledCalls, false, \
1187 "Count method invocations") \
1188 \
1189 notproduct(bool, ICMissHistogram, false, \
1190 "Produce histogram of IC misses") \
1191 \
1192 /* interpreter */ \
1193 product_pd(bool, RewriteBytecodes, \
1194 "Allow rewriting of bytecodes (bytecodes are not immutable)") \
1195 \
1196 product_pd(bool, RewriteFrequentPairs, \
1197 "Rewrite frequently used bytecode pairs into a single bytecode") \
1198 \
1199 product(bool, PrintInterpreter, false, DIAGNOSTIC, \
1200 "Print the generated interpreter code") \
1201 \
1202 product(bool, UseInterpreter, true, \
1203 "Use interpreter for non-compiled methods") \
1204 \
1205 develop(bool, UseFastSignatureHandlers, true, \
1206 "Use fast signature handlers for native calls") \
1207 \
1208 product(bool, UseLoopCounter, true, \
1209 "Increment invocation counter on backward branch") \
1210 \
1211 product_pd(bool, UseOnStackReplacement, \
1212 "Use on stack replacement, calls runtime if invoc. counter " \
1213 "overflows in loop") \
1214 \
1215 notproduct(bool, TraceOnStackReplacement, false, \
1216 "Trace on stack replacement") \
1217 \
1218 product_pd(bool, PreferInterpreterNativeStubs, \
1219 "Use always interpreter stubs for native methods invoked via " \
1220 "interpreter") \
1221 \
1222 develop(bool, CountBytecodes, false, \
1223 "Count number of bytecodes executed") \
1224 \
1225 develop(bool, PrintBytecodeHistogram, false, \
1226 "Print histogram of the executed bytecodes") \
1227 \
1228 develop(bool, PrintBytecodePairHistogram, false, \
1229 "Print histogram of the executed bytecode pairs") \
1230 \
1231 product(bool, PrintSignatureHandlers, false, DIAGNOSTIC, \
1232 "Print code generated for native method signature handlers") \
1233 \
1234 develop(bool, VerifyOops, false, \
1235 "Do plausibility checks for oops") \
1236 \
1237 develop(bool, CheckUnhandledOops, false, \
1238 "Check for unhandled oops in VM code") \
1239 \
1240 develop(bool, VerifyJNIFields, trueInDebug, \
1241 "Verify jfieldIDs for instance fields") \
1242 \
1243 notproduct(bool, VerifyJNIEnvThread, false, \
1244 "Verify JNIEnv.thread == Thread::current() when entering VM " \
1245 "from JNI") \
1246 \
1247 develop(bool, VerifyFPU, false, \
1248 "Verify FPU state (check for NaN's, etc.)") \
1249 \
1250 develop(bool, VerifyThread, false, \
1251 "Watch the thread register for corruption (SPARC only)") \
1252 \
1253 develop(bool, VerifyActivationFrameSize, false, \
1254 "Verify that activation frame didn't become smaller than its " \
1255 "minimal size") \
1256 \
1257 develop(bool, TraceFrequencyInlining, false, \
1258 "Trace frequency based inlining") \
1259 \
1260 develop_pd(bool, InlineIntrinsics, \
1261 "Inline intrinsics that can be statically resolved") \
1262 \
1263 product_pd(bool, ProfileInterpreter, \
1264 "Profile at the bytecode level during interpretation") \
1265 \
1266 develop_pd(bool, ProfileTraps, \
1267 "Profile deoptimization traps at the bytecode level") \
1268 \
1269 product(intx, ProfileMaturityPercentage, 20, \
1270 "number of method invocations/branches (expressed as % of " \
1271 "CompileThreshold) before using the method's profile") \
1272 range(0, 100) \
1273 \
1274 product(bool, PrintMethodData, false, DIAGNOSTIC, \
1275 "Print the results of +ProfileInterpreter at end of run") \
1276 \
1277 develop(bool, VerifyDataPointer, trueInDebug, \
1278 "Verify the method data pointer during interpreter profiling") \
1279 \
1280 notproduct(bool, CrashGCForDumpingJavaThread, false, \
1281 "Manually make GC thread crash then dump java stack trace; " \
1282 "Test only") \
1283 \
1284 /* compilation */ \
1285 product(bool, UseCompiler, true, \
1286 "Use Just-In-Time compilation") \
1287 \
1288 product(bool, UseCounterDecay, true, \
1289 "Adjust recompilation counters") \
1290 \
1291 develop(intx, CounterHalfLifeTime, 30, \
1292 "Half-life time of invocation counters (in seconds)") \
1293 \
1294 develop(intx, CounterDecayMinIntervalLength, 500, \
1295 "The minimum interval (in milliseconds) between invocation of " \
1296 "CounterDecay") \
1297 \
1298 product(bool, AlwaysCompileLoopMethods, false, \
1299 "When using recompilation, never interpret methods " \
1300 "containing loops") \
1301 \
1302 product(intx, AllocatePrefetchStyle, 1, \
1303 "0 = no prefetch, " \
1304 "1 = generate prefetch instructions for each allocation, " \
1305 "2 = use TLAB watermark to gate allocation prefetch, " \
1306 "3 = generate one prefetch instruction per cache line") \
1307 range(0, 3) \
1308 \
1309 product(intx, AllocatePrefetchDistance, -1, \
1310 "Distance to prefetch ahead of allocation pointer. " \
1311 "-1: use system-specific value (automatically determined") \
1312 constraint(AllocatePrefetchDistanceConstraintFunc,AfterMemoryInit)\
1313 \
1314 product(intx, AllocatePrefetchLines, 3, \
1315 "Number of lines to prefetch ahead of array allocation pointer") \
1316 range(1, 64) \
1317 \
1318 product(intx, AllocateInstancePrefetchLines, 1, \
1319 "Number of lines to prefetch ahead of instance allocation " \
1320 "pointer") \
1321 range(1, 64) \
1322 \
1323 product(intx, AllocatePrefetchStepSize, 16, \
1324 "Step size in bytes of sequential prefetch instructions") \
1325 range(1, 512) \
1326 constraint(AllocatePrefetchStepSizeConstraintFunc,AfterMemoryInit)\
1327 \
1328 product(intx, AllocatePrefetchInstr, 0, \
1329 "Select instruction to prefetch ahead of allocation pointer") \
1330 constraint(AllocatePrefetchInstrConstraintFunc, AfterMemoryInit) \
1331 \
1332 /* deoptimization */ \
1333 develop(bool, TraceDeoptimization, false, \
1334 "Trace deoptimization") \
1335 \
1336 develop(bool, PrintDeoptimizationDetails, false, \
1337 "Print more information about deoptimization") \
1338 \
1339 develop(bool, DebugDeoptimization, false, \
1340 "Tracing various information while debugging deoptimization") \
1341 \
1342 product(intx, SelfDestructTimer, 0, \
1343 "Will cause VM to terminate after a given time (in minutes) " \
1344 "(0 means off)") \
1345 range(0, max_intx) \
1346 \
1347 product(intx, MaxJavaStackTraceDepth, 1024, \
1348 "The maximum number of lines in the stack trace for Java " \
1349 "exceptions (0 means all)") \
1350 range(0, max_jint/2) \
1351 \
1352 /* notice: the max range value here is max_jint, not max_intx */ \
1353 /* because of overflow issue */ \
1354 product(intx, GuaranteedSafepointInterval, 1000, DIAGNOSTIC, \
1355 "Guarantee a safepoint (at least) every so many milliseconds " \
1356 "(0 means none)") \
1357 range(0, max_jint) \
1358 \
1359 product(intx, SafepointTimeoutDelay, 10000, \
1360 "Delay in milliseconds for option SafepointTimeout") \
1361 range(0, max_intx LP64_ONLY(/MICROUNITS)) \
1362 \
1363 product(intx, NmethodSweepActivity, 10, \
1364 "Removes cold nmethods from code cache if > 0. Higher values " \
1365 "result in more aggressive sweeping") \
1366 range(0, 2000) \
1367 \
1368 notproduct(bool, LogSweeper, false, \
1369 "Keep a ring buffer of sweeper activity") \
1370 \
1371 notproduct(intx, SweeperLogEntries, 1024, \
1372 "Number of records in the ring buffer of sweeper activity") \
1373 \
1374 develop(intx, MallocCatchPtr, -1, \
1375 "Hit breakpoint when mallocing/freeing this pointer") \
1376 \
1377 notproduct(ccstrlist, SuppressErrorAt, "", \
1378 "List of assertions (file:line) to muzzle") \
1379 \
1380 develop(intx, StackPrintLimit, 100, \
1381 "number of stack frames to print in VM-level stack dump") \
1382 \
1383 product(int, ErrorLogPrintCodeLimit, 3, DIAGNOSTIC, \
1384 "max number of compiled code units to print in error log") \
1385 range(0, VMError::max_error_log_print_code) \
1386 \
1387 notproduct(intx, MaxElementPrintSize, 256, \
1388 "maximum number of elements to print") \
1389 \
1390 notproduct(intx, MaxSubklassPrintSize, 4, \
1391 "maximum number of subklasses to print when printing klass") \
1392 \
1393 develop(intx, MaxForceInlineLevel, 100, \
1394 "maximum number of nested calls that are forced for inlining " \
1395 "(using CompileCommand or marked w/ @ForceInline)") \
1396 range(0, max_jint) \
1397 \
1398 product(intx, MinInliningThreshold, 250, \
1399 "The minimum invocation count a method needs to have to be " \
1400 "inlined") \
1401 range(0, max_jint) \
1402 \
1403 develop(intx, MethodHistogramCutoff, 100, \
1404 "The cutoff value for method invocation histogram (+CountCalls)") \
1405 \
1406 develop(intx, DontYieldALotInterval, 10, \
1407 "Interval between which yields will be dropped (milliseconds)") \
1408 \
1409 notproduct(intx, DeoptimizeALotInterval, 5, \
1410 "Number of exits until DeoptimizeALot kicks in") \
1411 \
1412 notproduct(intx, ZombieALotInterval, 5, \
1413 "Number of exits until ZombieALot kicks in") \
1414 \
1415 product(uintx, MallocMaxTestWords, 0, DIAGNOSTIC, \
1416 "If non-zero, maximum number of words that malloc/realloc can " \
1417 "allocate (for testing only)") \
1418 range(0, max_uintx) \
1419 \
1420 product(intx, TypeProfileWidth, 2, \
1421 "Number of receiver types to record in call/cast profile") \
1422 range(0, 8) \
1423 \
1424 develop(intx, BciProfileWidth, 2, \
1425 "Number of return bci's to record in ret profile") \
1426 \
1427 product(intx, PerMethodRecompilationCutoff, 400, \
1428 "After recompiling N times, stay in the interpreter (-1=>'Inf')") \
1429 range(-1, max_intx) \
1430 \
1431 product(intx, PerBytecodeRecompilationCutoff, 200, \
1432 "Per-BCI limit on repeated recompilation (-1=>'Inf')") \
1433 range(-1, max_intx) \
1434 \
1435 product(intx, PerMethodTrapLimit, 100, \
1436 "Limit on traps (of one kind) in a method (includes inlines)") \
1437 range(0, max_jint) \
1438 \
1439 product(intx, PerMethodSpecTrapLimit, 5000, EXPERIMENTAL, \
1440 "Limit on speculative traps (of one kind) in a method " \
1441 "(includes inlines)") \
1442 range(0, max_jint) \
1443 \
1444 product(intx, PerBytecodeTrapLimit, 4, \
1445 "Limit on traps (of one kind) at a particular BCI") \
1446 range(0, max_jint) \
1447 \
1448 product(intx, SpecTrapLimitExtraEntries, 3, EXPERIMENTAL, \
1449 "Extra method data trap entries for speculation") \
1450 \
1451 develop(intx, InlineFrequencyRatio, 20, \
1452 "Ratio of call site execution to caller method invocation") \
1453 range(0, max_jint) \
1454 \
1455 product_pd(intx, InlineFrequencyCount, DIAGNOSTIC, \
1456 "Count of call site execution necessary to trigger frequent " \
1457 "inlining") \
1458 range(0, max_jint) \
1459 \
1460 develop(intx, InlineThrowCount, 50, \
1461 "Force inlining of interpreted methods that throw this often") \
1462 range(0, max_jint) \
1463 \
1464 develop(intx, InlineThrowMaxSize, 200, \
1465 "Force inlining of throwing methods smaller than this") \
1466 range(0, max_jint) \
1467 \
1468 product(size_t, MetaspaceSize, NOT_LP64(16 * M) LP64_ONLY(21 * M), \
1469 "Initial threshold (in bytes) at which a garbage collection " \
1470 "is done to reduce Metaspace usage") \
1471 constraint(MetaspaceSizeConstraintFunc,AfterErgo) \
1472 \
1473 product(size_t, MaxMetaspaceSize, max_uintx, \
1474 "Maximum size of Metaspaces (in bytes)") \
1475 constraint(MaxMetaspaceSizeConstraintFunc,AfterErgo) \
1476 \
1477 product(size_t, CompressedClassSpaceSize, 1*G, \
1478 "Maximum size of class area in Metaspace when compressed " \
1479 "class pointers are used") \
1480 range(1*M, 3*G) \
1481 \
1482 develop(size_t, CompressedClassSpaceBaseAddress, 0, \
1483 "Force the class space to be allocated at this address or " \
1484 "fails VM initialization (requires -Xshare=off.") \
1485 \
1486 product(ccstr, MetaspaceReclaimPolicy, "balanced", \
1487 "options: balanced, aggressive, none") \
1488 \
1489 product(bool, PrintMetaspaceStatisticsAtExit, false, DIAGNOSTIC, \
1490 "Print metaspace statistics upon VM exit.") \
1491 \
1492 product(bool, MetaspaceGuardAllocations, false, DIAGNOSTIC, \
1493 "Metapace allocations are guarded.") \
1494 \
1495 product(bool, MetaspaceHandleDeallocations, true, DIAGNOSTIC, \
1496 "Switch off Metapace deallocation handling.") \
1497 \
1498 product(uintx, MinHeapFreeRatio, 40, MANAGEABLE, \
1499 "The minimum percentage of heap free after GC to avoid expansion."\
1500 " For most GCs this applies to the old generation. In G1 and" \
1501 " ParallelGC it applies to the whole heap.") \
1502 range(0, 100) \
1503 constraint(MinHeapFreeRatioConstraintFunc,AfterErgo) \
1504 \
1505 product(uintx, MaxHeapFreeRatio, 70, MANAGEABLE, \
1506 "The maximum percentage of heap free after GC to avoid shrinking."\
1507 " For most GCs this applies to the old generation. In G1 and" \
1508 " ParallelGC it applies to the whole heap.") \
1509 range(0, 100) \
1510 constraint(MaxHeapFreeRatioConstraintFunc,AfterErgo) \
1511 \
1512 product(bool, ShrinkHeapInSteps, true, \
1513 "When disabled, informs the GC to shrink the java heap directly" \
1514 " to the target size at the next full GC rather than requiring" \
1515 " smaller steps during multiple full GCs.") \
1516 \
1517 product(intx, SoftRefLRUPolicyMSPerMB, 1000, \
1518 "Number of milliseconds per MB of free space in the heap") \
1519 range(0, max_intx) \
1520 constraint(SoftRefLRUPolicyMSPerMBConstraintFunc,AfterMemoryInit) \
1521 \
1522 product(size_t, MinHeapDeltaBytes, ScaleForWordSize(128*K), \
1523 "The minimum change in heap space due to GC (in bytes)") \
1524 range(0, max_uintx) \
1525 \
1526 product(size_t, MinMetaspaceExpansion, ScaleForWordSize(256*K), \
1527 "The minimum expansion of Metaspace (in bytes)") \
1528 range(0, max_uintx) \
1529 \
1530 product(uintx, MaxMetaspaceFreeRatio, 70, \
1531 "The maximum percentage of Metaspace free after GC to avoid " \
1532 "shrinking") \
1533 range(0, 100) \
1534 constraint(MaxMetaspaceFreeRatioConstraintFunc,AfterErgo) \
1535 \
1536 product(uintx, MinMetaspaceFreeRatio, 40, \
1537 "The minimum percentage of Metaspace free after GC to avoid " \
1538 "expansion") \
1539 range(0, 99) \
1540 constraint(MinMetaspaceFreeRatioConstraintFunc,AfterErgo) \
1541 \
1542 product(size_t, MaxMetaspaceExpansion, ScaleForWordSize(4*M), \
1543 "The maximum expansion of Metaspace without full GC (in bytes)") \
1544 range(0, max_uintx) \
1545 \
1546 /* stack parameters */ \
1547 product_pd(intx, StackYellowPages, \
1548 "Number of yellow zone (recoverable overflows) pages of size " \
1549 "4KB. If pages are bigger yellow zone is aligned up.") \
1550 range(MIN_STACK_YELLOW_PAGES, (DEFAULT_STACK_YELLOW_PAGES+5)) \
1551 \
1552 product_pd(intx, StackRedPages, \
1553 "Number of red zone (unrecoverable overflows) pages of size " \
1554 "4KB. If pages are bigger red zone is aligned up.") \
1555 range(MIN_STACK_RED_PAGES, (DEFAULT_STACK_RED_PAGES+2)) \
1556 \
1557 product_pd(intx, StackReservedPages, \
1558 "Number of reserved zone (reserved to annotated methods) pages" \
1559 " of size 4KB. If pages are bigger reserved zone is aligned up.") \
1560 range(MIN_STACK_RESERVED_PAGES, (DEFAULT_STACK_RESERVED_PAGES+10))\
1561 \
1562 product(bool, RestrictReservedStack, true, \
1563 "Restrict @ReservedStackAccess to trusted classes") \
1564 \
1565 /* greater stack shadow pages can't generate instruction to bang stack */ \
1566 product_pd(intx, StackShadowPages, \
1567 "Number of shadow zone (for overflow checking) pages of size " \
1568 "4KB. If pages are bigger shadow zone is aligned up. " \
1569 "This should exceed the depth of the VM and native call stack.") \
1570 range(MIN_STACK_SHADOW_PAGES, (DEFAULT_STACK_SHADOW_PAGES+30)) \
1571 \
1572 product_pd(intx, ThreadStackSize, \
1573 "Thread Stack Size (in Kbytes)") \
1574 range(0, 1 * M) \
1575 \
1576 product_pd(intx, VMThreadStackSize, \
1577 "Non-Java Thread Stack Size (in Kbytes)") \
1578 range(0, max_intx/(1 * K)) \
1579 \
1580 product_pd(intx, CompilerThreadStackSize, \
1581 "Compiler Thread Stack Size (in Kbytes)") \
1582 range(0, max_intx/(1 * K)) \
1583 \
1584 develop_pd(size_t, JVMInvokeMethodSlack, \
1585 "Stack space (bytes) required for JVM_InvokeMethod to complete") \
1586 \
1587 /* code cache parameters */ \
1588 product_pd(uintx, CodeCacheSegmentSize, EXPERIMENTAL, \
1589 "Code cache segment size (in bytes) - smallest unit of " \
1590 "allocation") \
1591 range(1, 1024) \
1592 constraint(CodeCacheSegmentSizeConstraintFunc, AfterErgo) \
1593 \
1594 develop_pd(intx, CodeEntryAlignment, \
1595 "Code entry alignment for generated code (in bytes)") \
1596 constraint(CodeEntryAlignmentConstraintFunc, AfterErgo) \
1597 \
1598 product_pd(intx, OptoLoopAlignment, \
1599 "Align inner loops to zero relative to this modulus") \
1600 range(1, 16) \
1601 constraint(OptoLoopAlignmentConstraintFunc, AfterErgo) \
1602 \
1603 product_pd(uintx, InitialCodeCacheSize, \
1604 "Initial code cache size (in bytes)") \
1605 constraint(VMPageSizeConstraintFunc, AtParse) \
1606 \
1607 develop_pd(uintx, CodeCacheMinimumUseSpace, \
1608 "Minimum code cache size (in bytes) required to start VM.") \
1609 range(0, max_uintx) \
1610 \
1611 product(bool, SegmentedCodeCache, false, \
1612 "Use a segmented code cache") \
1613 \
1614 product_pd(uintx, ReservedCodeCacheSize, \
1615 "Reserved code cache size (in bytes) - maximum code cache size") \
1616 constraint(VMPageSizeConstraintFunc, AtParse) \
1617 \
1618 product_pd(uintx, NonProfiledCodeHeapSize, \
1619 "Size of code heap with non-profiled methods (in bytes)") \
1620 range(0, max_uintx) \
1621 \
1622 product_pd(uintx, ProfiledCodeHeapSize, \
1623 "Size of code heap with profiled methods (in bytes)") \
1624 range(0, max_uintx) \
1625 \
1626 product_pd(uintx, NonNMethodCodeHeapSize, \
1627 "Size of code heap with non-nmethods (in bytes)") \
1628 constraint(VMPageSizeConstraintFunc, AtParse) \
1629 \
1630 product_pd(uintx, CodeCacheExpansionSize, \
1631 "Code cache expansion size (in bytes)") \
1632 range(32*K, max_uintx) \
1633 \
1634 product_pd(uintx, CodeCacheMinBlockLength, DIAGNOSTIC, \
1635 "Minimum number of segments in a code cache block") \
1636 range(1, 100) \
1637 \
1638 notproduct(bool, ExitOnFullCodeCache, false, \
1639 "Exit the VM if we fill the code cache") \
1640 \
1641 product(bool, UseCodeCacheFlushing, true, \
1642 "Remove cold/old nmethods from the code cache") \
1643 \
1644 product(double, SweeperThreshold, 0.5, \
1645 "Threshold controlling when code cache sweeper is invoked." \
1646 "Value is percentage of ReservedCodeCacheSize.") \
1647 range(0.0, 100.0) \
1648 \
1649 product(uintx, StartAggressiveSweepingAt, 10, \
1650 "Start aggressive sweeping if X[%] of the code cache is free." \
1651 "Segmented code cache: X[%] of the non-profiled heap." \
1652 "Non-segmented code cache: X[%] of the total code cache") \
1653 range(0, 100) \
1654 \
1655 /* interpreter debugging */ \
1656 develop(intx, BinarySwitchThreshold, 5, \
1657 "Minimal number of lookupswitch entries for rewriting to binary " \
1658 "switch") \
1659 \
1660 develop(intx, StopInterpreterAt, 0, \
1661 "Stop interpreter execution at specified bytecode number") \
1662 \
1663 develop(intx, TraceBytecodesAt, 0, \
1664 "Trace bytecodes starting with specified bytecode number") \
1665 \
1666 /* Priorities */ \
1667 product_pd(bool, UseThreadPriorities, "Use native thread priorities") \
1668 \
1669 product(intx, ThreadPriorityPolicy, 0, \
1670 "0 : Normal. "\
1671 " VM chooses priorities that are appropriate for normal "\
1672 " applications. "\
1673 " On Windows applications are allowed to use higher native "\
1674 " priorities. However, with ThreadPriorityPolicy=0, VM will "\
1675 " not use the highest possible native priority, "\
1676 " THREAD_PRIORITY_TIME_CRITICAL, as it may interfere with "\
1677 " system threads. On Linux thread priorities are ignored "\
1678 " because the OS does not support static priority in "\
1679 " SCHED_OTHER scheduling class which is the only choice for "\
1680 " non-root, non-realtime applications. "\
1681 "1 : Aggressive. "\
1682 " Java thread priorities map over to the entire range of "\
1683 " native thread priorities. Higher Java thread priorities map "\
1684 " to higher native thread priorities. This policy should be "\
1685 " used with care, as sometimes it can cause performance "\
1686 " degradation in the application and/or the entire system. On "\
1687 " Linux/BSD/macOS this policy requires root privilege or an "\
1688 " extended capability.") \
1689 range(0, 1) \
1690 \
1691 product(bool, ThreadPriorityVerbose, false, \
1692 "Print priority changes") \
1693 \
1694 product(intx, CompilerThreadPriority, -1, \
1695 "The native priority at which compiler threads should run " \
1696 "(-1 means no change)") \
1697 range(min_jint, max_jint) \
1698 \
1699 product(intx, VMThreadPriority, -1, \
1700 "The native priority at which the VM thread should run " \
1701 "(-1 means no change)") \
1702 range(-1, 127) \
1703 \
1704 product(intx, JavaPriority1_To_OSPriority, -1, \
1705 "Map Java priorities to OS priorities") \
1706 range(-1, 127) \
1707 \
1708 product(intx, JavaPriority2_To_OSPriority, -1, \
1709 "Map Java priorities to OS priorities") \
1710 range(-1, 127) \
1711 \
1712 product(intx, JavaPriority3_To_OSPriority, -1, \
1713 "Map Java priorities to OS priorities") \
1714 range(-1, 127) \
1715 \
1716 product(intx, JavaPriority4_To_OSPriority, -1, \
1717 "Map Java priorities to OS priorities") \
1718 range(-1, 127) \
1719 \
1720 product(intx, JavaPriority5_To_OSPriority, -1, \
1721 "Map Java priorities to OS priorities") \
1722 range(-1, 127) \
1723 \
1724 product(intx, JavaPriority6_To_OSPriority, -1, \
1725 "Map Java priorities to OS priorities") \
1726 range(-1, 127) \
1727 \
1728 product(intx, JavaPriority7_To_OSPriority, -1, \
1729 "Map Java priorities to OS priorities") \
1730 range(-1, 127) \
1731 \
1732 product(intx, JavaPriority8_To_OSPriority, -1, \
1733 "Map Java priorities to OS priorities") \
1734 range(-1, 127) \
1735 \
1736 product(intx, JavaPriority9_To_OSPriority, -1, \
1737 "Map Java priorities to OS priorities") \
1738 range(-1, 127) \
1739 \
1740 product(intx, JavaPriority10_To_OSPriority,-1, \
1741 "Map Java priorities to OS priorities") \
1742 range(-1, 127) \
1743 \
1744 product(bool, UseCriticalJavaThreadPriority, false, EXPERIMENTAL, \
1745 "Java thread priority 10 maps to critical scheduling priority") \
1746 \
1747 product(bool, UseCriticalCompilerThreadPriority, false, EXPERIMENTAL, \
1748 "Compiler thread(s) run at critical scheduling priority") \
1749 \
1750 develop(intx, NewCodeParameter, 0, \
1751 "Testing Only: Create a dedicated integer parameter before " \
1752 "putback") \
1753 \
1754 /* new oopmap storage allocation */ \
1755 develop(intx, MinOopMapAllocation, 8, \
1756 "Minimum number of OopMap entries in an OopMapSet") \
1757 \
1758 /* recompilation */ \
1759 product_pd(intx, CompileThreshold, \
1760 "number of interpreted method invocations before (re-)compiling") \
1761 constraint(CompileThresholdConstraintFunc, AfterErgo) \
1762 \
1763 product_pd(bool, TieredCompilation, \
1764 "Enable tiered compilation") \
1765 \
1766 /* Properties for Java libraries */ \
1767 \
1768 product(uint64_t, MaxDirectMemorySize, 0, \
1769 "Maximum total size of NIO direct-buffer allocations") \
1770 range(0, max_jlong) \
1771 \
1772 /* Flags used for temporary code during development */ \
1773 \
1774 product(bool, UseNewCode, false, DIAGNOSTIC, \
1775 "Testing Only: Use the new version while testing") \
1776 \
1777 product(bool, UseNewCode2, false, DIAGNOSTIC, \
1778 "Testing Only: Use the new version while testing") \
1779 \
1780 product(bool, UseNewCode3, false, DIAGNOSTIC, \
1781 "Testing Only: Use the new version while testing") \
1782 \
1783 notproduct(bool, UseDebuggerErgo, false, \
1784 "Debugging Only: Adjust the VM to be more debugger-friendly. " \
1785 "Turns on the other UseDebuggerErgo* flags") \
1786 \
1787 notproduct(bool, UseDebuggerErgo1, false, \
1788 "Debugging Only: Enable workarounds for debugger induced " \
1789 "os::processor_id() >= os::processor_count() problems") \
1790 \
1791 notproduct(bool, UseDebuggerErgo2, false, \
1792 "Debugging Only: Limit the number of spawned JVM threads") \
1793 \
1794 notproduct(bool, EnableJVMTIStackDepthAsserts, true, \
1795 "Enable JVMTI asserts related to stack depth checks") \
1796 \
1797 /* flags for performance data collection */ \
1798 \
1799 product(bool, UsePerfData, true, \
1800 "Flag to disable jvmstat instrumentation for performance testing "\
1801 "and problem isolation purposes") \
1802 \
1803 product(bool, PerfDataSaveToFile, false, \
1804 "Save PerfData memory to hsperfdata_<pid> file on exit") \
1805 \
1806 product(ccstr, PerfDataSaveFile, NULL, \
1807 "Save PerfData memory to the specified absolute pathname. " \
1808 "The string %p in the file name (if present) " \
1809 "will be replaced by pid") \
1810 \
1811 product(intx, PerfDataSamplingInterval, 50, \
1812 "Data sampling interval (in milliseconds)") \
1813 range(PeriodicTask::min_interval, max_jint) \
1814 constraint(PerfDataSamplingIntervalFunc, AfterErgo) \
1815 \
1816 product(bool, PerfDisableSharedMem, false, \
1817 "Store performance data in standard memory") \
1818 \
1819 product(intx, PerfDataMemorySize, 32*K, \
1820 "Size of performance data memory region. Will be rounded " \
1821 "up to a multiple of the native os page size.") \
1822 range(128, 32*64*K) \
1823 \
1824 product(intx, PerfMaxStringConstLength, 1024, \
1825 "Maximum PerfStringConstant string length before truncation") \
1826 range(32, 32*K) \
1827 \
1828 product(bool, PerfAllowAtExitRegistration, false, \
1829 "Allow registration of atexit() methods") \
1830 \
1831 product(bool, PerfBypassFileSystemCheck, false, \
1832 "Bypass Win32 file system criteria checks (Windows Only)") \
1833 \
1834 product(intx, UnguardOnExecutionViolation, 0, \
1835 "Unguard page and retry on no-execute fault (Win32 only) " \
1836 "0=off, 1=conservative, 2=aggressive") \
1837 range(0, 2) \
1838 \
1839 /* Serviceability Support */ \
1840 \
1841 product(bool, ManagementServer, false, \
1842 "Create JMX Management Server") \
1843 \
1844 product(bool, DisableAttachMechanism, false, \
1845 "Disable mechanism that allows tools to attach to this VM") \
1846 \
1847 product(bool, StartAttachListener, false, \
1848 "Always start Attach Listener at VM startup") \
1849 \
1850 product(bool, EnableDynamicAgentLoading, true, \
1851 "Allow tools to load agents with the attach mechanism") \
1852 \
1853 product(bool, PrintConcurrentLocks, false, MANAGEABLE, \
1854 "Print java.util.concurrent locks in thread dump") \
1855 \
1856 /* Shared spaces */ \
1857 \
1858 product(bool, UseSharedSpaces, true, \
1859 "Use shared spaces for metadata") \
1860 \
1861 product(bool, VerifySharedSpaces, false, \
1862 "Verify integrity of shared spaces") \
1863 \
1864 product(bool, RequireSharedSpaces, false, \
1865 "Require shared spaces for metadata") \
1866 \
1867 product(bool, DumpSharedSpaces, false, \
1868 "Special mode: JVM reads a class list, loads classes, builds " \
1869 "shared spaces, and dumps the shared spaces to a file to be " \
1870 "used in future JVM runs") \
1871 \
1872 product(bool, DynamicDumpSharedSpaces, false, \
1873 "Dynamic archive") \
1874 \
1875 product(bool, RecordDynamicDumpInfo, false, \
1876 "Record class info for jcmd VM.cds dynamic_dump") \
1877 \
1878 product(bool, PrintSharedArchiveAndExit, false, \
1879 "Print shared archive file contents") \
1880 \
1881 product(bool, PrintSharedDictionary, false, \
1882 "If PrintSharedArchiveAndExit is true, also print the shared " \
1883 "dictionary") \
1884 \
1885 product(size_t, SharedBaseAddress, LP64_ONLY(32*G) \
1886 NOT_LP64(LINUX_ONLY(2*G) NOT_LINUX(0)), \
1887 "Address to allocate shared memory region for class data") \
1888 range(0, SIZE_MAX) \
1889 \
1890 product(ccstr, SharedArchiveConfigFile, NULL, \
1891 "Data to add to the CDS archive file") \
1892 \
1893 product(uintx, SharedSymbolTableBucketSize, 4, \
1894 "Average number of symbols per bucket in shared table") \
1895 range(2, 246) \
1896 \
1897 product(bool, AllowArchivingWithJavaAgent, false, DIAGNOSTIC, \
1898 "Allow Java agent to be run with CDS dumping") \
1899 \
1900 product(bool, PrintMethodHandleStubs, false, DIAGNOSTIC, \
1901 "Print generated stub code for method handles") \
1902 \
1903 product(bool, VerifyMethodHandles, trueInDebug, DIAGNOSTIC, \
1904 "perform extra checks when constructing method handles") \
1905 \
1906 product(bool, ShowHiddenFrames, false, DIAGNOSTIC, \
1907 "show method handle implementation frames (usually hidden)") \
1908 \
1909 product(bool, TrustFinalNonStaticFields, false, EXPERIMENTAL, \
1910 "trust final non-static declarations for constant folding") \
1911 \
1912 product(bool, FoldStableValues, true, DIAGNOSTIC, \
1913 "Optimize loads from stable fields (marked w/ @Stable)") \
1914 \
1915 product(int, UseBootstrapCallInfo, 1, DIAGNOSTIC, \
1916 "0: when resolving InDy or ConDy, force all BSM arguments to be " \
1917 "resolved before the bootstrap method is called; 1: when a BSM " \
1918 "that may accept a BootstrapCallInfo is detected, use that API " \
1919 "to pass BSM arguments, which allows the BSM to delay their " \
1920 "resolution; 2+: stress test the BCI API by calling more BSMs " \
1921 "via that API, instead of with the eagerly-resolved array.") \
1922 \
1923 product(bool, PauseAtStartup, false, DIAGNOSTIC, \
1924 "Causes the VM to pause at startup time and wait for the pause " \
1925 "file to be removed (default: ./vm.paused.<pid>)") \
1926 \
1927 product(ccstr, PauseAtStartupFile, NULL, DIAGNOSTIC, \
1928 "The file to create and for whose removal to await when pausing " \
1929 "at startup. (default: ./vm.paused.<pid>)") \
1930 \
1931 product(bool, PauseAtExit, false, DIAGNOSTIC, \
1932 "Pause and wait for keypress on exit if a debugger is attached") \
1933 \
1934 product(bool, ExtendedDTraceProbes, false, \
1935 "Enable performance-impacting dtrace probes") \
1936 \
1937 product(bool, DTraceMethodProbes, false, \
1938 "Enable dtrace probes for method-entry and method-exit") \
1939 \
1940 product(bool, DTraceAllocProbes, false, \
1941 "Enable dtrace probes for object allocation") \
1942 \
1943 product(bool, DTraceMonitorProbes, false, \
1944 "Enable dtrace probes for monitor events") \
1945 \
1946 product(bool, RelaxAccessControlCheck, false, \
1947 "Relax the access control checks in the verifier") \
1948 \
1949 product(uintx, StringTableSize, defaultStringTableSize, \
1950 "Number of buckets in the interned String table " \
1951 "(will be rounded to nearest higher power of 2)") \
1952 range(minimumStringTableSize, 16777216ul /* 2^24 */) \
1953 \
1954 product(uintx, SymbolTableSize, defaultSymbolTableSize, EXPERIMENTAL, \
1955 "Number of buckets in the JVM internal Symbol table") \
1956 range(minimumSymbolTableSize, 16777216ul /* 2^24 */) \
1957 \
1958 product(bool, UseStringDeduplication, false, \
1959 "Use string deduplication") \
1960 \
1961 product(uint, StringDeduplicationAgeThreshold, 3, \
1962 "A string must reach this age (or be promoted to an old region) " \
1963 "to be considered for deduplication") \
1964 range(1, markWord::max_age) \
1965 \
1966 product(size_t, StringDeduplicationInitialTableSize, 500, EXPERIMENTAL, \
1967 "Approximate initial number of buckets in the table") \
1968 range(1, 1 * G) \
1969 \
1970 product(double, StringDeduplicationGrowTableLoad, 14.0, EXPERIMENTAL, \
1971 "Entries per bucket above which the table should be expanded") \
1972 range(0.1, 1000.0) \
1973 \
1974 product(double, StringDeduplicationShrinkTableLoad, 1.0, EXPERIMENTAL, \
1975 "Entries per bucket below which the table should be shrunk") \
1976 range(0.01, 100.0) \
1977 \
1978 product(double, StringDeduplicationTargetTableLoad, 7.0, EXPERIMENTAL, \
1979 "Desired entries per bucket when resizing the table") \
1980 range(0.01, 1000.0) \
1981 \
1982 product(size_t, StringDeduplicationCleanupDeadMinimum, 100, EXPERIMENTAL, \
1983 "Minimum number of dead table entries for cleaning the table") \
1984 \
1985 product(int, StringDeduplicationCleanupDeadPercent, 5, EXPERIMENTAL, \
1986 "Minimum percentage of dead table entries for cleaning the table") \
1987 range(1, 100) \
1988 \
1989 product(bool, StringDeduplicationResizeALot, false, DIAGNOSTIC, \
1990 "Force more frequent table resizing") \
1991 \
1992 product(uint64_t, StringDeduplicationHashSeed, 0, DIAGNOSTIC, \
1993 "Seed for the table hashing function; 0 requests computed seed") \
1994 \
1995 product(bool, WhiteBoxAPI, false, DIAGNOSTIC, \
1996 "Enable internal testing APIs") \
1997 \
1998 product(ccstr, DumpLoadedClassList, NULL, \
1999 "Dump the names all loaded classes, that could be stored into " \
2000 "the CDS archive, in the specified file") \
2001 \
2002 product(ccstr, SharedClassListFile, NULL, \
2003 "Override the default CDS class list") \
2004 \
2005 product(ccstr, SharedArchiveFile, NULL, \
2006 "Override the default location of the CDS archive file") \
2007 \
2008 product(ccstr, ArchiveClassesAtExit, NULL, \
2009 "The path and name of the dynamic archive file") \
2010 \
2011 product(ccstr, ExtraSharedClassListFile, NULL, \
2012 "Extra classlist for building the CDS archive file") \
2013 \
2014 product(intx, ArchiveRelocationMode, 1, DIAGNOSTIC, \
2015 "(0) first map at preferred address, and if " \
2016 "unsuccessful, map at alternative address; " \
2017 "(1) always map at alternative address (default); " \
2018 "(2) always map at preferred address, and if unsuccessful, " \
2019 "do not map the archive") \
2020 range(0, 2) \
2021 \
2022 product(size_t, ArrayAllocatorMallocLimit, (size_t)-1, EXPERIMENTAL, \
2023 "Allocation less than this value will be allocated " \
2024 "using malloc. Larger allocations will use mmap.") \
2025 \
2026 product(bool, AlwaysAtomicAccesses, false, EXPERIMENTAL, \
2027 "Accesses to all variables should always be atomic") \
2028 \
2029 product(bool, UseUnalignedAccesses, false, DIAGNOSTIC, \
2030 "Use unaligned memory accesses in Unsafe") \
2031 \
2032 product_pd(bool, PreserveFramePointer, \
2033 "Use the FP register for holding the frame pointer " \
2034 "and not as a general purpose register.") \
2035 \
2036 product(size_t, AsyncLogBufferSize, 2*M, \
2037 "Memory budget (in bytes) for the buffer of Asynchronous " \
2038 "Logging (-Xlog:async).") \
2039 range(100*K, 50*M) \
2040 \
2041 product(bool, CheckIntrinsics, true, DIAGNOSTIC, \
2042 "When a class C is loaded, check that " \
2043 "(1) all intrinsics defined by the VM for class C are present "\
2044 "in the loaded class file and are marked with the " \
2045 "@IntrinsicCandidate annotation, that " \
2046 "(2) there is an intrinsic registered for all loaded methods " \
2047 "that are annotated with the @IntrinsicCandidate annotation, " \
2048 "and that " \
2049 "(3) no orphan methods exist for class C (i.e., methods for " \
2050 "which the VM declares an intrinsic but that are not declared "\
2051 "in the loaded class C. " \
2052 "Check (3) is available only in debug builds.") \
2053 \
2054 product_pd(intx, InitArrayShortSize, DIAGNOSTIC, \
2055 "Threshold small size (in bytes) for clearing arrays. " \
2056 "Anything this size or smaller may get converted to discrete " \
2057 "scalar stores.") \
2058 range(0, max_intx) \
2059 constraint(InitArrayShortSizeConstraintFunc, AfterErgo) \
2060 \
2061 product(ccstr, AllocateHeapAt, NULL, \
2062 "Path to the directory where a temporary file will be created " \
2063 "to use as the backing store for Java Heap.") \
2064 \
2065 develop(int, VerifyMetaspaceInterval, DEBUG_ONLY(500) NOT_DEBUG(0), \
2066 "Run periodic metaspace verifications (0 - none, " \
2067 "1 - always, >1 every nth interval)") \
2068 \
2069 product(bool, ShowRegistersOnAssert, true, DIAGNOSTIC, \
2070 "On internal errors, include registers in error report.") \
2071 \
2072 product(bool, UseSwitchProfiling, true, DIAGNOSTIC, \
2073 "leverage profiling for table/lookup switch") \
2074 \
2075 develop(bool, TraceMemoryWriteback, false, \
2076 "Trace memory writeback operations") \
2077 \
2078 JFR_ONLY(product(bool, FlightRecorder, false, \
2079 "(Deprecated) Enable Flight Recorder")) \
2080 \
2081 JFR_ONLY(product(ccstr, FlightRecorderOptions, NULL, \
2082 "Flight Recorder options")) \
2083 \
2084 JFR_ONLY(product(ccstr, StartFlightRecording, NULL, \
2085 "Start flight recording with options")) \
2086 \
2087 product(bool, UseFastUnorderedTimeStamps, false, EXPERIMENTAL, \
2088 "Use platform unstable time where supported for timestamps only") \
2089 \
2090 product(bool, UseEmptySlotsInSupers, true, \
2091 "Allow allocating fields in empty slots of super-classes") \
2092 \
2093 product(bool, DeoptimizeNMethodBarriersALot, false, DIAGNOSTIC, \
2094 "Make nmethod barriers deoptimise a lot.") \
2095 \
2096 develop(bool, VerifyCrossModifyFence, \
2097 false AARCH64_ONLY(DEBUG_ONLY(||true)), \
2098 "Mark all threads after a safepoint, and clear on a modify " \
2099 "fence. Add cleanliness checks.") \
2100 \
2101 product(bool, HeapObjectStats, false, DIAGNOSTIC, \
2102 "Enable gathering of heap object statistics") \
2103 \
2104 product(size_t, HeapObjectStatsSamplingInterval, 500, DIAGNOSTIC, \
2105 "Heap object statistics sampling interval (ms)") \
2106 \
2107 product(int, LockingMode, LM_LEGACY, EXPERIMENTAL, \
2108 "Select locking mode: " \
2109 "0: monitors only (LM_MONITOR), " \
2110 "1: monitors & legacy stack-locking (LM_LEGACY, default), " \
2111 "2: monitors & new lightweight locking (LM_LIGHTWEIGHT)") \
2112 range(0, 2) \
2113 \
2114 develop(bool, TraceOptimizedUpcallStubs, false, \
2115 "Trace optimized upcall stub generation") \
2116 \
2117 product(uint, TrimNativeHeapInterval, 0, EXPERIMENTAL, \
2118 "Interval, in ms, at which the JVM will trim the native heap if " \
2119 "the platform supports that. Lower values will reclaim memory " \
2120 "more eagerly at the cost of higher overhead. A value of 0 " \
2121 "(default) disables native heap trimming.") \
2122 range(0, UINT_MAX) \
2123
2124 // end of RUNTIME_FLAGS
2125
2126 DECLARE_FLAGS(LP64_RUNTIME_FLAGS)
2127 DECLARE_ARCH_FLAGS(ARCH_FLAGS)
2128 DECLARE_FLAGS(RUNTIME_FLAGS)
2129 DECLARE_FLAGS(RUNTIME_OS_FLAGS)
2130
2131 #endif // SHARE_RUNTIME_GLOBALS_HPP