371 // A flag must be declared with one of the following types: |
371 // A flag must be declared with one of the following types: |
372 // bool, intx, uintx, ccstr. |
372 // bool, intx, uintx, ccstr. |
373 // The type "ccstr" is an alias for "const char*" and is used |
373 // The type "ccstr" is an alias for "const char*" and is used |
374 // only in this file, because the macrology requires single-token type names. |
374 // only in this file, because the macrology requires single-token type names. |
375 |
375 |
376 // Note: Diagnostic options not meant for VM tuning or for product modes. |
376 // Note: Diagnostic options are not meant for VM tuning or for product modes. |
377 // They are to be used for VM quality assurance or field diagnosis |
377 // They are to be used for VM quality assurance or field diagnosis |
378 // of VM bugs. They are hidden so that users will not be encouraged to |
378 // of VM bugs. They are hidden so that users will not be encouraged to |
379 // try them as if they were VM ordinary execution options. However, they |
379 // try them as if they were VM ordinary execution options. However, they |
380 // are available in the product version of the VM. Under instruction |
380 // are available in the product version of the VM. Under instruction |
381 // from support engineers, VM customers can turn them on to collect |
381 // from support engineers, VM customers can turn them on to collect |
382 // diagnostic information about VM problems. To use a VM diagnostic |
382 // diagnostic information about VM problems. To use a VM diagnostic |
383 // option, you must first specify +UnlockDiagnosticVMOptions. |
383 // option, you must first specify +UnlockDiagnosticVMOptions. |
384 // (This master switch also affects the behavior of -Xprintflags.) |
384 // (This master switch also affects the behavior of -Xprintflags.) |
|
385 // |
|
386 // |
|
387 // commercial flags support features for which Oracle charges a fee for |
|
388 // production use, though they're free for development and/or evaluation. |
|
389 // There's no enforcement mechanism in Hotspot other than that |
|
390 // -XX:+UnlockCommercialVMOptions must first be specified in order to use them. |
385 // |
391 // |
386 // experimental flags are in support of features that are not |
392 // experimental flags are in support of features that are not |
387 // part of the officially supported product, but are available |
393 // part of the officially supported product, but are available |
388 // for experimenting with. They could, for example, be performance |
394 // for experimenting with. They could, for example, be performance |
389 // features that may not have undergone full or rigorous QA, but which may |
395 // features that may not have undergone full or rigorous QA, but which may |
426 // and not reuse state related to the flag state at any given time. |
432 // and not reuse state related to the flag state at any given time. |
427 // |
433 // |
428 // Note that when there is a need to support develop flags to be writeable, |
434 // Note that when there is a need to support develop flags to be writeable, |
429 // it can be done in the same way as product_rw. |
435 // it can be done in the same way as product_rw. |
430 |
436 |
431 #define RUNTIME_FLAGS(develop, develop_pd, product, product_pd, diagnostic, experimental, notproduct, manageable, product_rw, lp64_product) \ |
437 #define RUNTIME_FLAGS(develop, develop_pd, product, product_pd, commercial, diagnostic, experimental, notproduct, manageable, product_rw, lp64_product) \ |
432 \ |
438 \ |
433 lp64_product(bool, UseCompressedOops, false, \ |
439 lp64_product(bool, UseCompressedOops, false, \ |
434 "Use 32-bit object references in 64-bit VM. " \ |
440 "Use 32-bit object references in 64-bit VM. " \ |
435 "lp64_product means flag is always constant in 32 bit VM") \ |
441 "lp64_product means flag is always constant in 32 bit VM") \ |
436 \ |
442 \ |
460 "Use lwsync instruction if true, else use slower sync") \ |
466 "Use lwsync instruction if true, else use slower sync") \ |
461 \ |
467 \ |
462 develop(bool, CleanChunkPoolAsync, falseInEmbedded, \ |
468 develop(bool, CleanChunkPoolAsync, falseInEmbedded, \ |
463 "Whether to clean the chunk pool asynchronously") \ |
469 "Whether to clean the chunk pool asynchronously") \ |
464 \ |
470 \ |
465 /* Temporary: See 6948537 */ \ |
471 /* Temporary: See 6948537 */ \ |
466 experimental(bool, UseMemSetInBOT, true, \ |
472 experimental(bool, UseMemSetInBOT, true, \ |
467 "(Unstable) uses memset in BOT updates in GC code") \ |
473 "(Unstable) uses memset in BOT updates in GC code") \ |
468 \ |
474 \ |
|
475 commercial(bool, UnlockCommercialVMOptions, false, \ |
|
476 "Enable normal processing of flags relating to commercial " \ |
|
477 "features") \ |
|
478 \ |
469 diagnostic(bool, UnlockDiagnosticVMOptions, trueInDebug, \ |
479 diagnostic(bool, UnlockDiagnosticVMOptions, trueInDebug, \ |
470 "Enable normal processing of flags relating to field diagnostics")\ |
480 "Enable normal processing of flags relating to field diagnostics")\ |
471 \ |
481 \ |
472 experimental(bool, UnlockExperimentalVMOptions, false, \ |
482 experimental(bool, UnlockExperimentalVMOptions, false, \ |
473 "Enable normal processing of flags relating to experimental features")\ |
483 "Enable normal processing of flags relating to experimental " \ |
|
484 "features") \ |
474 \ |
485 \ |
475 product(bool, JavaMonitorsInStackTrace, true, \ |
486 product(bool, JavaMonitorsInStackTrace, true, \ |
476 "Print info. about Java monitor locks when the stacks are dumped")\ |
487 "Print info. about Java monitor locks when the stacks are dumped")\ |
477 \ |
488 \ |
478 product_pd(bool, UseLargePages, \ |
489 product_pd(bool, UseLargePages, \ |
576 \ |
587 \ |
577 develop(bool, VerifyStack, false, \ |
588 develop(bool, VerifyStack, false, \ |
578 "Verify stack of each thread when it is entering a runtime call") \ |
589 "Verify stack of each thread when it is entering a runtime call") \ |
579 \ |
590 \ |
580 diagnostic(bool, ForceUnreachable, false, \ |
591 diagnostic(bool, ForceUnreachable, false, \ |
581 "Make all non code cache addresses to be unreachable with forcing use of 64bit literal fixups") \ |
592 "Make all non code cache addresses unreachable by forcing use of "\ |
|
593 "64-bit literal fixups") \ |
582 \ |
594 \ |
583 notproduct(bool, StressDerivedPointers, false, \ |
595 notproduct(bool, StressDerivedPointers, false, \ |
584 "Force scavenge when a derived pointers is detected on stack " \ |
596 "Force scavenge when a derived pointers is detected on stack " \ |
585 "after rtm call") \ |
597 "after rtm call") \ |
586 \ |
598 \ |
3850 "Number of buckets in the interned String table") \ |
3862 "Number of buckets in the interned String table") \ |
3851 \ |
3863 \ |
3852 product(bool, UseVMInterruptibleIO, false, \ |
3864 product(bool, UseVMInterruptibleIO, false, \ |
3853 "(Unstable, Solaris-specific) Thread interrupt before or with " \ |
3865 "(Unstable, Solaris-specific) Thread interrupt before or with " \ |
3854 "EINTR for I/O operations results in OS_INTRPT. The default value"\ |
3866 "EINTR for I/O operations results in OS_INTRPT. The default value"\ |
3855 " of this flag is true for JDK 6 and earliers") |
3867 " of this flag is true for JDK 6 and earlier") \ |
|
3868 \ |
|
3869 commercial(bool, FlightRecorder, false, \ |
|
3870 "Enable Java Flight Recorder") |
|
3871 |
3856 |
3872 |
3857 /* |
3873 /* |
3858 * Macros for factoring of globals |
3874 * Macros for factoring of globals |
3859 */ |
3875 */ |
3860 |
3876 |
3861 // Interface macros |
3877 // Interface macros |
3862 #define DECLARE_PRODUCT_FLAG(type, name, value, doc) extern "C" type name; |
3878 #define DECLARE_PRODUCT_FLAG(type, name, value, doc) extern "C" type name; |
3863 #define DECLARE_PD_PRODUCT_FLAG(type, name, doc) extern "C" type name; |
3879 #define DECLARE_PD_PRODUCT_FLAG(type, name, doc) extern "C" type name; |
|
3880 #define DECLARE_COMMERCIAL_FLAG(type, name, value, doc) extern "C" type name; |
3864 #define DECLARE_DIAGNOSTIC_FLAG(type, name, value, doc) extern "C" type name; |
3881 #define DECLARE_DIAGNOSTIC_FLAG(type, name, value, doc) extern "C" type name; |
3865 #define DECLARE_EXPERIMENTAL_FLAG(type, name, value, doc) extern "C" type name; |
3882 #define DECLARE_EXPERIMENTAL_FLAG(type, name, value, doc) extern "C" type name; |
3866 #define DECLARE_MANAGEABLE_FLAG(type, name, value, doc) extern "C" type name; |
3883 #define DECLARE_MANAGEABLE_FLAG(type, name, value, doc) extern "C" type name; |
3867 #define DECLARE_PRODUCT_RW_FLAG(type, name, value, doc) extern "C" type name; |
3884 #define DECLARE_PRODUCT_RW_FLAG(type, name, value, doc) extern "C" type name; |
3868 #ifdef PRODUCT |
3885 #ifdef PRODUCT |
3882 #endif // _LP64 |
3899 #endif // _LP64 |
3883 |
3900 |
3884 // Implementation macros |
3901 // Implementation macros |
3885 #define MATERIALIZE_PRODUCT_FLAG(type, name, value, doc) type name = value; |
3902 #define MATERIALIZE_PRODUCT_FLAG(type, name, value, doc) type name = value; |
3886 #define MATERIALIZE_PD_PRODUCT_FLAG(type, name, doc) type name = pd_##name; |
3903 #define MATERIALIZE_PD_PRODUCT_FLAG(type, name, doc) type name = pd_##name; |
|
3904 #define MATERIALIZE_COMMERCIAL_FLAG(type, name, value, doc) type name = value; |
3887 #define MATERIALIZE_DIAGNOSTIC_FLAG(type, name, value, doc) type name = value; |
3905 #define MATERIALIZE_DIAGNOSTIC_FLAG(type, name, value, doc) type name = value; |
3888 #define MATERIALIZE_EXPERIMENTAL_FLAG(type, name, value, doc) type name = value; |
3906 #define MATERIALIZE_EXPERIMENTAL_FLAG(type, name, value, doc) type name = value; |
3889 #define MATERIALIZE_MANAGEABLE_FLAG(type, name, value, doc) type name = value; |
3907 #define MATERIALIZE_MANAGEABLE_FLAG(type, name, value, doc) type name = value; |
3890 #define MATERIALIZE_PRODUCT_RW_FLAG(type, name, value, doc) type name = value; |
3908 #define MATERIALIZE_PRODUCT_RW_FLAG(type, name, value, doc) type name = value; |
3891 #ifdef PRODUCT |
3909 #ifdef PRODUCT |
3901 #define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc) type name = value; |
3919 #define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc) type name = value; |
3902 #else |
3920 #else |
3903 #define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc) /* flag is constant */ |
3921 #define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc) /* flag is constant */ |
3904 #endif // _LP64 |
3922 #endif // _LP64 |
3905 |
3923 |
3906 RUNTIME_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_EXPERIMENTAL_FLAG, DECLARE_NOTPRODUCT_FLAG, DECLARE_MANAGEABLE_FLAG, DECLARE_PRODUCT_RW_FLAG, DECLARE_LP64_PRODUCT_FLAG) |
3924 RUNTIME_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_COMMERCIAL_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_EXPERIMENTAL_FLAG, DECLARE_NOTPRODUCT_FLAG, DECLARE_MANAGEABLE_FLAG, DECLARE_PRODUCT_RW_FLAG, DECLARE_LP64_PRODUCT_FLAG) |
3907 |
3925 |
3908 RUNTIME_OS_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_NOTPRODUCT_FLAG) |
3926 RUNTIME_OS_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_NOTPRODUCT_FLAG) |
3909 |
3927 |
3910 #endif // SHARE_VM_RUNTIME_GLOBALS_HPP |
3928 #endif // SHARE_VM_RUNTIME_GLOBALS_HPP |