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 are not meant for VM tuning or for product modes. |
376 // Note: Diagnostic options 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. |
|
391 // |
385 // |
392 // experimental flags are in support of features that are not |
386 // experimental flags are in support of features that are not |
393 // part of the officially supported product, but are available |
387 // part of the officially supported product, but are available |
394 // for experimenting with. They could, for example, be performance |
388 // for experimenting with. They could, for example, be performance |
395 // features that may not have undergone full or rigorous QA, but which may |
389 // features that may not have undergone full or rigorous QA, but which may |
432 // and not reuse state related to the flag state at any given time. |
426 // and not reuse state related to the flag state at any given time. |
433 // |
427 // |
434 // Note that when there is a need to support develop flags to be writeable, |
428 // Note that when there is a need to support develop flags to be writeable, |
435 // it can be done in the same way as product_rw. |
429 // it can be done in the same way as product_rw. |
436 |
430 |
437 #define RUNTIME_FLAGS(develop, develop_pd, product, product_pd, commercial, diagnostic, experimental, notproduct, manageable, product_rw, lp64_product) \ |
431 #define RUNTIME_FLAGS(develop, develop_pd, product, product_pd, diagnostic, experimental, notproduct, manageable, product_rw, lp64_product) \ |
438 \ |
432 \ |
439 lp64_product(bool, UseCompressedOops, false, \ |
433 lp64_product(bool, UseCompressedOops, false, \ |
440 "Use 32-bit object references in 64-bit VM. " \ |
434 "Use 32-bit object references in 64-bit VM. " \ |
441 "lp64_product means flag is always constant in 32 bit VM") \ |
435 "lp64_product means flag is always constant in 32 bit VM") \ |
442 \ |
436 \ |
466 "Use lwsync instruction if true, else use slower sync") \ |
460 "Use lwsync instruction if true, else use slower sync") \ |
467 \ |
461 \ |
468 develop(bool, CleanChunkPoolAsync, falseInEmbedded, \ |
462 develop(bool, CleanChunkPoolAsync, falseInEmbedded, \ |
469 "Whether to clean the chunk pool asynchronously") \ |
463 "Whether to clean the chunk pool asynchronously") \ |
470 \ |
464 \ |
471 /* Temporary: See 6948537 */ \ |
465 /* Temporary: See 6948537 */ \ |
472 experimental(bool, UseMemSetInBOT, true, \ |
466 experimental(bool, UseMemSetInBOT, true, \ |
473 "(Unstable) uses memset in BOT updates in GC code") \ |
467 "(Unstable) uses memset in BOT updates in GC code") \ |
474 \ |
468 \ |
475 commercial(bool, UnlockCommercialVMOptions, false, \ |
|
476 "Enable normal processing of flags relating to commercial " \ |
|
477 "features") \ |
|
478 \ |
|
479 diagnostic(bool, UnlockDiagnosticVMOptions, trueInDebug, \ |
469 diagnostic(bool, UnlockDiagnosticVMOptions, trueInDebug, \ |
480 "Enable normal processing of flags relating to field diagnostics")\ |
470 "Enable normal processing of flags relating to field diagnostics")\ |
481 \ |
471 \ |
482 experimental(bool, UnlockExperimentalVMOptions, false, \ |
472 experimental(bool, UnlockExperimentalVMOptions, false, \ |
483 "Enable normal processing of flags relating to experimental " \ |
473 "Enable normal processing of flags relating to experimental features")\ |
484 "features") \ |
|
485 \ |
474 \ |
486 product(bool, JavaMonitorsInStackTrace, true, \ |
475 product(bool, JavaMonitorsInStackTrace, true, \ |
487 "Print info. about Java monitor locks when the stacks are dumped")\ |
476 "Print info. about Java monitor locks when the stacks are dumped")\ |
488 \ |
477 \ |
489 product_pd(bool, UseLargePages, \ |
478 product_pd(bool, UseLargePages, \ |
587 \ |
576 \ |
588 develop(bool, VerifyStack, false, \ |
577 develop(bool, VerifyStack, false, \ |
589 "Verify stack of each thread when it is entering a runtime call") \ |
578 "Verify stack of each thread when it is entering a runtime call") \ |
590 \ |
579 \ |
591 diagnostic(bool, ForceUnreachable, false, \ |
580 diagnostic(bool, ForceUnreachable, false, \ |
592 "Make all non code cache addresses unreachable by forcing use of "\ |
581 "Make all non code cache addresses to be unreachable with forcing use of 64bit literal fixups") \ |
593 "64-bit literal fixups") \ |
|
594 \ |
582 \ |
595 notproduct(bool, StressDerivedPointers, false, \ |
583 notproduct(bool, StressDerivedPointers, false, \ |
596 "Force scavenge when a derived pointers is detected on stack " \ |
584 "Force scavenge when a derived pointers is detected on stack " \ |
597 "after rtm call") \ |
585 "after rtm call") \ |
598 \ |
586 \ |
3862 "Number of buckets in the interned String table") \ |
3850 "Number of buckets in the interned String table") \ |
3863 \ |
3851 \ |
3864 product(bool, UseVMInterruptibleIO, false, \ |
3852 product(bool, UseVMInterruptibleIO, false, \ |
3865 "(Unstable, Solaris-specific) Thread interrupt before or with " \ |
3853 "(Unstable, Solaris-specific) Thread interrupt before or with " \ |
3866 "EINTR for I/O operations results in OS_INTRPT. The default value"\ |
3854 "EINTR for I/O operations results in OS_INTRPT. The default value"\ |
3867 " of this flag is true for JDK 6 and earlier") \ |
3855 " of this flag is true for JDK 6 and earliers") |
3868 \ |
|
3869 commercial(bool, FlightRecorder, false, \ |
|
3870 "Enable Java Flight Recorder") |
|
3871 |
|
3872 |
3856 |
3873 /* |
3857 /* |
3874 * Macros for factoring of globals |
3858 * Macros for factoring of globals |
3875 */ |
3859 */ |
3876 |
3860 |
3877 // Interface macros |
3861 // Interface macros |
3878 #define DECLARE_PRODUCT_FLAG(type, name, value, doc) extern "C" type name; |
3862 #define DECLARE_PRODUCT_FLAG(type, name, value, doc) extern "C" type name; |
3879 #define DECLARE_PD_PRODUCT_FLAG(type, name, doc) extern "C" type name; |
3863 #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; |
|
3881 #define DECLARE_DIAGNOSTIC_FLAG(type, name, value, doc) extern "C" type name; |
3864 #define DECLARE_DIAGNOSTIC_FLAG(type, name, value, doc) extern "C" type name; |
3882 #define DECLARE_EXPERIMENTAL_FLAG(type, name, value, doc) extern "C" type name; |
3865 #define DECLARE_EXPERIMENTAL_FLAG(type, name, value, doc) extern "C" type name; |
3883 #define DECLARE_MANAGEABLE_FLAG(type, name, value, doc) extern "C" type name; |
3866 #define DECLARE_MANAGEABLE_FLAG(type, name, value, doc) extern "C" type name; |
3884 #define DECLARE_PRODUCT_RW_FLAG(type, name, value, doc) extern "C" type name; |
3867 #define DECLARE_PRODUCT_RW_FLAG(type, name, value, doc) extern "C" type name; |
3885 #ifdef PRODUCT |
3868 #ifdef PRODUCT |
3899 #endif // _LP64 |
3882 #endif // _LP64 |
3900 |
3883 |
3901 // Implementation macros |
3884 // Implementation macros |
3902 #define MATERIALIZE_PRODUCT_FLAG(type, name, value, doc) type name = value; |
3885 #define MATERIALIZE_PRODUCT_FLAG(type, name, value, doc) type name = value; |
3903 #define MATERIALIZE_PD_PRODUCT_FLAG(type, name, doc) type name = pd_##name; |
3886 #define MATERIALIZE_PD_PRODUCT_FLAG(type, name, doc) type name = pd_##name; |
3904 #define MATERIALIZE_COMMERCIAL_FLAG(type, name, value, doc) type name = value; |
|
3905 #define MATERIALIZE_DIAGNOSTIC_FLAG(type, name, value, doc) type name = value; |
3887 #define MATERIALIZE_DIAGNOSTIC_FLAG(type, name, value, doc) type name = value; |
3906 #define MATERIALIZE_EXPERIMENTAL_FLAG(type, name, value, doc) type name = value; |
3888 #define MATERIALIZE_EXPERIMENTAL_FLAG(type, name, value, doc) type name = value; |
3907 #define MATERIALIZE_MANAGEABLE_FLAG(type, name, value, doc) type name = value; |
3889 #define MATERIALIZE_MANAGEABLE_FLAG(type, name, value, doc) type name = value; |
3908 #define MATERIALIZE_PRODUCT_RW_FLAG(type, name, value, doc) type name = value; |
3890 #define MATERIALIZE_PRODUCT_RW_FLAG(type, name, value, doc) type name = value; |
3909 #ifdef PRODUCT |
3891 #ifdef PRODUCT |
3919 #define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc) type name = value; |
3901 #define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc) type name = value; |
3920 #else |
3902 #else |
3921 #define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc) /* flag is constant */ |
3903 #define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc) /* flag is constant */ |
3922 #endif // _LP64 |
3904 #endif // _LP64 |
3923 |
3905 |
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) |
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) |
3925 |
3907 |
3926 RUNTIME_OS_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_NOTPRODUCT_FLAG) |
3908 RUNTIME_OS_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_NOTPRODUCT_FLAG) |
3927 |
3909 |
3928 #endif // SHARE_VM_RUNTIME_GLOBALS_HPP |
3910 #endif // SHARE_VM_RUNTIME_GLOBALS_HPP |