hotspot/src/share/vm/runtime/globals.hpp
changeset 1382 fa3de4068282
parent 1380 c6ace647ca84
child 1383 3a216aa862b7
equal deleted inserted replaced
1381:b204f54245d8 1382:fa3de4068282
   253 // are available in the product version of the VM.  Under instruction
   253 // are available in the product version of the VM.  Under instruction
   254 // from support engineers, VM customers can turn them on to collect
   254 // from support engineers, VM customers can turn them on to collect
   255 // diagnostic information about VM problems.  To use a VM diagnostic
   255 // diagnostic information about VM problems.  To use a VM diagnostic
   256 // option, you must first specify +UnlockDiagnosticVMOptions.
   256 // option, you must first specify +UnlockDiagnosticVMOptions.
   257 // (This master switch also affects the behavior of -Xprintflags.)
   257 // (This master switch also affects the behavior of -Xprintflags.)
   258 
   258 //
       
   259 // experimental flags are in support of features that are not
       
   260 //    part of the officially supported product, but are available
       
   261 //    for experimenting with. They could, for example, be performance
       
   262 //    features that may not have undergone full or rigorous QA, but which may
       
   263 //    help performance in some cases and released for experimentation
       
   264 //    by the community of users and developers. This flag also allows one to
       
   265 //    be able to build a fully supported product that nonetheless also
       
   266 //    ships with some unsupported, lightly tested, experimental features.
       
   267 //    Like the UnlockDiagnosticVMOptions flag above, there is a corresponding
       
   268 //    UnlockExperimentalVMOptions flag, which allows the control and
       
   269 //    modification of the experimental flags.
       
   270 //
   259 // manageable flags are writeable external product flags.
   271 // manageable flags are writeable external product flags.
   260 //    They are dynamically writeable through the JDK management interface
   272 //    They are dynamically writeable through the JDK management interface
   261 //    (com.sun.management.HotSpotDiagnosticMXBean API) and also through JConsole.
   273 //    (com.sun.management.HotSpotDiagnosticMXBean API) and also through JConsole.
   262 //    These flags are external exported interface (see CCC).  The list of
   274 //    These flags are external exported interface (see CCC).  The list of
   263 //    manageable flags can be queried programmatically through the management
   275 //    manageable flags can be queried programmatically through the management
   283 //      and not reuse state related to the flag state at any given time.
   295 //      and not reuse state related to the flag state at any given time.
   284 //
   296 //
   285 // Note that when there is a need to support develop flags to be writeable,
   297 // Note that when there is a need to support develop flags to be writeable,
   286 // it can be done in the same way as product_rw.
   298 // it can be done in the same way as product_rw.
   287 
   299 
   288 #define RUNTIME_FLAGS(develop, develop_pd, product, product_pd, diagnostic, notproduct, manageable, product_rw, lp64_product) \
   300 #define RUNTIME_FLAGS(develop, develop_pd, product, product_pd, diagnostic, experimental, notproduct, manageable, product_rw, lp64_product) \
   289                                                                             \
   301                                                                             \
   290   lp64_product(bool, UseCompressedOops, false,                              \
   302   lp64_product(bool, UseCompressedOops, false,                              \
   291             "Use 32-bit object references in 64-bit VM. "                   \
   303             "Use 32-bit object references in 64-bit VM. "                   \
   292             "lp64_product means flag is always constant in 32 bit VM")      \
   304             "lp64_product means flag is always constant in 32 bit VM")      \
   293                                                                             \
   305                                                                             \
   302                                                                             \
   314                                                                             \
   303   product(bool, PrintCommandLineFlags, false,                               \
   315   product(bool, PrintCommandLineFlags, false,                               \
   304           "Prints flags that appeared on the command line")                 \
   316           "Prints flags that appeared on the command line")                 \
   305                                                                             \
   317                                                                             \
   306   diagnostic(bool, UnlockDiagnosticVMOptions, trueInDebug,                  \
   318   diagnostic(bool, UnlockDiagnosticVMOptions, trueInDebug,                  \
   307           "Enable processing of flags relating to field diagnostics")       \
   319           "Enable normal processing of flags relating to field diagnostics")\
       
   320                                                                             \
       
   321   experimental(bool, UnlockExperimentalVMOptions, false,                    \
       
   322           "Enable normal processing of flags relating to experimental features")\
   308                                                                             \
   323                                                                             \
   309   product(bool, JavaMonitorsInStackTrace, true,                             \
   324   product(bool, JavaMonitorsInStackTrace, true,                             \
   310           "Print info. about Java monitor locks when the stacks are dumped")\
   325           "Print info. about Java monitor locks when the stacks are dumped")\
   311                                                                             \
   326                                                                             \
   312   product_pd(bool, UseLargePages,                                           \
   327   product_pd(bool, UseLargePages,                                           \
  1112   /* gc */                                                                  \
  1127   /* gc */                                                                  \
  1113                                                                             \
  1128                                                                             \
  1114   product(bool, UseSerialGC, false,                                         \
  1129   product(bool, UseSerialGC, false,                                         \
  1115           "Use the serial garbage collector")                               \
  1130           "Use the serial garbage collector")                               \
  1116                                                                             \
  1131                                                                             \
  1117   product(bool, UseG1GC, false,                                             \
  1132   experimental(bool, UseG1GC, false,                                        \
  1118           "Use the Garbage-First garbage collector")                        \
  1133           "Use the Garbage-First garbage collector")                        \
  1119                                                                             \
  1134                                                                             \
  1120   product(bool, UseParallelGC, false,                                       \
  1135   product(bool, UseParallelGC, false,                                       \
  1121           "Use the Parallel Scavenge garbage collector")                    \
  1136           "Use the Parallel Scavenge garbage collector")                    \
  1122                                                                             \
  1137                                                                             \
  3239 
  3254 
  3240 // Interface macros
  3255 // Interface macros
  3241 #define DECLARE_PRODUCT_FLAG(type, name, value, doc)    extern "C" type name;
  3256 #define DECLARE_PRODUCT_FLAG(type, name, value, doc)    extern "C" type name;
  3242 #define DECLARE_PD_PRODUCT_FLAG(type, name, doc)        extern "C" type name;
  3257 #define DECLARE_PD_PRODUCT_FLAG(type, name, doc)        extern "C" type name;
  3243 #define DECLARE_DIAGNOSTIC_FLAG(type, name, value, doc) extern "C" type name;
  3258 #define DECLARE_DIAGNOSTIC_FLAG(type, name, value, doc) extern "C" type name;
       
  3259 #define DECLARE_EXPERIMENTAL_FLAG(type, name, value, doc) extern "C" type name;
  3244 #define DECLARE_MANAGEABLE_FLAG(type, name, value, doc) extern "C" type name;
  3260 #define DECLARE_MANAGEABLE_FLAG(type, name, value, doc) extern "C" type name;
  3245 #define DECLARE_PRODUCT_RW_FLAG(type, name, value, doc) extern "C" type name;
  3261 #define DECLARE_PRODUCT_RW_FLAG(type, name, value, doc) extern "C" type name;
  3246 #ifdef PRODUCT
  3262 #ifdef PRODUCT
  3247 #define DECLARE_DEVELOPER_FLAG(type, name, value, doc)  const type name = value;
  3263 #define DECLARE_DEVELOPER_FLAG(type, name, value, doc)  const type name = value;
  3248 #define DECLARE_PD_DEVELOPER_FLAG(type, name, doc)      const type name = pd_##name;
  3264 #define DECLARE_PD_DEVELOPER_FLAG(type, name, doc)      const type name = pd_##name;
  3261 
  3277 
  3262 // Implementation macros
  3278 // Implementation macros
  3263 #define MATERIALIZE_PRODUCT_FLAG(type, name, value, doc)   type name = value;
  3279 #define MATERIALIZE_PRODUCT_FLAG(type, name, value, doc)   type name = value;
  3264 #define MATERIALIZE_PD_PRODUCT_FLAG(type, name, doc)       type name = pd_##name;
  3280 #define MATERIALIZE_PD_PRODUCT_FLAG(type, name, doc)       type name = pd_##name;
  3265 #define MATERIALIZE_DIAGNOSTIC_FLAG(type, name, value, doc) type name = value;
  3281 #define MATERIALIZE_DIAGNOSTIC_FLAG(type, name, value, doc) type name = value;
       
  3282 #define MATERIALIZE_EXPERIMENTAL_FLAG(type, name, value, doc) type name = value;
  3266 #define MATERIALIZE_MANAGEABLE_FLAG(type, name, value, doc) type name = value;
  3283 #define MATERIALIZE_MANAGEABLE_FLAG(type, name, value, doc) type name = value;
  3267 #define MATERIALIZE_PRODUCT_RW_FLAG(type, name, value, doc) type name = value;
  3284 #define MATERIALIZE_PRODUCT_RW_FLAG(type, name, value, doc) type name = value;
  3268 #ifdef PRODUCT
  3285 #ifdef PRODUCT
  3269 #define MATERIALIZE_DEVELOPER_FLAG(type, name, value, doc) /* flag name is constant */
  3286 #define MATERIALIZE_DEVELOPER_FLAG(type, name, value, doc) /* flag name is constant */
  3270 #define MATERIALIZE_PD_DEVELOPER_FLAG(type, name, doc)     /* flag name is constant */
  3287 #define MATERIALIZE_PD_DEVELOPER_FLAG(type, name, doc)     /* flag name is constant */
  3278 #define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc)   type name = value;
  3295 #define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc)   type name = value;
  3279 #else
  3296 #else
  3280 #define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc) /* flag is constant */
  3297 #define MATERIALIZE_LP64_PRODUCT_FLAG(type, name, value, doc) /* flag is constant */
  3281 #endif // _LP64
  3298 #endif // _LP64
  3282 
  3299 
  3283 RUNTIME_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_NOTPRODUCT_FLAG, DECLARE_MANAGEABLE_FLAG, DECLARE_PRODUCT_RW_FLAG, DECLARE_LP64_PRODUCT_FLAG)
  3300 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)
  3284 
  3301 
  3285 RUNTIME_OS_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_NOTPRODUCT_FLAG)
  3302 RUNTIME_OS_FLAGS(DECLARE_DEVELOPER_FLAG, DECLARE_PD_DEVELOPER_FLAG, DECLARE_PRODUCT_FLAG, DECLARE_PD_PRODUCT_FLAG, DECLARE_DIAGNOSTIC_FLAG, DECLARE_NOTPRODUCT_FLAG)