hotspot/src/share/vm/runtime/globals_extension.hpp
author jmasa
Sun, 02 Mar 2008 16:10:12 -0800
changeset 186 32e6c95f8d9b
parent 1 489c9b5090e2
child 360 21d113ecbf6a
permissions -rw-r--r--
6557851: CMS: ergonomics defaults are not set with FLAG_SET_ERGO Summary: Default values set by cms ergonomics are set with FLAG_SET_DEFAULT so down stream the values look like the default values and affect how later parameters are set. Set these values with FLAG_SET_ERGO instead and adjust how later parameters are interpreted. Reviewed-by: iveresov, apetrusenko, pbk, ysr
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
489c9b5090e2 Initial load
duke
parents:
diff changeset
     2
 * Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
 * have any questions.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
// Construct enum of Flag_<cmdline-arg> constants.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
// Parens left off in the following for the enum decl below.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
#define FLAG_MEMBER(flag) Flag_##flag
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
#define RUNTIME_PRODUCT_FLAG_MEMBER(type, name, value, doc)    FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
#define RUNTIME_PD_PRODUCT_FLAG_MEMBER(type, name, doc)        FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
#define RUNTIME_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
#define RUNTIME_MANAGEABLE_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
#define RUNTIME_PRODUCT_RW_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
#ifdef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
  #define RUNTIME_DEVELOP_FLAG_MEMBER(type, name, value, doc)  /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
  #define RUNTIME_PD_DEVELOP_FLAG_MEMBER(type, name, doc)      /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
  #define RUNTIME_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
  #define RUNTIME_DEVELOP_FLAG_MEMBER(type, name, value, doc)  FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
  #define RUNTIME_PD_DEVELOP_FLAG_MEMBER(type, name, doc)      FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
  #define RUNTIME_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
#define C1_PRODUCT_FLAG_MEMBER(type, name, value, doc)         FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
#define C1_PD_PRODUCT_FLAG_MEMBER(type, name, doc)             FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
#ifdef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
  #define C1_DEVELOP_FLAG_MEMBER(type, name, value, doc)       /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
  #define C1_PD_DEVELOP_FLAG_MEMBER(type, name, doc)           /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
  #define C1_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
  #define C1_DEVELOP_FLAG_MEMBER(type, name, value, doc)       FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
  #define C1_PD_DEVELOP_FLAG_MEMBER(type, name, doc)           FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  #define C1_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc)    FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
#define C2_PRODUCT_FLAG_MEMBER(type, name, value, doc)         FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
#define C2_PD_PRODUCT_FLAG_MEMBER(type, name, doc)             FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
#define C2_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc)      FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
#ifdef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
  #define C2_DEVELOP_FLAG_MEMBER(type, name, value, doc)       /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
  #define C2_PD_DEVELOP_FLAG_MEMBER(type, name, doc)           /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
  #define C2_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
  #define C2_DEVELOP_FLAG_MEMBER(type, name, value, doc)       FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
  #define C2_PD_DEVELOP_FLAG_MEMBER(type, name, doc)           FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
  #define C2_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc)    FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
typedef enum {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
 RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
               RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
               RUNTIME_NOTPRODUCT_FLAG_MEMBER, RUNTIME_MANAGEABLE_FLAG_MEMBER, RUNTIME_PRODUCT_RW_FLAG_MEMBER)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
 RUNTIME_OS_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
               RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
               RUNTIME_NOTPRODUCT_FLAG_MEMBER)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
#ifdef COMPILER1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
 C1_FLAGS(C1_DEVELOP_FLAG_MEMBER, C1_PD_DEVELOP_FLAG_MEMBER, C1_PRODUCT_FLAG_MEMBER, C1_PD_PRODUCT_FLAG_MEMBER,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
          C1_NOTPRODUCT_FLAG_MEMBER)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
#ifdef COMPILER2
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
 C2_FLAGS(C2_DEVELOP_FLAG_MEMBER, C2_PD_DEVELOP_FLAG_MEMBER, C2_PRODUCT_FLAG_MEMBER, C2_PD_PRODUCT_FLAG_MEMBER,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
          C2_DIAGNOSTIC_FLAG_MEMBER, C2_NOTPRODUCT_FLAG_MEMBER)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
 NUM_CommandLineFlag
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
} CommandLineFlag;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
// Construct enum of Flag_<cmdline-arg>_<type> constants.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
#define FLAG_MEMBER_WITH_TYPE(flag,type) Flag_##flag##_##type
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
#define RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)    FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
#define RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc)        FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
#define RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
#define RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
#define RUNTIME_PRODUCT_RW_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
#ifdef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
  #define RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)     /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
  #define RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc)         /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
  #define RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   103
  #define RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)     FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
  #define RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc)         FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
  #define RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)  FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
