hotspot/src/share/vm/runtime/globals.hpp
changeset 38273 2634194d7555
parent 38260 323c101e15af
child 38289 96e35aced4ef
equal deleted inserted replaced
38267:29feb145a316 38273:2634194d7555
   278     OUT_OF_BOUNDS,
   278     OUT_OF_BOUNDS,
   279     // flag value violates its constraint
   279     // flag value violates its constraint
   280     VIOLATES_CONSTRAINT,
   280     VIOLATES_CONSTRAINT,
   281     // there is no flag with the given name
   281     // there is no flag with the given name
   282     INVALID_FLAG,
   282     INVALID_FLAG,
       
   283     // the flag can only be set only on command line during invocation of the VM
       
   284     COMMAND_LINE_ONLY,
       
   285     // the flag may only be set once
       
   286     SET_ONLY_ONCE,
       
   287     // the flag is not writable in this combination of product/debug build
       
   288     CONSTANT,
   283     // other, unspecified error related to setting the flag
   289     // other, unspecified error related to setting the flag
   284     ERR_OTHER
   290     ERR_OTHER
   285   };
   291   };
   286 
   292 
   287   enum MsgType {
   293   enum MsgType {
   314   static const char* get_uintx_default_range_str();
   320   static const char* get_uintx_default_range_str();
   315   static const char* get_uint64_t_default_range_str();
   321   static const char* get_uint64_t_default_range_str();
   316   static const char* get_size_t_default_range_str();
   322   static const char* get_size_t_default_range_str();
   317   static const char* get_double_default_range_str();
   323   static const char* get_double_default_range_str();
   318 
   324 
   319   void check_writable();
   325   Flag::Error check_writable(bool changed);
   320 
   326 
   321   bool is_bool() const;
   327   bool is_bool() const;
   322   bool get_bool() const;
   328   bool get_bool() const;
   323   void set_bool(bool value);
   329   Flag::Error set_bool(bool value);
   324 
   330 
   325   bool is_int() const;
   331   bool is_int() const;
   326   int get_int() const;
   332   int get_int() const;
   327   void set_int(int value);
   333   Flag::Error set_int(int value);
   328 
   334 
   329   bool is_uint() const;
   335   bool is_uint() const;
   330   uint get_uint() const;
   336   uint get_uint() const;
   331   void set_uint(uint value);
   337   Flag::Error set_uint(uint value);
   332 
   338 
   333   bool is_intx() const;
   339   bool is_intx() const;
   334   intx get_intx() const;
   340   intx get_intx() const;
   335   void set_intx(intx value);
   341   Flag::Error set_intx(intx value);
   336 
   342 
   337   bool is_uintx() const;
   343   bool is_uintx() const;
   338   uintx get_uintx() const;
   344   uintx get_uintx() const;
   339   void set_uintx(uintx value);
   345   Flag::Error set_uintx(uintx value);
   340 
   346 
   341   bool is_uint64_t() const;
   347   bool is_uint64_t() const;
   342   uint64_t get_uint64_t() const;
   348   uint64_t get_uint64_t() const;
   343   void set_uint64_t(uint64_t value);
   349   Flag::Error set_uint64_t(uint64_t value);
   344 
   350 
   345   bool is_size_t() const;
   351   bool is_size_t() const;
   346   size_t get_size_t() const;
   352   size_t get_size_t() const;
   347   void set_size_t(size_t value);
   353   Flag::Error set_size_t(size_t value);
   348 
   354 
   349   bool is_double() const;
   355   bool is_double() const;
   350   double get_double() const;
   356   double get_double() const;
   351   void set_double(double value);
   357   Flag::Error set_double(double value);
   352 
   358 
   353   bool is_ccstr() const;
   359   bool is_ccstr() const;
   354   bool ccstr_accumulates() const;
   360   bool ccstr_accumulates() const;
   355   ccstr get_ccstr() const;
   361   ccstr get_ccstr() const;
   356   void set_ccstr(ccstr value);
   362   Flag::Error set_ccstr(ccstr value);
   357 
   363 
   358   Flags get_origin();
   364   Flags get_origin();
   359   void set_origin(Flags origin);
   365   void set_origin(Flags origin);
   360 
   366 
   361   bool is_default();
   367   bool is_default();
   619 //    checking code if provided - see commandLineFlagRangeList.hpp
   625 //    checking code if provided - see commandLineFlagRangeList.hpp
   620 //
   626 //
   621 // constraint is a macro that will expand to custom function call
   627 // constraint is a macro that will expand to custom function call
   622 //    for constraint checking if provided - see commandLineFlagConstraintList.hpp
   628 //    for constraint checking if provided - see commandLineFlagConstraintList.hpp
   623 //
   629 //
   624 
   630 // writeable is a macro that controls if and how the value can change during the runtime
   625 #define RUNTIME_FLAGS(develop, develop_pd, product, product_pd, diagnostic, experimental, notproduct, manageable, product_rw, lp64_product, range, constraint) \
   631 //
       
   632 // writeable(Always) is optional and allows the flag to have its value changed
       
   633 //    without any limitations at any time
       
   634 //
       
   635 // writeable(Once) flag value's can be only set once during the lifetime of VM
       
   636 //
       
   637 // writeable(CommandLineOnly) flag value's can be only set from command line
       
   638 //    (multiple times allowed)
       
   639 //
       
   640 
       
   641 
       
   642 #define RUNTIME_FLAGS(develop, \
       
   643                       develop_pd, \
       
   644                       product, \
       
   645                       product_pd, \
       
   646                       diagnostic, \
       
   647                       experimental, \
       
   648                       notproduct, \
       
   649                       manageable, \
       
   650                       product_rw, \
       
   651                       lp64_product, \
       
   652                       range, \
       
   653                       constraint, \
       
   654                       writeable) \
   626                                                                             \
   655                                                                             \
   627   lp64_product(bool, UseCompressedOops, false,                              \
   656   lp64_product(bool, UseCompressedOops, false,                              \
   628           "Use 32-bit object references in 64-bit VM. "                     \
   657           "Use 32-bit object references in 64-bit VM. "                     \
   629           "lp64_product means flag is always constant in 32 bit VM")        \
   658           "lp64_product means flag is always constant in 32 bit VM")        \
   630                                                                             \
   659                                                                             \
  4183 // Only materialize src code for range checking when required, ignore otherwise
  4212 // Only materialize src code for range checking when required, ignore otherwise
  4184 #define IGNORE_RANGE(a, b)
  4213 #define IGNORE_RANGE(a, b)
  4185 // Only materialize src code for contraint checking when required, ignore otherwise
  4214 // Only materialize src code for contraint checking when required, ignore otherwise
  4186 #define IGNORE_CONSTRAINT(func,type)
  4215 #define IGNORE_CONSTRAINT(func,type)
  4187 
  4216 
       
  4217 #define IGNORE_WRITEABLE(type)
       
  4218 
  4188 RUNTIME_FLAGS(DECLARE_DEVELOPER_FLAG, \
  4219 RUNTIME_FLAGS(DECLARE_DEVELOPER_FLAG, \
  4189               DECLARE_PD_DEVELOPER_FLAG, \
  4220               DECLARE_PD_DEVELOPER_FLAG, \
  4190               DECLARE_PRODUCT_FLAG, \
  4221               DECLARE_PRODUCT_FLAG, \
  4191               DECLARE_PD_PRODUCT_FLAG, \
  4222               DECLARE_PD_PRODUCT_FLAG, \
  4192               DECLARE_DIAGNOSTIC_FLAG, \
  4223               DECLARE_DIAGNOSTIC_FLAG, \
  4194               DECLARE_NOTPRODUCT_FLAG, \
  4225               DECLARE_NOTPRODUCT_FLAG, \
  4195               DECLARE_MANAGEABLE_FLAG, \
  4226               DECLARE_MANAGEABLE_FLAG, \
  4196               DECLARE_PRODUCT_RW_FLAG, \
  4227               DECLARE_PRODUCT_RW_FLAG, \
  4197               DECLARE_LP64_PRODUCT_FLAG, \
  4228               DECLARE_LP64_PRODUCT_FLAG, \
  4198               IGNORE_RANGE, \
  4229               IGNORE_RANGE, \
  4199               IGNORE_CONSTRAINT)
  4230               IGNORE_CONSTRAINT, \
       
  4231               IGNORE_WRITEABLE)
  4200 
  4232 
  4201 RUNTIME_OS_FLAGS(DECLARE_DEVELOPER_FLAG, \
  4233 RUNTIME_OS_FLAGS(DECLARE_DEVELOPER_FLAG, \
  4202                  DECLARE_PD_DEVELOPER_FLAG, \
  4234                  DECLARE_PD_DEVELOPER_FLAG, \
  4203                  DECLARE_PRODUCT_FLAG, \
  4235                  DECLARE_PRODUCT_FLAG, \
  4204                  DECLARE_PD_PRODUCT_FLAG, \
  4236                  DECLARE_PD_PRODUCT_FLAG, \
  4205                  DECLARE_DIAGNOSTIC_FLAG, \
  4237                  DECLARE_DIAGNOSTIC_FLAG, \
  4206                  DECLARE_NOTPRODUCT_FLAG, \
  4238                  DECLARE_NOTPRODUCT_FLAG, \
  4207                  IGNORE_RANGE, \
  4239                  IGNORE_RANGE, \
  4208                  IGNORE_CONSTRAINT)
  4240                  IGNORE_CONSTRAINT, \
       
  4241                  IGNORE_WRITEABLE)
  4209 
  4242 
  4210 ARCH_FLAGS(DECLARE_DEVELOPER_FLAG, \
  4243 ARCH_FLAGS(DECLARE_DEVELOPER_FLAG, \
  4211            DECLARE_PRODUCT_FLAG, \
  4244            DECLARE_PRODUCT_FLAG, \
  4212            DECLARE_DIAGNOSTIC_FLAG, \
  4245            DECLARE_DIAGNOSTIC_FLAG, \
  4213            DECLARE_EXPERIMENTAL_FLAG, \
  4246            DECLARE_EXPERIMENTAL_FLAG, \
  4214            DECLARE_NOTPRODUCT_FLAG, \
  4247            DECLARE_NOTPRODUCT_FLAG, \
  4215            IGNORE_RANGE, \
  4248            IGNORE_RANGE, \
  4216            IGNORE_CONSTRAINT)
  4249            IGNORE_CONSTRAINT, \
       
  4250            IGNORE_WRITEABLE)
  4217 
  4251 
  4218 // Extensions
  4252 // Extensions
  4219 
  4253 
  4220 #include "runtime/globals_ext.hpp"
  4254 #include "runtime/globals_ext.hpp"
  4221 
  4255