hotspot/src/share/vm/runtime/globals_extension.hpp
author twisti
Fri, 08 Jan 2010 11:09:46 +0100
changeset 4581 e89fbd1bcb3d
parent 4450 6d700b859b3e
child 5547 f4b087cbb361
permissions -rw-r--r--
6914206: change way of permission checking for generated MethodHandle adapters Summary: Put generated MH adapter in InvokeDynamic/MethodHandle classes to be able to indentify them easily in the compiler. Reviewed-by: kvn, never, jrose
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
670
ddf3e9583f2f 6719955: Update copyright year
xdono
parents: 360
diff changeset
     2
 * Copyright 2003-2008 Sun Microsystems, Inc.  All Rights Reserved.
1
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),
1382
fa3de4068282 6618726: Introduce -XX:+UnlockExperimentalVMOptions flag
ysr
parents: 1374
diff changeset
    33
#define RUNTIME_EXPERIMENTAL_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
#define RUNTIME_MANAGEABLE_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
#define RUNTIME_PRODUCT_RW_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
#ifdef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
  #define RUNTIME_DEVELOP_FLAG_MEMBER(type, name, value, doc)  /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
  #define RUNTIME_PD_DEVELOP_FLAG_MEMBER(type, name, doc)      /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
  #define RUNTIME_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
  #define RUNTIME_DEVELOP_FLAG_MEMBER(type, name, value, doc)  FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
  #define RUNTIME_PD_DEVELOP_FLAG_MEMBER(type, name, doc)      FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
  #define RUNTIME_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc) FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
#endif
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 186
diff changeset
    45
#ifdef _LP64
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 186
diff changeset
    46
#define RUNTIME_LP64_PRODUCT_FLAG_MEMBER(type, name, value, doc)    FLAG_MEMBER(name),
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 186
diff changeset
    47
#else
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 186
diff changeset
    48
#define RUNTIME_LP64_PRODUCT_FLAG_MEMBER(type, name, value, doc)    /* flag is constant */
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 186
diff changeset
    49
#endif // _LP64
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
#define C1_PRODUCT_FLAG_MEMBER(type, name, value, doc)         FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
#define C1_PD_PRODUCT_FLAG_MEMBER(type, name, doc)             FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
#ifdef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  #define C1_DEVELOP_FLAG_MEMBER(type, name, value, doc)       /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
  #define C1_PD_DEVELOP_FLAG_MEMBER(type, name, doc)           /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
  #define C1_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
  #define C1_DEVELOP_FLAG_MEMBER(type, name, value, doc)       FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
  #define C1_PD_DEVELOP_FLAG_MEMBER(type, name, doc)           FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
  #define C1_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc)    FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
#define C2_PRODUCT_FLAG_MEMBER(type, name, value, doc)         FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
#define C2_PD_PRODUCT_FLAG_MEMBER(type, name, doc)             FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
#define C2_DIAGNOSTIC_FLAG_MEMBER(type, name, value, doc)      FLAG_MEMBER(name),
4450
6d700b859b3e 6892658: C2 should optimize some stringbuilder patterns
never
parents: 4434
diff changeset
    67
#define C2_EXPERIMENTAL_FLAG_MEMBER(type, name, value, doc)    FLAG_MEMBER(name),
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
#ifdef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
  #define C2_DEVELOP_FLAG_MEMBER(type, name, value, doc)       /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  #define C2_PD_DEVELOP_FLAG_MEMBER(type, name, doc)           /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
  #define C2_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc)
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
  #define C2_DEVELOP_FLAG_MEMBER(type, name, value, doc)       FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
  #define C2_PD_DEVELOP_FLAG_MEMBER(type, name, doc)           FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
  #define C2_NOTPRODUCT_FLAG_MEMBER(type, name, value, doc)    FLAG_MEMBER(name),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
typedef enum {
1382
fa3de4068282 6618726: Introduce -XX:+UnlockExperimentalVMOptions flag
ysr
parents: 1374
diff changeset
    79
 RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_EXPERIMENTAL_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER, RUNTIME_MANAGEABLE_FLAG_MEMBER, RUNTIME_PRODUCT_RW_FLAG_MEMBER, RUNTIME_LP64_PRODUCT_FLAG_MEMBER)
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
    80
 RUNTIME_OS_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER)
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
    81
