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