< prev index next >

src/share/vm/runtime/commandLineFlagConstraintList.cpp

Print this page




  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 #include "precompiled.hpp"
  26 #include "classfile/stringTable.hpp"
  27 #include "classfile/symbolTable.hpp"
  28 #include "gc/shared/referenceProcessor.hpp"
  29 #include "runtime/arguments.hpp"
  30 #include "runtime/commandLineFlagConstraintList.hpp"
  31 #include "runtime/commandLineFlagConstraintsCompiler.hpp"
  32 #include "runtime/commandLineFlagConstraintsGC.hpp"
  33 #include "runtime/commandLineFlagConstraintsRuntime.hpp"
  34 #include "runtime/os.hpp"
  35 #include "utilities/macros.hpp"
  36 #if INCLUDE_JVMCI
  37 #include "jvmci/commandLineFlagConstraintsJVMCI.hpp"
  38 #endif
  39 
  40 class CommandLineFlagConstraint_bool : public CommandLineFlagConstraint {
  41   CommandLineFlagConstraintFunc_bool _constraint;
  42 
  43 public:
  44   // the "name" argument must be a string literal
  45   CommandLineFlagConstraint_bool(const char* name,
  46                                  CommandLineFlagConstraintFunc_bool func,
  47                                  ConstraintType type) : CommandLineFlagConstraint(name, type) {
  48     _constraint=func;
  49   }
  50 
  51   Flag::Error apply_bool(bool value, bool verbose) {
  52     return _constraint(value, verbose);
  53   }
  54 };
  55 
  56 class CommandLineFlagConstraint_int : public CommandLineFlagConstraint {
  57   CommandLineFlagConstraintFunc_int _constraint;
  58 


 237                                         EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
 238                                         EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
 239                                         EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
 240                                         EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
 241                                         EMIT_CONSTRAINT_MANAGEABLE_FLAG,
 242                                         EMIT_CONSTRAINT_PRODUCT_RW_FLAG,
 243                                         EMIT_CONSTRAINT_LP64_PRODUCT_FLAG,
 244                                         IGNORE_RANGE,
 245                                         EMIT_CONSTRAINT_CHECK));
 246 
 247   EMIT_CONSTRAINTS_FOR_GLOBALS_EXT
 248 
 249   emit_constraint_no(NULL ARCH_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG,
 250                                      EMIT_CONSTRAINT_PRODUCT_FLAG,
 251                                      EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
 252                                      EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
 253                                      EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
 254                                      IGNORE_RANGE,
 255                                      EMIT_CONSTRAINT_CHECK));
 256 
 257 #if INCLUDE_JVMCI
 258   emit_constraint_no(NULL JVMCI_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG,
 259                                       EMIT_CONSTRAINT_PD_DEVELOPER_FLAG,
 260                                       EMIT_CONSTRAINT_PRODUCT_FLAG,
 261                                       EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
 262                                       EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
 263                                       EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
 264                                       EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
 265                                       IGNORE_RANGE,
 266                                       EMIT_CONSTRAINT_CHECK));
 267 #endif // INCLUDE_JVMCI
 268 
 269 #ifdef COMPILER1
 270   emit_constraint_no(NULL C1_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG,
 271                                    EMIT_CONSTRAINT_PD_DEVELOPER_FLAG,
 272                                    EMIT_CONSTRAINT_PRODUCT_FLAG,
 273                                    EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
 274                                    EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
 275                                    EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
 276                                    IGNORE_RANGE,
 277                                    EMIT_CONSTRAINT_CHECK));
 278 #endif // COMPILER1
 279 
 280 #ifdef COMPILER2
 281   emit_constraint_no(NULL C2_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG,
 282                                    EMIT_CONSTRAINT_PD_DEVELOPER_FLAG,
 283                                    EMIT_CONSTRAINT_PRODUCT_FLAG,
 284                                    EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
 285                                    EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
 286                                    EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
 287                                    EMIT_CONSTRAINT_NOTPRODUCT_FLAG,




  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 #include "precompiled.hpp"
  26 #include "classfile/stringTable.hpp"
  27 #include "classfile/symbolTable.hpp"
  28 #include "gc/shared/referenceProcessor.hpp"
  29 #include "runtime/arguments.hpp"
  30 #include "runtime/commandLineFlagConstraintList.hpp"
  31 #include "runtime/commandLineFlagConstraintsCompiler.hpp"
  32 #include "runtime/commandLineFlagConstraintsGC.hpp"
  33 #include "runtime/commandLineFlagConstraintsRuntime.hpp"
  34 #include "runtime/os.hpp"
  35 #include "utilities/macros.hpp"



  36 
  37 class CommandLineFlagConstraint_bool : public CommandLineFlagConstraint {
  38   CommandLineFlagConstraintFunc_bool _constraint;
  39 
  40 public:
  41   // the "name" argument must be a string literal
  42   CommandLineFlagConstraint_bool(const char* name,
  43                                  CommandLineFlagConstraintFunc_bool func,
  44                                  ConstraintType type) : CommandLineFlagConstraint(name, type) {
  45     _constraint=func;
  46   }
  47 
  48   Flag::Error apply_bool(bool value, bool verbose) {
  49     return _constraint(value, verbose);
  50   }
  51 };
  52 
  53 class CommandLineFlagConstraint_int : public CommandLineFlagConstraint {
  54   CommandLineFlagConstraintFunc_int _constraint;
  55 


 234                                         EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
 235                                         EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
 236                                         EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
 237                                         EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
 238                                         EMIT_CONSTRAINT_MANAGEABLE_FLAG,
 239                                         EMIT_CONSTRAINT_PRODUCT_RW_FLAG,
 240                                         EMIT_CONSTRAINT_LP64_PRODUCT_FLAG,
 241                                         IGNORE_RANGE,
 242                                         EMIT_CONSTRAINT_CHECK));
 243 
 244   EMIT_CONSTRAINTS_FOR_GLOBALS_EXT
 245 
 246   emit_constraint_no(NULL ARCH_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG,
 247                                      EMIT_CONSTRAINT_PRODUCT_FLAG,
 248                                      EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
 249                                      EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
 250                                      EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
 251                                      IGNORE_RANGE,
 252                                      EMIT_CONSTRAINT_CHECK));
 253 











 254 
 255 #ifdef COMPILER1
 256   emit_constraint_no(NULL C1_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG,
 257                                    EMIT_CONSTRAINT_PD_DEVELOPER_FLAG,
 258                                    EMIT_CONSTRAINT_PRODUCT_FLAG,
 259                                    EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
 260                                    EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
 261                                    EMIT_CONSTRAINT_NOTPRODUCT_FLAG,
 262                                    IGNORE_RANGE,
 263                                    EMIT_CONSTRAINT_CHECK));
 264 #endif // COMPILER1
 265 
 266 #ifdef COMPILER2
 267   emit_constraint_no(NULL C2_FLAGS(EMIT_CONSTRAINT_DEVELOPER_FLAG,
 268                                    EMIT_CONSTRAINT_PD_DEVELOPER_FLAG,
 269                                    EMIT_CONSTRAINT_PRODUCT_FLAG,
 270                                    EMIT_CONSTRAINT_PD_PRODUCT_FLAG,
 271                                    EMIT_CONSTRAINT_DIAGNOSTIC_FLAG,
 272                                    EMIT_CONSTRAINT_EXPERIMENTAL_FLAG,
 273                                    EMIT_CONSTRAINT_NOTPRODUCT_FLAG,


< prev index next >