// Check the ranges of all flags that have them
void CommandLineFlagRangeList::init(void) {

    _ranges = new (ResourceObj::C_HEAP, mtInternal) GrowableArray<CommandLineFlagRange*>(INITIAL_RANGES_SIZE, true);

    emit_range_no(NULL RUNTIME_FLAGS(EMIT_RANGE_DEVELOPER_FLAG,
                                     EMIT_RANGE_PD_DEVELOPER_FLAG,
                                     EMIT_RANGE_PRODUCT_FLAG,
                                     EMIT_RANGE_PD_PRODUCT_FLAG,
                                     EMIT_RANGE_DIAGNOSTIC_FLAG,
                                     EMIT_RANGE_EXPERIMENTAL_FLAG,
                                     EMIT_RANGE_NOTPRODUCT_FLAG,
                                     EMIT_RANGE_MANAGEABLE_FLAG,
                                     EMIT_RANGE_PRODUCT_RW_FLAG,
                                     EMIT_RANGE_LP64_PRODUCT_FLAG,
                                     EMIT_RANGE_CHECK,
                                     IGNORE_CONSTRAINT) );

    EMIT_RANGES_FOR_GLOBALS_EXT

    emit_range_no(NULL ARCH_FLAGS(EMIT_RANGE_DEVELOPER_FLAG,
                                  EMIT_RANGE_PRODUCT_FLAG,
                                  EMIT_RANGE_DIAGNOSTIC_FLAG,
                                  EMIT_RANGE_EXPERIMENTAL_FLAG,
                                  EMIT_RANGE_NOTPRODUCT_FLAG,
                                  EMIT_RANGE_CHECK,
                                  IGNORE_CONSTRAINT));

#if INCLUDE_JVMCI
    emit_range_no(NULL JVMCI_FLAGS(EMIT_RANGE_DEVELOPER_FLAG,
                                   EMIT_RANGE_PD_DEVELOPER_FLAG,
                                   EMIT_RANGE_PRODUCT_FLAG,
                                   EMIT_RANGE_PD_PRODUCT_FLAG,
                                   EMIT_RANGE_DIAGNOSTIC_FLAG,
                                   EMIT_RANGE_EXPERIMENTAL_FLAG,
                                   EMIT_RANGE_NOTPRODUCT_FLAG,
                                   EMIT_RANGE_CHECK,
                                   IGNORE_CONSTRAINT));
#endif // INCLUDE_JVMCI

#ifdef COMPILER1
    emit_range_no(NULL C1_FLAGS(EMIT_RANGE_DEVELOPER_FLAG,
                                EMIT_RANGE_PD_DEVELOPER_FLAG,
                                EMIT_RANGE_PRODUCT_FLAG,
                                EMIT_RANGE_PD_PRODUCT_FLAG,
                                EMIT_RANGE_DIAGNOSTIC_FLAG,
                                EMIT_RANGE_NOTPRODUCT_FLAG,
                                EMIT_RANGE_CHECK,
                                IGNORE_CONSTRAINT));
#endif // COMPILER1

#ifdef COMPILER2
    emit_range_no(NULL C2_FLAGS(EMIT_RANGE_DEVELOPER_FLAG,
                                EMIT_RANGE_PD_DEVELOPER_FLAG,
                                EMIT_RANGE_PRODUCT_FLAG,
                                EMIT_RANGE_PD_PRODUCT_FLAG,
                                EMIT_RANGE_DIAGNOSTIC_FLAG,
                                EMIT_RANGE_EXPERIMENTAL_FLAG,
                                EMIT_RANGE_NOTPRODUCT_FLAG,
                                EMIT_RANGE_CHECK,
                                IGNORE_CONSTRAINT));
#endif // COMPILER2

#if INCLUDE_ALL_GCS
    emit_range_no(NULL G1_FLAGS(EMIT_RANGE_DEVELOPER_FLAG,
                                EMIT_RANGE_PD_DEVELOPER_FLAG,
                                EMIT_RANGE_PRODUCT_FLAG,
                                EMIT_RANGE_PD_PRODUCT_FLAG,
                                EMIT_RANGE_DIAGNOSTIC_FLAG,
                                EMIT_RANGE_EXPERIMENTAL_FLAG,
                                EMIT_RANGE_NOTPRODUCT_FLAG,
                                EMIT_RANGE_MANAGEABLE_FLAG,
                                EMIT_RANGE_PRODUCT_RW_FLAG,
                                EMIT_RANGE_CHECK,
                                IGNORE_CONSTRAINT));
#endif // INCLUDE_ALL_GCS
}
Example #2
0
#if INCLUDE_ALL_GCS
 G1_FLAGS(RUNTIME_DEVELOP_FLAG_STRUCT, RUNTIME_PD_DEVELOP_FLAG_STRUCT, RUNTIME_PRODUCT_FLAG_STRUCT, RUNTIME_PD_PRODUCT_FLAG_STRUCT, RUNTIME_DIAGNOSTIC_FLAG_STRUCT, RUNTIME_EXPERIMENTAL_FLAG_STRUCT, RUNTIME_NOTPRODUCT_FLAG_STRUCT, RUNTIME_MANAGEABLE_FLAG_STRUCT, RUNTIME_PRODUCT_RW_FLAG_STRUCT)