#ifndef KERNEL
1382
fa3de4068282 6618726: Introduce -XX:+UnlockExperimentalVMOptions flag
ysr
parents: 1374
diff changeset
    82
 G1_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_EXPERIMENTAL_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER, RUNTIME_MANAGEABLE_FLAG_MEMBER, RUNTIME_PRODUCT_RW_FLAG_MEMBER)
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
    83
#endif
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
#ifdef COMPILER1
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
    85
 C1_FLAGS(C1_DEVELOP_FLAG_MEMBER, C1_PD_DEVELOP_FLAG_MEMBER, C1_PRODUCT_FLAG_MEMBER, C1_PD_PRODUCT_FLAG_MEMBER, C1_NOTPRODUCT_FLAG_MEMBER)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
#ifdef COMPILER2
4450
6d700b859b3e 6892658: C2 should optimize some stringbuilder patterns
never
parents: 4434
diff changeset
    88
 C2_FLAGS(C2_DEVELOP_FLAG_MEMBER, C2_PD_DEVELOP_FLAG_MEMBER, C2_PRODUCT_FLAG_MEMBER, C2_PD_PRODUCT_FLAG_MEMBER, C2_DIAGNOSTIC_FLAG_MEMBER, C2_EXPERIMENTAL_FLAG_MEMBER, C2_NOTPRODUCT_FLAG_MEMBER)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
 NUM_CommandLineFlag
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
} CommandLineFlag;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
// Construct enum of Flag_<cmdline-arg>_<type> constants.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
#define FLAG_MEMBER_WITH_TYPE(flag,type) Flag_##flag##_##type
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
#define RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)    FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
#define RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc)        FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
    99
#define RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
1382
fa3de4068282 6618726: Introduce -XX:+UnlockExperimentalVMOptions flag
ysr
parents: 1374
diff changeset
   100
#define RUNTIME_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
#define RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE(type, name, value, doc) FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   102
#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
   103
#ifdef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
  #define RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)     /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
  #define RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc)         /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
  #define RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   108
  #define RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)     FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   109
  #define RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc)         FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
  #define RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)  FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
#define C1_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)         FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
#define C1_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc)             FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
#ifdef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
  #define C1_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)       /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
  #define C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc)           /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   118
  #define C1_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   119
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   120
  #define C1_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)       FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   121
  #define C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc)           FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   122
  #define C1_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)    FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   123
#endif
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 186
diff changeset
   124
#ifdef _LP64
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 186
diff changeset
   125
#define RUNTIME_LP64_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)    FLAG_MEMBER_WITH_TYPE(name,type),
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 186
diff changeset
   126
#else
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 186
diff changeset
   127
#define RUNTIME_LP64_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)    /* flag is constant */
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 186
diff changeset
   128
#endif // _LP64
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   129
489c9b5090e2 Initial load
duke
parents:
diff changeset
   130
489c9b5090e2 Initial load
duke
parents:
diff changeset
   131
#define C2_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)         FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   132
#define C2_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, doc)             FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   133
#define C2_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)      FLAG_MEMBER_WITH_TYPE(name,type),
4450
6d700b859b3e 6892658: C2 should optimize some stringbuilder patterns
never
parents: 4434
diff changeset
   134
#define C2_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)      FLAG_MEMBER_WITH_TYPE(name,type),
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   135
#ifdef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
   136
  #define C2_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)       /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   137
  #define C2_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc)           /* flag is constant */
489c9b5090e2 Initial load
duke
parents:
diff changeset
   138
  #define C2_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)
489c9b5090e2 Initial load
duke
parents:
diff changeset
   139
#else
489c9b5090e2 Initial load
duke
parents:
diff changeset
   140
  #define C2_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)       FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   141
  #define C2_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE(type, name, doc)           FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   142
  #define C2_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE(type, name, value, doc)    FLAG_MEMBER_WITH_TYPE(name,type),
489c9b5090e2 Initial load
duke
parents:
diff changeset
   143
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   144
489c9b5090e2 Initial load
duke
parents:
diff changeset
   145