#define C1_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)         FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
#define C1_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc)             FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
#ifdef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
  #define C1_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)       /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
  #define C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc)           /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
  #define C1_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
  #define C1_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)       FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
  #define C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc)           FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
  #define C1_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)    FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
#define C2_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)         FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
#define C2_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc)             FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
#define C2_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)      FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   124
#ifdef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
   125
  #define C2_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)       /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   126
  #define C2_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc)           /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   127
  #define C2_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   128
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
  #define C2_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)       FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
  #define C2_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc)           FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
  #define C2_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)    FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
489c9b5090e2 Initial load
duke
parents:
diff changeset
   134
typedef enum {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
 RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE, RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
               RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE, RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
               RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
               RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
               RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
               RUNTIME_PRODUCT_RW_FLAG_MEMBER_WITH_TYPE)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
RUNTIME_OS_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE, RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
               RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE, RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
               RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
               RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
#ifdef COMPILER1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   146
 C1_FLAGS(C1_DEVELOP_FLAG_MEMBER_WITH_TYPE, C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE, C1_PRODUCT_FLAG_MEMBER_WITH_TYPE,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   147
          C1_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE, C1_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   148
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   149
#ifdef COMPILER2
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
 C2_FLAGS(C2_DEVELOP_FLAG_MEMBER_WITH_TYPE, C2_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE, C2_PRODUCT_FLAG_MEMBER_WITH_TYPE,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   151
          C2_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE, C2_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE, C2_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
 NUM_CommandLineFlagWithType
489c9b5090e2 Initial load
duke
parents:
diff changeset
   154
} CommandLineFlagWithType;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   155
489c9b5090e2 Initial load
duke
parents:
diff changeset
   156
#define FLAG_IS_DEFAULT(name)         (CommandLineFlagsEx::is_default(FLAG_MEMBER(name)))
186
32e6c95f8d9b 6557851: CMS: ergonomics defaults are not set with FLAG_SET_ERGO
jmasa
parents: 1
diff changeset
   157
#define FLAG_IS_ERGO(name)            (CommandLineFlagsEx::is_ergo(FLAG_MEMBER(name)))
32e6c95f8d9b 6557851: CMS: ergonomics defaults are not set with FLAG_SET_ERGO
jmasa
parents: 1
diff changeset
   158
#define FLAG_IS_CMDLINE(name)         (CommandLineFlagsEx::is_cmdline(FLAG_MEMBER(name)))
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   159
489c9b5090e2 Initial load
duke
parents:
diff changeset
   160
#define FLAG_SET_DEFAULT(name, value) ((name) = (value))
489c9b5090e2 Initial load
duke
parents:
diff changeset
   161
489c9b5090e2 Initial load
duke
parents:
diff changeset
   162
#define FLAG_SET_CMDLINE(type, name, value) (CommandLineFlagsEx::type##AtPut(FLAG_MEMBER_WITH_TYPE(name,type), (type)(value), COMMAND_LINE))
489c9b5090e2 Initial load
duke
parents:
diff changeset
   163
#define FLAG_SET_ERGO(type, name, value)    (CommandLineFlagsEx::type##AtPut(FLAG_MEMBER_WITH_TYPE(name,type), (type)(value), ERGONOMIC))
489c9b5090e2 Initial load
duke
parents:
diff changeset
   164
489c9b5090e2 Initial load
duke
parents:
diff changeset
   165
// Can't put the following in CommandLineFlags because
489c9b5090e2 Initial load
duke
parents:
diff changeset
   166
// of a circular dependency on the enum definition.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   167
class CommandLineFlagsEx : CommandLineFlags {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   168
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   169
  static void boolAtPut(CommandLineFlagWithType flag, bool value, FlagValueOrigin origin);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   170
  static void intxAtPut(CommandLineFlagWithType flag, intx value, FlagValueOrigin origin);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   171
  static void uintxAtPut(CommandLineFlagWithType flag, uintx value, FlagValueOrigin origin);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   172
  static void doubleAtPut(CommandLineFlagWithType flag, double value, FlagValueOrigin origin);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
  static void ccstrAtPut(CommandLineFlagWithType flag, ccstr value, FlagValueOrigin origin);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   174
489c9b5090e2 Initial load
duke
parents:
diff changeset
   175
  static bool is_default(CommandLineFlag flag);
186
32e6c95f8d9b 6557851: CMS: ergonomics defaults are not set with FLAG_SET_ERGO
jmasa
parents: 1
diff changeset
   176
  static bool is_ergo(CommandLineFlag flag);
32e6c95f8d9b 6557851: CMS: ergonomics defaults are not set with FLAG_SET_ERGO
jmasa
parents: 1
diff changeset
   177
  static bool is_cmdline(CommandLineFlag flag);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   178
};