#endif // INCLUDE_ALL_GCS
#ifdef COMPILER1
 C1_FLAGS(C1_DEVELOP_FLAG_STRUCT, C1_PD_DEVELOP_FLAG_STRUCT, C1_PRODUCT_FLAG_STRUCT, C1_PD_PRODUCT_FLAG_STRUCT, C1_NOTPRODUCT_FLAG_STRUCT)
#endif
#ifdef GRAAL
 GRAAL_FLAGS(GRAAL_DEVELOP_FLAG_STRUCT, GRAAL_PD_DEVELOP_FLAG_STRUCT, GRAAL_PRODUCT_FLAG_STRUCT, GRAAL_PD_PRODUCT_FLAG_STRUCT, GRAAL_NOTPRODUCT_FLAG_STRUCT)
#endif
#ifdef COMPILER2
 C2_FLAGS(C2_DEVELOP_FLAG_STRUCT, C2_PD_DEVELOP_FLAG_STRUCT, C2_PRODUCT_FLAG_STRUCT, C2_PD_PRODUCT_FLAG_STRUCT, C2_DIAGNOSTIC_FLAG_STRUCT, C2_EXPERIMENTAL_FLAG_STRUCT, C2_NOTPRODUCT_FLAG_STRUCT)
#endif
#ifdef SHARK
 SHARK_FLAGS(SHARK_DEVELOP_FLAG_STRUCT, SHARK_PD_DEVELOP_FLAG_STRUCT, SHARK_PRODUCT_FLAG_STRUCT, SHARK_PD_PRODUCT_FLAG_STRUCT, SHARK_DIAGNOSTIC_FLAG_STRUCT, SHARK_NOTPRODUCT_FLAG_STRUCT)
#endif
 ARCH_FLAGS(ARCH_DEVELOP_FLAG_STRUCT, ARCH_PRODUCT_FLAG_STRUCT, ARCH_DIAGNOSTIC_FLAG_STRUCT, ARCH_EXPERIMENTAL_FLAG_STRUCT, ARCH_NOTPRODUCT_FLAG_STRUCT)
 FLAGTABLE_EXT
 {0, NULL, NULL}
};

Flag* Flag::flags = flagTable;
size_t Flag::numFlags = (sizeof(flagTable) / sizeof(Flag));

inline bool str_equal(const char* s, const char* q, size_t len) {
  // s is null terminated, q is not!
  if (strlen(s) != (unsigned int) len) return false;
  return strncmp(s, q, len) == 0;
}

// Search the flag table for a named flag
Flag* Flag::find_flag(const char* name, size_t length, bool allow_locked) {
Example #3
0
          C2_NOTPRODUCT_FLAG_STRUCT, \
          IGNORE_RANGE, \
          IGNORE_CONSTRAINT)
#endif // COMPILER2
#ifdef SHARK
 SHARK_FLAGS(SHARK_DEVELOP_FLAG_STRUCT, \
             SHARK_PD_DEVELOP_FLAG_STRUCT, \
             SHARK_PRODUCT_FLAG_STRUCT, \
             SHARK_PD_PRODUCT_FLAG_STRUCT, \
             SHARK_DIAGNOSTIC_FLAG_STRUCT, \
             SHARK_NOTPRODUCT_FLAG_STRUCT)
#endif // SHARK
 ARCH_FLAGS(ARCH_DEVELOP_FLAG_STRUCT, \
            ARCH_PRODUCT_FLAG_STRUCT, \
            ARCH_DIAGNOSTIC_FLAG_STRUCT, \
            ARCH_EXPERIMENTAL_FLAG_STRUCT, \
            ARCH_NOTPRODUCT_FLAG_STRUCT, \
            IGNORE_RANGE, \
            IGNORE_CONSTRAINT)
 FLAGTABLE_EXT
 {0, NULL, NULL}
};

Flag* Flag::flags = flagTable;
size_t Flag::numFlags = (sizeof(flagTable) / sizeof(Flag));

inline bool str_equal(const char* s, const char* q, size_t len) {
  // s is null terminated, q is not!
  if (strlen(s) != (unsigned int) len) return false;
  return strncmp(s, q, len) == 0;
}