typedef enum {
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   146
 RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   147
               RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   148
               RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   149
               RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   150
               RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
1382
fa3de4068282 6618726: Introduce -XX:+UnlockExperimentalVMOptions flag
ysr
parents: 1374
diff changeset
   151
               RUNTIME_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE,
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   152
               RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
489c9b5090e2 Initial load
duke
parents:
diff changeset
   153
               RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE,
360
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 186
diff changeset
   154
               RUNTIME_PRODUCT_RW_FLAG_MEMBER_WITH_TYPE,
21d113ecbf6a 6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
coleenp
parents: 186
diff changeset
   155
               RUNTIME_LP64_PRODUCT_FLAG_MEMBER_WITH_TYPE)
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   156
 RUNTIME_OS_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   157
                  RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   158
                  RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   159
                  RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   160
                  RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   161
                  RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE)
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   162
#ifndef KERNEL
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   163
 G1_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   164
          RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   165
          RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   166
          RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   167
          RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
1382
fa3de4068282 6618726: Introduce -XX:+UnlockExperimentalVMOptions flag
ysr
parents: 1374
diff changeset
   168
          RUNTIME_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE,
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   169
          RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   170
          RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   171
          RUNTIME_PRODUCT_RW_FLAG_MEMBER_WITH_TYPE)
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   172
#endif // KERNEL
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   173
#ifdef COMPILER1
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   174
 C1_FLAGS(C1_DEVELOP_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   175
          C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   176
          C1_PRODUCT_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   177
          C1_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   178
          C1_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   179
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   180
#ifdef COMPILER2
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   181
 C2_FLAGS(C2_DEVELOP_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   182
          C2_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   183
          C2_PRODUCT_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   184
          C2_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   185
          C2_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
4450
6d700b859b3e 6892658: C2 should optimize some stringbuilder patterns
never
parents: 4434
diff changeset
   186
          C2_EXPERIMENTAL_FLAG_MEMBER_WITH_TYPE,
1374
4c24294029a9 6711316: Open source the Garbage-First garbage collector
ysr
parents: 360
diff changeset
   187
          C2_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE)
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   188
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
   189
 NUM_CommandLineFlagWithType
489c9b5090e2 Initial load
duke
parents:
diff changeset
   190
} CommandLineFlagWithType;
489c9b5090e2 Initial load
duke
parents:
diff changeset
   191
489c9b5090e2 Initial load
duke
parents:
diff changeset
   192
#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
   193
#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
   194
#define FLAG_IS_CMDLINE(name)         (CommandLineFlagsEx::is_cmdline(FLAG_MEMBER(name)))
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   195
489c9b5090e2 Initial load
duke
parents:
diff changeset
   196
#define FLAG_SET_DEFAULT(name, value) ((name) = (value))
489c9b5090e2 Initial load
duke
parents:
diff changeset
   197
489c9b5090e2 Initial load
duke
parents:
diff changeset
   198
#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
   199
#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
   200
489c9b5090e2 Initial load
duke
parents:
diff changeset
   201
// Can't put the following in CommandLineFlags because
489c9b5090e2 Initial load
duke
parents:
diff changeset
   202
// of a circular dependency on the enum definition.
489c9b5090e2 Initial load
duke
parents:
diff changeset
   203
class CommandLineFlagsEx : CommandLineFlags {
489c9b5090e2 Initial load
duke
parents:
diff changeset
   204
 public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
   205
  static void boolAtPut(CommandLineFlagWithType flag, bool value, FlagValueOrigin origin);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   206
  static void intxAtPut(CommandLineFlagWithType flag, intx value, FlagValueOrigin origin);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   207
  static void uintxAtPut(CommandLineFlagWithType flag, uintx value, FlagValueOrigin origin);
4434
4b41e5b42f81 6887571: Increase default heap config sizes
phh
parents: 1388
diff changeset
   208
  static void uint64_tAtPut(CommandLineFlagWithType flag, uint64_t value, FlagValueOrigin origin);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   209
  static void doubleAtPut(CommandLineFlagWithType flag, double value, FlagValueOrigin origin);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   210
  static void ccstrAtPut(CommandLineFlagWithType flag, ccstr value, FlagValueOrigin origin);
489c9b5090e2 Initial load
duke
parents:
diff changeset
   211
489c9b5090e2 Initial load
duke
parents:
diff changeset
   212
  static bool is_default(CommandLineFlag flag);
186
32e6c95f8d9b 6557851: CMS: ergonomics defaults are not set with FLAG_SET_ERGO
jmasa
parents: 1
diff changeset
   213
  static bool is_ergo(CommandLineFlag flag);
32e6c95f8d9b 6557851: CMS: ergonomics defaults are not set with FLAG_SET_ERGO
jmasa
parents: 1
diff changeset
   214
  static bool is_cmdline(CommandLineFlag flag);
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   215
};