vmStructs.cpp 271.5 KB
Newer Older
D
duke 已提交
1
/*
C
coleenp 已提交
2
 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
D
duke 已提交
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 only, as
 * published by the Free Software Foundation.
 *
 * This code is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 * version 2 for more details (a copy is included in the LICENSE file that
 * accompanied this code).
 *
 * You should have received a copy of the GNU General Public License version
 * 2 along with this work; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 *
19 20 21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 * or visit www.oracle.com if you need additional information or have any
 * questions.
D
duke 已提交
22 23 24
 *
 */

25 26 27 28 29 30
#include "precompiled.hpp"
#include "classfile/dictionary.hpp"
#include "classfile/javaClasses.hpp"
#include "classfile/loaderConstraints.hpp"
#include "classfile/placeholders.hpp"
#include "classfile/systemDictionary.hpp"
N
never 已提交
31 32 33 34 35
#include "ci/ciField.hpp"
#include "ci/ciInstance.hpp"
#include "ci/ciObjArrayKlass.hpp"
#include "ci/ciMethodData.hpp"
#include "ci/ciSymbol.hpp"
36 37 38 39 40 41 42 43 44
#include "code/codeBlob.hpp"
#include "code/codeCache.hpp"
#include "code/compressedStream.hpp"
#include "code/location.hpp"
#include "code/nmethod.hpp"
#include "code/pcDesc.hpp"
#include "code/stubs.hpp"
#include "code/vmreg.hpp"
#include "compiler/oopMap.hpp"
N
never 已提交
45
#include "compiler/compileBroker.hpp"
46 47 48 49 50 51 52
#include "gc_implementation/shared/immutableSpace.hpp"
#include "gc_implementation/shared/markSweep.hpp"
#include "gc_implementation/shared/mutableSpace.hpp"
#include "gc_interface/collectedHeap.hpp"
#include "interpreter/bytecodeInterpreter.hpp"
#include "interpreter/bytecodes.hpp"
#include "interpreter/interpreter.hpp"
53
#include "memory/allocation.hpp"
54 55
#include "memory/cardTableRS.hpp"
#include "memory/defNewGeneration.hpp"
56
#include "memory/freeBlockDictionary.hpp"
57 58 59 60
#include "memory/genCollectedHeap.hpp"
#include "memory/generation.hpp"
#include "memory/generationSpec.hpp"
#include "memory/heap.hpp"
61
#include "memory/metachunk.hpp"
S
sla 已提交
62
#include "memory/referenceType.hpp"
63 64 65 66 67 68
#include "memory/space.hpp"
#include "memory/tenuredGeneration.hpp"
#include "memory/universe.hpp"
#include "memory/watermark.hpp"
#include "oops/arrayKlass.hpp"
#include "oops/arrayOop.hpp"
69 70 71 72 73
#include "oops/compiledICHolder.hpp"
#include "oops/constMethod.hpp"
#include "oops/constantPool.hpp"
#include "oops/cpCache.hpp"
#include "oops/instanceClassLoaderKlass.hpp"
74
#include "oops/instanceKlass.hpp"
75
#include "oops/instanceMirrorKlass.hpp"
76 77 78
#include "oops/instanceOop.hpp"
#include "oops/klass.hpp"
#include "oops/markOop.hpp"
79
#include "oops/methodData.hpp"
80
#include "oops/methodCounters.hpp"
81
#include "oops/method.hpp"
82 83 84
#include "oops/objArrayKlass.hpp"
#include "oops/objArrayOop.hpp"
#include "oops/oop.inline.hpp"
85
#include "oops/symbol.hpp"
86 87 88 89
#include "oops/typeArrayKlass.hpp"
#include "oops/typeArrayOop.hpp"
#include "prims/jvmtiAgentThread.hpp"
#include "runtime/arguments.hpp"
N
never 已提交
90 91
#include "runtime/deoptimization.hpp"
#include "runtime/vframeArray.hpp"
92 93 94 95
#include "runtime/globals.hpp"
#include "runtime/java.hpp"
#include "runtime/javaCalls.hpp"
#include "runtime/perfMemory.hpp"
96
#include "runtime/serviceThread.hpp"
97 98
#include "runtime/sharedRuntime.hpp"
#include "runtime/stubRoutines.hpp"
99
#include "runtime/thread.inline.hpp"
100 101
#include "runtime/virtualspace.hpp"
#include "runtime/vmStructs.hpp"
102
#include "utilities/array.hpp"
103 104
#include "utilities/globalDefinitions.hpp"
#include "utilities/hashtable.hpp"
105
#include "utilities/macros.hpp"
106 107 108 109 110 111 112 113 114
#ifdef TARGET_ARCH_x86
# include "vmStructs_x86.hpp"
#endif
#ifdef TARGET_ARCH_sparc
# include "vmStructs_sparc.hpp"
#endif
#ifdef TARGET_ARCH_zero
# include "vmStructs_zero.hpp"
#endif
115 116 117 118 119 120
#ifdef TARGET_ARCH_arm
# include "vmStructs_arm.hpp"
#endif
#ifdef TARGET_ARCH_ppc
# include "vmStructs_ppc.hpp"
#endif
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138
#ifdef TARGET_OS_ARCH_linux_x86
# include "vmStructs_linux_x86.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_sparc
# include "vmStructs_linux_sparc.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_zero
# include "vmStructs_linux_zero.hpp"
#endif
#ifdef TARGET_OS_ARCH_solaris_x86
# include "vmStructs_solaris_x86.hpp"
#endif
#ifdef TARGET_OS_ARCH_solaris_sparc
# include "vmStructs_solaris_sparc.hpp"
#endif
#ifdef TARGET_OS_ARCH_windows_x86
# include "vmStructs_windows_x86.hpp"
#endif
139 140 141 142 143 144
#ifdef TARGET_OS_ARCH_linux_arm
# include "vmStructs_linux_arm.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_ppc
# include "vmStructs_linux_ppc.hpp"
#endif
145 146 147
#ifdef TARGET_OS_ARCH_aix_ppc
# include "vmStructs_aix_ppc.hpp"
#endif
N
never 已提交
148 149 150 151 152 153
#ifdef TARGET_OS_ARCH_bsd_x86
# include "vmStructs_bsd_x86.hpp"
#endif
#ifdef TARGET_OS_ARCH_bsd_zero
# include "vmStructs_bsd_zero.hpp"
#endif
154
#if INCLUDE_ALL_GCS
155 156 157 158 159 160 161 162 163 164 165 166 167
#include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp"
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp"
#include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp"
#include "gc_implementation/concurrentMarkSweep/vmStructs_cms.hpp"
#include "gc_implementation/parNew/parNewGeneration.hpp"
#include "gc_implementation/parNew/vmStructs_parNew.hpp"
#include "gc_implementation/parallelScavenge/asPSOldGen.hpp"
#include "gc_implementation/parallelScavenge/asPSYoungGen.hpp"
#include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp"
#include "gc_implementation/parallelScavenge/psOldGen.hpp"
#include "gc_implementation/parallelScavenge/psVirtualspace.hpp"
#include "gc_implementation/parallelScavenge/psYoungGen.hpp"
#include "gc_implementation/parallelScavenge/vmStructs_parallelgc.hpp"
T
tonyp 已提交
168
#include "gc_implementation/g1/vmStructs_g1.hpp"
169
#endif // INCLUDE_ALL_GCS
170
#ifdef COMPILER2
N
never 已提交
171 172 173 174 175 176 177 178 179
#include "opto/addnode.hpp"
#include "opto/block.hpp"
#include "opto/callnode.hpp"
#include "opto/cfgnode.hpp"
#include "opto/chaitin.hpp"
#include "opto/divnode.hpp"
#include "opto/locknode.hpp"
#include "opto/loopnode.hpp"
#include "opto/machnode.hpp"
180
#include "opto/matcher.hpp"
181
#include "opto/mathexactnode.hpp"
N
never 已提交
182 183 184 185 186 187 188
#include "opto/mulnode.hpp"
#include "opto/phaseX.hpp"
#include "opto/parse.hpp"
#include "opto/regalloc.hpp"
#include "opto/rootnode.hpp"
#include "opto/subnode.hpp"
#include "opto/vectornode.hpp"
189 190 191 192 193 194 195 196 197 198 199 200
#ifdef TARGET_ARCH_MODEL_x86_32
# include "adfiles/adGlobals_x86_32.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_x86_64
# include "adfiles/adGlobals_x86_64.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_sparc
# include "adfiles/adGlobals_sparc.hpp"
#endif
#ifdef TARGET_ARCH_MODEL_zero
# include "adfiles/adGlobals_zero.hpp"
#endif
201 202 203
#ifdef TARGET_ARCH_MODEL_arm
# include "adfiles/adGlobals_arm.hpp"
#endif
204 205
#ifdef TARGET_ARCH_MODEL_ppc_32
# include "adfiles/adGlobals_ppc_32.hpp"
206
#endif
207 208
#ifdef TARGET_ARCH_MODEL_ppc_64
# include "adfiles/adGlobals_ppc_64.hpp"
209
#endif
210
#endif // COMPILER2
D
duke 已提交
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231

// Note: the cross-product of (c1, c2, product, nonproduct, ...),
// (nonstatic, static), and (unchecked, checked) has not been taken.
// Only the macros currently needed have been defined.

// A field whose type is not checked is given a null string as the
// type name, indicating an "opaque" type to the serviceability agent.

// NOTE: there is an interdependency between this file and
// HotSpotTypeDataBase.java, which parses the type strings.

#ifndef REG_COUNT
  #define REG_COUNT 0
#endif
// whole purpose of this function is to work around bug c++/27724 in gcc 4.1.1
// with optimization turned on it doesn't affect produced code
static inline uint64_t cast_uint64_t(size_t x)
{
  return x;
}

232 233 234 235 236 237 238 239 240
#if INCLUDE_JVMTI
  #define JVMTI_STRUCTS(static_field) \
    static_field(JvmtiExport,                     _can_access_local_variables,                  bool)                                  \
    static_field(JvmtiExport,                     _can_hotswap_or_post_breakpoint,              bool)                                  \
    static_field(JvmtiExport,                     _can_post_on_exceptions,                      bool)                                  \
    static_field(JvmtiExport,                     _can_walk_any_space,                          bool)
#else
  #define JVMTI_STRUCTS(static_field)
#endif // INCLUDE_JVMTI
D
duke 已提交
241

Z
zgu 已提交
242 243 244 245 246
typedef HashtableEntry<intptr_t, mtInternal>  IntptrHashtableEntry;
typedef Hashtable<intptr_t, mtInternal>       IntptrHashtable;
typedef Hashtable<Symbol*, mtSymbol>          SymbolHashtable;
typedef HashtableEntry<Symbol*, mtClass>      SymbolHashtableEntry;
typedef Hashtable<oop, mtSymbol>              StringHashtable;
247 248 249
typedef TwoOopHashtable<Klass*, mtClass>      KlassTwoOopHashtable;
typedef Hashtable<Klass*, mtClass>            KlassHashtable;
typedef HashtableEntry<Klass*, mtClass>       KlassHashtableEntry;
Z
zgu 已提交
250
typedef TwoOopHashtable<Symbol*, mtClass>     SymbolTwoOopHashtable;
251
typedef BinaryTreeDictionary<Metablock, FreeList<Metablock> > MetablockTreeDictionary;
Z
zgu 已提交
252

D
duke 已提交
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268
//--------------------------------------------------------------------------------
// VM_STRUCTS
//
// This list enumerates all of the fields the serviceability agent
// needs to know about. Be sure to see also the type table below this one.
// NOTE that there are platform-specific additions to this table in
// vmStructs_<os>_<cpu>.hpp.

#define VM_STRUCTS(nonstatic_field, \
                   static_field, \
                   unchecked_nonstatic_field, \
                   volatile_nonstatic_field, \
                   nonproduct_nonstatic_field, \
                   c1_nonstatic_field, \
                   c2_nonstatic_field, \
                   unchecked_c1_static_field, \
269
                   unchecked_c2_static_field) \
D
duke 已提交
270 271
                                                                                                                                     \
  /******************************************************************/                                                               \
272
  /* OopDesc and Klass hierarchies (NOTE: MethodData* incomplete) */                                                                 \
D
duke 已提交
273 274 275
  /******************************************************************/                                                               \
                                                                                                                                     \
  volatile_nonstatic_field(oopDesc,            _mark,                                         markOop)                               \
276
  volatile_nonstatic_field(oopDesc,            _metadata._klass,                              Klass*)                                \
277
  volatile_nonstatic_field(oopDesc,            _metadata._compressed_klass,                   narrowOop)                             \
D
duke 已提交
278
     static_field(oopDesc,                     _bs,                                           BarrierSet*)                           \
279 280 281 282 283
  nonstatic_field(ArrayKlass,                  _dimension,                                    int)                                   \
  volatile_nonstatic_field(ArrayKlass,         _higher_dimension,                             Klass*)                                \
  volatile_nonstatic_field(ArrayKlass,         _lower_dimension,                              Klass*)                                \
  nonstatic_field(ArrayKlass,                  _vtable_len,                                   int)                                   \
  nonstatic_field(ArrayKlass,                  _component_mirror,                             oop)                                   \
284
  nonstatic_field(CompiledICHolder,     _holder_method,                                Method*)                               \
285 286
  nonstatic_field(CompiledICHolder,     _holder_klass,                                 Klass*)                                \
  nonstatic_field(ConstantPool,         _tags,                                         Array<u1>*)                            \
287
  nonstatic_field(ConstantPool,         _cache,                                        ConstantPoolCache*)                    \
288
  nonstatic_field(ConstantPool,         _pool_holder,                                  InstanceKlass*)                        \
289 290 291 292 293
  nonstatic_field(ConstantPool,         _operands,                                     Array<u2>*)                            \
  nonstatic_field(ConstantPool,         _length,                                       int)                                   \
  nonstatic_field(ConstantPool,         _resolved_references,                          jobject)                               \
  nonstatic_field(ConstantPool,         _reference_map,                                Array<u2>*)                            \
  nonstatic_field(ConstantPoolCache,    _length,                                       int)                                   \
294
  nonstatic_field(ConstantPoolCache,    _constant_pool,                                ConstantPool*)                         \
295
  nonstatic_field(InstanceKlass,               _array_klasses,                                Klass*)                                \
296
  nonstatic_field(InstanceKlass,               _methods,                                      Array<Method*>*)                       \
297
  nonstatic_field(InstanceKlass,               _default_methods,                              Array<Method*>*)                       \
298 299 300 301
  nonstatic_field(InstanceKlass,               _local_interfaces,                             Array<Klass*>*)                        \
  nonstatic_field(InstanceKlass,               _transitive_interfaces,                        Array<Klass*>*)                        \
  nonstatic_field(InstanceKlass,               _fields,                                       Array<u2>*)                            \
  nonstatic_field(InstanceKlass,               _java_fields_count,                            u2)                                    \
302
  nonstatic_field(InstanceKlass,               _constants,                                    ConstantPool*)                         \
303
  nonstatic_field(InstanceKlass,               _class_loader_data,                            ClassLoaderData*)                      \
304
  nonstatic_field(InstanceKlass,               _source_file_name_index,                            u2)                               \
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322
  nonstatic_field(InstanceKlass,               _source_debug_extension,                       char*)                                 \
  nonstatic_field(InstanceKlass,               _inner_classes,                               Array<jushort>*)                       \
  nonstatic_field(InstanceKlass,               _nonstatic_field_size,                         int)                                   \
  nonstatic_field(InstanceKlass,               _static_field_size,                            int)                                   \
  nonstatic_field(InstanceKlass,               _static_oop_field_count,                       u2)                                   \
  nonstatic_field(InstanceKlass,               _nonstatic_oop_map_size,                       int)                                   \
  nonstatic_field(InstanceKlass,               _is_marked_dependent,                          bool)                                  \
  nonstatic_field(InstanceKlass,               _minor_version,                                u2)                                    \
  nonstatic_field(InstanceKlass,               _major_version,                                u2)                                    \
  nonstatic_field(InstanceKlass,               _init_state,                                   u1)                                    \
  nonstatic_field(InstanceKlass,               _init_thread,                                  Thread*)                               \
  nonstatic_field(InstanceKlass,               _vtable_len,                                   int)                                   \
  nonstatic_field(InstanceKlass,               _itable_len,                                   int)                                   \
  nonstatic_field(InstanceKlass,               _reference_type,                               u1)                                    \
  volatile_nonstatic_field(InstanceKlass,      _oop_map_cache,                                OopMapCache*)                          \
  nonstatic_field(InstanceKlass,               _jni_ids,                                      JNIid*)                                \
  nonstatic_field(InstanceKlass,               _osr_nmethods_head,                            nmethod*)                              \
  nonstatic_field(InstanceKlass,               _breakpoints,                                  BreakpointInfo*)                       \
323
  nonstatic_field(InstanceKlass,               _generic_signature_index,                           u2)                               \
324 325 326 327
  nonstatic_field(InstanceKlass,               _methods_jmethod_ids,                          jmethodID*)                            \
  volatile_nonstatic_field(InstanceKlass,      _idnum_allocated_count,                        u2)                                    \
  nonstatic_field(InstanceKlass,               _annotations,                                  Annotations*)                          \
  nonstatic_field(InstanceKlass,               _dependencies,                                 nmethodBucket*)                        \
N
never 已提交
328 329 330
  nonstatic_field(nmethodBucket,               _nmethod,                                      nmethod*)                              \
  nonstatic_field(nmethodBucket,               _count,                                        int)                                   \
  nonstatic_field(nmethodBucket,               _next,                                         nmethodBucket*)                        \
331
  nonstatic_field(InstanceKlass,               _method_ordering,                              Array<int>*)                           \
332
  nonstatic_field(InstanceKlass,               _default_vtable_indices,                       Array<int>*)                           \
D
duke 已提交
333
  nonstatic_field(Klass,                       _super_check_offset,                           juint)                                 \
334 335 336
  nonstatic_field(Klass,                       _secondary_super_cache,                        Klass*)                                \
  nonstatic_field(Klass,                       _secondary_supers,                             Array<Klass*>*)                        \
  nonstatic_field(Klass,                       _primary_supers[0],                            Klass*)                                \
D
duke 已提交
337 338
  nonstatic_field(Klass,                       _java_mirror,                                  oop)                                   \
  nonstatic_field(Klass,                       _modifier_flags,                               jint)                                  \
339
  nonstatic_field(Klass,                       _super,                                        Klass*)                                \
340
  nonstatic_field(Klass,                       _subklass,                                     Klass*)                                \
D
duke 已提交
341
  nonstatic_field(Klass,                       _layout_helper,                                jint)                                  \
342
  nonstatic_field(Klass,                       _name,                                         Symbol*)                               \
D
duke 已提交
343
  nonstatic_field(Klass,                       _access_flags,                                 AccessFlags)                           \
344
  nonstatic_field(Klass,                       _prototype_header,                             markOop)                               \
345
  nonstatic_field(Klass,                       _next_sibling,                                 Klass*)                                \
346
  nonstatic_field(vtableEntry,                 _method,                                       Method*)                               \
347
  nonstatic_field(MethodData,           _size,                                         int)                                   \
348
  nonstatic_field(MethodData,           _method,                                       Method*)                               \
349 350 351 352 353
  nonstatic_field(MethodData,           _data_size,                                    int)                                   \
  nonstatic_field(MethodData,           _data[0],                                      intptr_t)                              \
  nonstatic_field(MethodData,           _nof_decompiles,                               uint)                                  \
  nonstatic_field(MethodData,           _nof_overflow_recompiles,                      uint)                                  \
  nonstatic_field(MethodData,           _nof_overflow_traps,                           uint)                                  \
354
  nonstatic_field(MethodData,           _trap_hist._array[0],                          u1)                                    \
355 356 357 358
  nonstatic_field(MethodData,           _eflags,                                       intx)                                  \
  nonstatic_field(MethodData,           _arg_local,                                    intx)                                  \
  nonstatic_field(MethodData,           _arg_stack,                                    intx)                                  \
  nonstatic_field(MethodData,           _arg_returned,                                 intx)                                  \
359 360 361 362
  nonstatic_field(DataLayout,           _header._struct._tag,                          u1)                                    \
  nonstatic_field(DataLayout,           _header._struct._flags,                        u1)                                    \
  nonstatic_field(DataLayout,           _header._struct._bci,                          u2)                                    \
  nonstatic_field(DataLayout,           _cells[0],                                     intptr_t)                              \
363 364 365 366 367 368 369 370
  nonstatic_field(MethodCounters,       _interpreter_invocation_count,                 int)                                   \
  nonstatic_field(MethodCounters,       _interpreter_throwout_count,                   u2)                                    \
  nonstatic_field(MethodCounters,       _number_of_breakpoints,                        u2)                                    \
  nonstatic_field(MethodCounters,       _invocation_counter,                           InvocationCounter)                     \
  nonstatic_field(MethodCounters,       _backedge_counter,                             InvocationCounter)                     \
  nonstatic_field(Method,               _constMethod,                                  ConstMethod*)                          \
  nonstatic_field(Method,               _method_data,                                  MethodData*)                           \
  nonstatic_field(Method,               _method_counters,                              MethodCounters*)                       \
371 372 373
  nonstatic_field(Method,               _access_flags,                                 AccessFlags)                           \
  nonstatic_field(Method,               _vtable_index,                                 int)                                   \
  nonstatic_field(Method,               _method_size,                                  u2)                                    \
374
  nonstatic_field(Method,               _intrinsic_id,                                 u1)                                    \
375 376 377 378 379 380 381
  nonproduct_nonstatic_field(Method,    _compiled_invocation_count,                    int)                                   \
  volatile_nonstatic_field(Method,      _code,                                         nmethod*)                              \
  nonstatic_field(Method,               _i2i_entry,                                    address)                               \
  nonstatic_field(Method,               _adapter,                                      AdapterHandlerEntry*)                  \
  volatile_nonstatic_field(Method,      _from_compiled_entry,                          address)                               \
  volatile_nonstatic_field(Method,      _from_interpreted_entry,                       address)                               \
  volatile_nonstatic_field(ConstMethod, _fingerprint,                                  uint64_t)                              \
C
coleenp 已提交
382
  nonstatic_field(ConstMethod,          _constants,                                    ConstantPool*)                         \
383 384
  nonstatic_field(ConstMethod,          _stackmap_data,                                Array<u1>*)                            \
  nonstatic_field(ConstMethod,          _constMethod_size,                             int)                                   \
C
coleenp 已提交
385
  nonstatic_field(ConstMethod,          _flags,                                        u2)                                    \
386 387 388 389
  nonstatic_field(ConstMethod,          _code_size,                                    u2)                                    \
  nonstatic_field(ConstMethod,          _name_index,                                   u2)                                    \
  nonstatic_field(ConstMethod,          _signature_index,                              u2)                                    \
  nonstatic_field(ConstMethod,          _method_idnum,                                 u2)                                    \
390
  nonstatic_field(ConstMethod,          _max_stack,                                    u2)                                    \
391 392
  nonstatic_field(ConstMethod,          _max_locals,                                   u2)                                    \
  nonstatic_field(ConstMethod,          _size_of_parameters,                           u2)                                    \
393 394
  nonstatic_field(ObjArrayKlass,               _element_klass,                                Klass*)                                \
  nonstatic_field(ObjArrayKlass,               _bottom_klass,                                 Klass*)                                \
395
  volatile_nonstatic_field(Symbol,             _refcount,                                     short)                                 \
396 397 398
  nonstatic_field(Symbol,                      _identity_hash,                                int)                                   \
  nonstatic_field(Symbol,                      _length,                                       unsigned short)                        \
  unchecked_nonstatic_field(Symbol,            _body,                                         sizeof(jbyte)) /* NOTE: no type */     \
399
  nonstatic_field(TypeArrayKlass,              _max_length,                                   int)                                   \
D
duke 已提交
400 401 402 403 404 405
                                                                                                                                     \
  /***********************/                                                                                                          \
  /* Constant Pool Cache */                                                                                                          \
  /***********************/                                                                                                          \
                                                                                                                                     \
  volatile_nonstatic_field(ConstantPoolCacheEntry,      _indices,                                      intx)                         \
406
  nonstatic_field(ConstantPoolCacheEntry,               _f1,                                           volatile Metadata*)           \
D
duke 已提交
407 408 409 410 411 412 413 414 415 416 417 418 419 420
  volatile_nonstatic_field(ConstantPoolCacheEntry,      _f2,                                           intx)                         \
  volatile_nonstatic_field(ConstantPoolCacheEntry,      _flags,                                        intx)                         \
                                                                                                                                     \
  /********************************/                                                                                                 \
  /* MethodOop-related structures */                                                                                                 \
  /********************************/                                                                                                 \
                                                                                                                                     \
  nonstatic_field(CheckedExceptionElement,     class_cp_index,                                u2)                                    \
  nonstatic_field(LocalVariableTableElement,   start_bci,                                     u2)                                    \
  nonstatic_field(LocalVariableTableElement,   length,                                        u2)                                    \
  nonstatic_field(LocalVariableTableElement,   name_cp_index,                                 u2)                                    \
  nonstatic_field(LocalVariableTableElement,   descriptor_cp_index,                           u2)                                    \
  nonstatic_field(LocalVariableTableElement,   signature_cp_index,                            u2)                                    \
  nonstatic_field(LocalVariableTableElement,   slot,                                          u2)                                    \
421 422 423 424
  nonstatic_field(ExceptionTableElement,       start_pc,                                      u2)                                    \
  nonstatic_field(ExceptionTableElement,       end_pc,                                        u2)                                    \
  nonstatic_field(ExceptionTableElement,       handler_pc,                                    u2)                                    \
  nonstatic_field(ExceptionTableElement,       catch_type_index,                              u2)                                    \
D
duke 已提交
425 426 427 428 429 430 431 432 433
  nonstatic_field(BreakpointInfo,              _orig_bytecode,                                Bytecodes::Code)                       \
  nonstatic_field(BreakpointInfo,              _bci,                                          int)                                   \
  nonstatic_field(BreakpointInfo,              _name_index,                                   u2)                                    \
  nonstatic_field(BreakpointInfo,              _signature_index,                              u2)                                    \
  nonstatic_field(BreakpointInfo,              _next,                                         BreakpointInfo*)                       \
  /***********/                                                                                                                      \
  /* JNI IDs */                                                                                                                      \
  /***********/                                                                                                                      \
                                                                                                                                     \
434
  nonstatic_field(JNIid,                       _holder,                                       Klass*)                                \
D
duke 已提交
435 436 437 438 439 440
  nonstatic_field(JNIid,                       _next,                                         JNIid*)                                \
  nonstatic_field(JNIid,                       _offset,                                       int)                                   \
  /************/                                                                                                                     \
  /* Universe */                                                                                                                     \
  /************/                                                                                                                     \
                                                                                                                                     \
441 442 443 444 445 446 447 448
     static_field(Universe,                    _boolArrayKlassObj,                            Klass*)                                \
     static_field(Universe,                    _byteArrayKlassObj,                            Klass*)                                \
     static_field(Universe,                    _charArrayKlassObj,                            Klass*)                                \
     static_field(Universe,                    _intArrayKlassObj,                             Klass*)                                \
     static_field(Universe,                    _shortArrayKlassObj,                           Klass*)                                \
     static_field(Universe,                    _longArrayKlassObj,                            Klass*)                                \
     static_field(Universe,                    _singleArrayKlassObj,                          Klass*)                                \
     static_field(Universe,                    _doubleArrayKlassObj,                          Klass*)                                \
N
never 已提交
449
     static_field(Universe,                    _mirrors[0],                                   oop)                                   \
D
duke 已提交
450 451 452 453 454 455 456 457 458 459 460
     static_field(Universe,                    _main_thread_group,                            oop)                                   \
     static_field(Universe,                    _system_thread_group,                          oop)                                   \
     static_field(Universe,                    _the_empty_class_klass_array,                  objArrayOop)                           \
     static_field(Universe,                    _null_ptr_exception_instance,                  oop)                                   \
     static_field(Universe,                    _arithmetic_exception_instance,                oop)                                   \
     static_field(Universe,                    _vm_exception,                                 oop)                                   \
     static_field(Universe,                    _collectedHeap,                                CollectedHeap*)                        \
     static_field(Universe,                    _base_vtable_size,                             int)                                   \
     static_field(Universe,                    _bootstrapping,                                bool)                                  \
     static_field(Universe,                    _fully_initialized,                            bool)                                  \
     static_field(Universe,                    _verify_count,                                 int)                                   \
461
     static_field(Universe,                    _non_oop_bits,                                 intptr_t)                              \
462 463 464
     static_field(Universe,                    _narrow_oop._base,                             address)                               \
     static_field(Universe,                    _narrow_oop._shift,                            int)                                   \
     static_field(Universe,                    _narrow_oop._use_implicit_null_checks,         bool)                                  \
465 466
     static_field(Universe,                    _narrow_klass._base,                           address)                               \
     static_field(Universe,                    _narrow_klass._shift,                          int)                                   \
D
duke 已提交
467
                                                                                                                                     \
468 469 470 471 472 473
  /******/                                                                                                                           \
  /* os */                                                                                                                           \
  /******/                                                                                                                           \
                                                                                                                                     \
     static_field(os,                          _polling_page,                                 address)                               \
                                                                                                                                     \
D
duke 已提交
474 475 476 477 478 479 480
  /**********************************************************************************/                                               \
  /* Generation and Space hierarchies                                               */                                               \
  /**********************************************************************************/                                               \
                                                                                                                                     \
  unchecked_nonstatic_field(ageTable,          sizes,                                         sizeof(ageTable::sizes))               \
                                                                                                                                     \
  nonstatic_field(BarrierSet,                  _max_covered_regions,                          int)                                   \
481
  nonstatic_field(BarrierSet,                  _kind,                                         BarrierSet::Name)                      \
D
duke 已提交
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498
  nonstatic_field(BlockOffsetTable,            _bottom,                                       HeapWord*)                             \
  nonstatic_field(BlockOffsetTable,            _end,                                          HeapWord*)                             \
                                                                                                                                     \
  nonstatic_field(BlockOffsetSharedArray,      _reserved,                                     MemRegion)                             \
  nonstatic_field(BlockOffsetSharedArray,      _end,                                          HeapWord*)                             \
  nonstatic_field(BlockOffsetSharedArray,      _vs,                                           VirtualSpace)                          \
  nonstatic_field(BlockOffsetSharedArray,      _offset_array,                                 u_char*)                               \
                                                                                                                                     \
  nonstatic_field(BlockOffsetArray,            _array,                                        BlockOffsetSharedArray*)               \
  nonstatic_field(BlockOffsetArray,            _sp,                                           Space*)                                \
  nonstatic_field(BlockOffsetArrayContigSpace, _next_offset_threshold,                        HeapWord*)                             \
  nonstatic_field(BlockOffsetArrayContigSpace, _next_offset_index,                            size_t)                                \
                                                                                                                                     \
  nonstatic_field(BlockOffsetArrayNonContigSpace, _unallocated_block,                         HeapWord*)                             \
                                                                                                                                     \
  nonstatic_field(CardGeneration,              _rs,                                           GenRemSet*)                            \
  nonstatic_field(CardGeneration,              _bts,                                          BlockOffsetSharedArray*)               \
499 500 501
  nonstatic_field(CardGeneration,              _shrink_factor,                                size_t)                                \
  nonstatic_field(CardGeneration,              _capacity_at_prologue,                         size_t)                                \
  nonstatic_field(CardGeneration,              _used_at_prologue,                             size_t)                                \
D
duke 已提交
502 503 504 505 506 507 508 509 510 511 512 513 514
                                                                                                                                     \
  nonstatic_field(CardTableModRefBS,           _whole_heap,                                   const MemRegion)                       \
  nonstatic_field(CardTableModRefBS,           _guard_index,                                  const size_t)                          \
  nonstatic_field(CardTableModRefBS,           _last_valid_index,                             const size_t)                          \
  nonstatic_field(CardTableModRefBS,           _page_size,                                    const size_t)                          \
  nonstatic_field(CardTableModRefBS,           _byte_map_size,                                const size_t)                          \
  nonstatic_field(CardTableModRefBS,           _byte_map,                                     jbyte*)                                \
  nonstatic_field(CardTableModRefBS,           _cur_covered_regions,                          int)                                   \
  nonstatic_field(CardTableModRefBS,           _covered,                                      MemRegion*)                            \
  nonstatic_field(CardTableModRefBS,           _committed,                                    MemRegion*)                            \
  nonstatic_field(CardTableModRefBS,           _guard_region,                                 MemRegion)                             \
  nonstatic_field(CardTableModRefBS,           byte_map_base,                                 jbyte*)                                \
                                                                                                                                     \
515
  nonstatic_field(CardTableRS,                 _ct_bs,                                        CardTableModRefBSForCTRS*)             \
D
duke 已提交
516 517 518
                                                                                                                                     \
  nonstatic_field(CollectedHeap,               _reserved,                                     MemRegion)                             \
  nonstatic_field(CollectedHeap,               _barrier_set,                                  BarrierSet*)                           \
519
  nonstatic_field(CollectedHeap,               _defer_initial_card_mark,                      bool)                                  \
D
duke 已提交
520
  nonstatic_field(CollectedHeap,               _is_gc_active,                                 bool)                                  \
521
  nonstatic_field(CollectedHeap,               _total_collections,                            unsigned int)                          \
D
duke 已提交
522 523 524 525 526 527 528 529 530 531
  nonstatic_field(CompactibleSpace,            _compaction_top,                               HeapWord*)                             \
  nonstatic_field(CompactibleSpace,            _first_dead,                                   HeapWord*)                             \
  nonstatic_field(CompactibleSpace,            _end_of_live,                                  HeapWord*)                             \
                                                                                                                                     \
                                                                                                                                     \
  nonstatic_field(ContiguousSpace,             _top,                                          HeapWord*)                             \
  nonstatic_field(ContiguousSpace,             _concurrent_iteration_safe_limit,              HeapWord*)                             \
  nonstatic_field(ContiguousSpace,             _saved_mark_word,                              HeapWord*)                             \
                                                                                                                                     \
  nonstatic_field(DefNewGeneration,            _next_gen,                                     Generation*)                           \
532
  nonstatic_field(DefNewGeneration,            _tenuring_threshold,                           uint)                                  \
D
duke 已提交
533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567
  nonstatic_field(DefNewGeneration,            _age_table,                                    ageTable)                              \
  nonstatic_field(DefNewGeneration,            _eden_space,                                   EdenSpace*)                            \
  nonstatic_field(DefNewGeneration,            _from_space,                                   ContiguousSpace*)                      \
  nonstatic_field(DefNewGeneration,            _to_space,                                     ContiguousSpace*)                      \
                                                                                                                                     \
  nonstatic_field(EdenSpace,                   _gen,                                          DefNewGeneration*)                     \
                                                                                                                                     \
  nonstatic_field(Generation,                  _reserved,                                     MemRegion)                             \
  nonstatic_field(Generation,                  _virtual_space,                                VirtualSpace)                          \
  nonstatic_field(Generation,                  _level,                                        int)                                   \
  nonstatic_field(Generation,                  _stat_record,                                  Generation::StatRecord)                \
                                                                                                                                     \
  nonstatic_field(Generation::StatRecord,      invocations,                                   int)                                   \
  nonstatic_field(Generation::StatRecord,      accumulated_time,                              elapsedTimer)                          \
                                                                                                                                     \
  nonstatic_field(GenerationSpec,              _name,                                         Generation::Name)                      \
  nonstatic_field(GenerationSpec,              _init_size,                                    size_t)                                \
  nonstatic_field(GenerationSpec,              _max_size,                                     size_t)                                \
                                                                                                                                     \
    static_field(GenCollectedHeap,             _gch,                                          GenCollectedHeap*)                     \
 nonstatic_field(GenCollectedHeap,             _n_gens,                                       int)                                   \
 unchecked_nonstatic_field(GenCollectedHeap,   _gens,                                         sizeof(GenCollectedHeap::_gens)) /* NOTE: no type */ \
  nonstatic_field(GenCollectedHeap,            _gen_specs,                                    GenerationSpec**)                      \
                                                                                                                                     \
  nonstatic_field(HeapWord,                    i,                                             char*)                                 \
                                                                                                                                     \
  nonstatic_field(MemRegion,                   _start,                                        HeapWord*)                             \
  nonstatic_field(MemRegion,                   _word_size,                                    size_t)                                \
                                                                                                                                     \
  nonstatic_field(OffsetTableContigSpace,      _offsets,                                      BlockOffsetArray)                      \
                                                                                                                                     \
  nonstatic_field(OneContigSpaceCardGeneration, _min_heap_delta_bytes,                        size_t)                                \
  nonstatic_field(OneContigSpaceCardGeneration, _the_space,                                   ContiguousSpace*)                      \
  nonstatic_field(OneContigSpaceCardGeneration, _last_gc,                                     WaterMark)                             \
                                                                                                                                     \
568
                                                                                                                                     \
D
duke 已提交
569 570 571 572 573 574 575 576 577 578
                                                                                                                                     \
  nonstatic_field(Space,                       _bottom,                                       HeapWord*)                             \
  nonstatic_field(Space,                       _end,                                          HeapWord*)                             \
                                                                                                                                     \
  nonstatic_field(ThreadLocalAllocBuffer,      _start,                                        HeapWord*)                             \
  nonstatic_field(ThreadLocalAllocBuffer,      _top,                                          HeapWord*)                             \
  nonstatic_field(ThreadLocalAllocBuffer,      _end,                                          HeapWord*)                             \
  nonstatic_field(ThreadLocalAllocBuffer,      _desired_size,                                 size_t)                                \
  nonstatic_field(ThreadLocalAllocBuffer,      _refill_waste_limit,                           size_t)                                \
     static_field(ThreadLocalAllocBuffer,      _target_refills,                               unsigned)                              \
579 580 581 582 583
  nonstatic_field(ThreadLocalAllocBuffer,      _number_of_refills,                            unsigned)                              \
  nonstatic_field(ThreadLocalAllocBuffer,      _fast_refill_waste,                            unsigned)                              \
  nonstatic_field(ThreadLocalAllocBuffer,      _slow_refill_waste,                            unsigned)                              \
  nonstatic_field(ThreadLocalAllocBuffer,      _gc_waste,                                     unsigned)                              \
  nonstatic_field(ThreadLocalAllocBuffer,      _slow_allocations,                             unsigned)                              \
D
duke 已提交
584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645
  nonstatic_field(VirtualSpace,                _low_boundary,                                 char*)                                 \
  nonstatic_field(VirtualSpace,                _high_boundary,                                char*)                                 \
  nonstatic_field(VirtualSpace,                _low,                                          char*)                                 \
  nonstatic_field(VirtualSpace,                _high,                                         char*)                                 \
  nonstatic_field(VirtualSpace,                _lower_high,                                   char*)                                 \
  nonstatic_field(VirtualSpace,                _middle_high,                                  char*)                                 \
  nonstatic_field(VirtualSpace,                _upper_high,                                   char*)                                 \
  nonstatic_field(WaterMark,                   _point,                                        HeapWord*)                             \
  nonstatic_field(WaterMark,                   _space,                                        Space*)                                \
                                                                                                                                     \
  /************************/                                                                                                         \
  /* PerfMemory - jvmstat */                                                                                                         \
  /************************/                                                                                                         \
                                                                                                                                     \
  nonstatic_field(PerfDataPrologue,            magic,                                         jint)                                  \
  nonstatic_field(PerfDataPrologue,            byte_order,                                    jbyte)                                 \
  nonstatic_field(PerfDataPrologue,            major_version,                                 jbyte)                                 \
  nonstatic_field(PerfDataPrologue,            minor_version,                                 jbyte)                                 \
  nonstatic_field(PerfDataPrologue,            accessible,                                    jbyte)                                 \
  nonstatic_field(PerfDataPrologue,            used,                                          jint)                                  \
  nonstatic_field(PerfDataPrologue,            overflow,                                      jint)                                  \
  nonstatic_field(PerfDataPrologue,            mod_time_stamp,                                jlong)                                 \
  nonstatic_field(PerfDataPrologue,            entry_offset,                                  jint)                                  \
  nonstatic_field(PerfDataPrologue,            num_entries,                                   jint)                                  \
                                                                                                                                     \
  nonstatic_field(PerfDataEntry,               entry_length,                                  jint)                                  \
  nonstatic_field(PerfDataEntry,               name_offset,                                   jint)                                  \
  nonstatic_field(PerfDataEntry,               vector_length,                                 jint)                                  \
  nonstatic_field(PerfDataEntry,               data_type,                                     jbyte)                                 \
  nonstatic_field(PerfDataEntry,               flags,                                         jbyte)                                 \
  nonstatic_field(PerfDataEntry,               data_units,                                    jbyte)                                 \
  nonstatic_field(PerfDataEntry,               data_variability,                              jbyte)                                 \
  nonstatic_field(PerfDataEntry,               data_offset,                                   jint)                                  \
                                                                                                                                     \
     static_field(PerfMemory,                  _start,                                        char*)                                 \
     static_field(PerfMemory,                  _end,                                          char*)                                 \
     static_field(PerfMemory,                  _top,                                          char*)                                 \
     static_field(PerfMemory,                  _capacity,                                     size_t)                                \
     static_field(PerfMemory,                  _prologue,                                     PerfDataPrologue*)                     \
     static_field(PerfMemory,                  _initialized,                                  jint)                                  \
                                                                                                                                     \
  /***************/                                                                                                                  \
  /* SymbolTable */                                                                                                                  \
  /***************/                                                                                                                  \
                                                                                                                                     \
     static_field(SymbolTable,                  _the_table,                                   SymbolTable*)                          \
                                                                                                                                     \
  /***************/                                                                                                                  \
  /* StringTable */                                                                                                                  \
  /***************/                                                                                                                  \
                                                                                                                                     \
     static_field(StringTable,                  _the_table,                                   StringTable*)                          \
                                                                                                                                     \
  /********************/                                                                                                             \
  /* SystemDictionary */                                                                                                             \
  /********************/                                                                                                             \
                                                                                                                                     \
      static_field(SystemDictionary,            _dictionary,                                   Dictionary*)                          \
      static_field(SystemDictionary,            _placeholders,                                 PlaceholderTable*)                    \
      static_field(SystemDictionary,            _shared_dictionary,                            Dictionary*)                          \
      static_field(SystemDictionary,            _system_loader_lock_obj,                       oop)                                  \
      static_field(SystemDictionary,            _loader_constraints,                           LoaderConstraintTable*)               \
646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679
      static_field(SystemDictionary,            WK_KLASS(Object_klass),                        Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(String_klass),                        Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(Class_klass),                         Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(Cloneable_klass),                     Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(ClassLoader_klass),                   Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(Serializable_klass),                  Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(System_klass),                        Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(Throwable_klass),                     Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(ThreadDeath_klass),                   Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(Error_klass),                         Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(Exception_klass),                     Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(RuntimeException_klass),              Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(ClassNotFoundException_klass),        Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(NoClassDefFoundError_klass),          Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(LinkageError_klass),                  Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(ClassCastException_klass),            Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(ArrayStoreException_klass),           Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(VirtualMachineError_klass),           Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(OutOfMemoryError_klass),              Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(StackOverflowError_klass),            Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(ProtectionDomain_klass),              Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(AccessControlContext_klass),          Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(Reference_klass),                     Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(SoftReference_klass),                 Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(WeakReference_klass),                 Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(FinalReference_klass),                Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(PhantomReference_klass),              Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(Finalizer_klass),                     Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(Thread_klass),                        Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(ThreadGroup_klass),                   Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(Properties_klass),                    Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(StringBuffer_klass),                  Klass*)                               \
      static_field(SystemDictionary,            WK_KLASS(MethodHandle_klass),                  Klass*)                               \
      static_field(SystemDictionary,            _box_klasses[0],                               Klass*)                               \
D
duke 已提交
680 681
      static_field(SystemDictionary,            _java_system_loader,                           oop)                                  \
                                                                                                                                     \
N
never 已提交
682 683 684 685 686 687
  /*************/                                                                                                                    \
  /* vmSymbols */                                                                                                                    \
  /*************/                                                                                                                    \
                                                                                                                                     \
      static_field(vmSymbols,                   _symbols[0],                                  Symbol*)                               \
                                                                                                                                     \
D
duke 已提交
688 689 690 691
  /*******************/                                                                                                              \
  /* HashtableBucket */                                                                                                              \
  /*******************/                                                                                                              \
                                                                                                                                     \
Z
zgu 已提交
692
  nonstatic_field(HashtableBucket<mtInternal>,  _entry,                                        BasicHashtableEntry<mtInternal>*)     \
D
duke 已提交
693 694 695 696 697
                                                                                                                                     \
  /******************/                                                                                                               \
  /* HashtableEntry */                                                                                                               \
  /******************/                                                                                                               \
                                                                                                                                     \
Z
zgu 已提交
698 699 700
  nonstatic_field(BasicHashtableEntry<mtInternal>, _next,                                     BasicHashtableEntry<mtInternal>*)      \
  nonstatic_field(BasicHashtableEntry<mtInternal>, _hash,                                     unsigned int)                          \
  nonstatic_field(IntptrHashtableEntry,            _literal,                                  intptr_t)                              \
D
duke 已提交
701 702 703 704 705
                                                                                                                                     \
  /*************/                                                                                                                    \
  /* Hashtable */                                                                                                                    \
  /*************/                                                                                                                    \
                                                                                                                                     \
Z
zgu 已提交
706 707 708 709 710 711
  nonstatic_field(BasicHashtable<mtInternal>, _table_size,                                   int)                                   \
  nonstatic_field(BasicHashtable<mtInternal>, _buckets,                                      HashtableBucket<mtInternal>*)          \
  nonstatic_field(BasicHashtable<mtInternal>, _free_list,                                    BasicHashtableEntry<mtInternal>*)      \
  nonstatic_field(BasicHashtable<mtInternal>, _first_free_entry,                             char*)                                 \
  nonstatic_field(BasicHashtable<mtInternal>, _end_block,                                    char*)                                 \
  nonstatic_field(BasicHashtable<mtInternal>, _entry_size,                                   int)                                   \
D
duke 已提交
712 713 714 715 716
                                                                                                                                     \
  /*******************/                                                                                                              \
  /* DictionaryEntry */                                                                                                              \
  /*******************/                                                                                                              \
                                                                                                                                     \
717
  nonstatic_field(DictionaryEntry,             _loader_data,                                  ClassLoaderData*)                      \
D
duke 已提交
718 719 720 721
  nonstatic_field(DictionaryEntry,             _pd_set,                                       ProtectionDomainEntry*)                \
                                                                                                                                     \
  /********************/                                                                                                             \
                                                                                                                                     \
722
  nonstatic_field(PlaceholderEntry,            _loader_data,                                  ClassLoaderData*)                      \
D
duke 已提交
723 724
                                                                                                                                     \
  /**************************/                                                                                                       \
725
  /* ProtectionDomainEntry  */                                                                                                       \
D
duke 已提交
726 727 728
  /**************************/                                                                                                       \
                                                                                                                                     \
  nonstatic_field(ProtectionDomainEntry,       _next,                                         ProtectionDomainEntry*)                \
729 730 731 732 733 734 735
  nonstatic_field(ProtectionDomainEntry,       _pd_cache,                                     ProtectionDomainCacheEntry*)           \
                                                                                                                                     \
  /*******************************/                                                                                                  \
  /* ProtectionDomainCacheEntry  */                                                                                                  \
  /*******************************/                                                                                                  \
                                                                                                                                     \
  nonstatic_field(ProtectionDomainCacheEntry,  _literal,                                      oop)                                   \
D
duke 已提交
736 737 738 739 740
                                                                                                                                     \
  /*************************/                                                                                                        \
  /* LoaderConstraintEntry */                                                                                                        \
  /*************************/                                                                                                        \
                                                                                                                                     \
741
  nonstatic_field(LoaderConstraintEntry,       _name,                                         Symbol*)                               \
D
duke 已提交
742 743
  nonstatic_field(LoaderConstraintEntry,       _num_loaders,                                  int)                                   \
  nonstatic_field(LoaderConstraintEntry,       _max_loaders,                                  int)                                   \
744 745 746 747 748 749
  nonstatic_field(LoaderConstraintEntry,       _loaders,                                      ClassLoaderData**)                     \
                                                                                                                                     \
  nonstatic_field(ClassLoaderData,             _class_loader,                                 oop)                                   \
  nonstatic_field(ClassLoaderData,             _next,                                         ClassLoaderData*)                      \
                                                                                                                                     \
  static_field(ClassLoaderDataGraph,           _head,                                         ClassLoaderData*)                      \
D
duke 已提交
750
                                                                                                                                     \
751 752 753 754 755 756 757
  /**********/                                                                                                                       \
  /* Arrays */                                                                                                                       \
  /**********/                                                                                                                       \
                                                                                                                                     \
  nonstatic_field(Array<Klass*>,               _length,                                       int)                                   \
  nonstatic_field(Array<Klass*>,               _data[0],                                      Klass*)                                \
                                                                                                                                     \
N
never 已提交
758 759 760 761 762 763 764
  /*******************/                                                                                                              \
  /* GrowableArrays  */                                                                                                              \
  /*******************/                                                                                                              \
                                                                                                                                     \
  nonstatic_field(GenericGrowableArray,        _len,                                          int)                                   \
  nonstatic_field(GenericGrowableArray,        _max,                                          int)                                   \
  nonstatic_field(GenericGrowableArray,        _arena,                                        Arena*)                                \
765
  nonstatic_field(GrowableArray<int>,          _data,                                         int*)                                  \
N
never 已提交
766
                                                                                                                                     \
D
duke 已提交
767 768 769 770 771
  /********************************/                                                                                                 \
  /* CodeCache (NOTE: incomplete) */                                                                                                 \
  /********************************/                                                                                                 \
                                                                                                                                     \
     static_field(CodeCache,                   _heap,                                         CodeHeap*)                             \
772
     static_field(CodeCache,                   _scavenge_root_nmethods,                       nmethod*)                              \
D
duke 已提交
773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807
                                                                                                                                     \
  /*******************************/                                                                                                  \
  /* CodeHeap (NOTE: incomplete) */                                                                                                  \
  /*******************************/                                                                                                  \
                                                                                                                                     \
  nonstatic_field(CodeHeap,                    _memory,                                       VirtualSpace)                          \
  nonstatic_field(CodeHeap,                    _segmap,                                       VirtualSpace)                          \
  nonstatic_field(CodeHeap,                    _log2_segment_size,                            int)                                   \
  nonstatic_field(HeapBlock,                   _header,                                       HeapBlock::Header)                     \
  nonstatic_field(HeapBlock::Header,           _length,                                       size_t)                                \
  nonstatic_field(HeapBlock::Header,           _used,                                         bool)                                  \
                                                                                                                                     \
  /**********************************/                                                                                               \
  /* Interpreter (NOTE: incomplete) */                                                                                               \
  /**********************************/                                                                                               \
                                                                                                                                     \
     static_field(AbstractInterpreter,         _code,                                         StubQueue*)                            \
                                                                                                                                     \
  /****************************/                                                                                                     \
  /* Stubs (NOTE: incomplete) */                                                                                                     \
  /****************************/                                                                                                     \
                                                                                                                                     \
  nonstatic_field(StubQueue,                   _stub_buffer,                                  address)                               \
  nonstatic_field(StubQueue,                   _buffer_limit,                                 int)                                   \
  nonstatic_field(StubQueue,                   _queue_begin,                                  int)                                   \
  nonstatic_field(StubQueue,                   _queue_end,                                    int)                                   \
  nonstatic_field(StubQueue,                   _number_of_stubs,                              int)                                   \
  nonstatic_field(InterpreterCodelet,          _size,                                         int)                                   \
  nonstatic_field(InterpreterCodelet,          _description,                                  const char*)                           \
  nonstatic_field(InterpreterCodelet,          _bytecode,                                     Bytecodes::Code)                       \
                                                                                                                                     \
  /***********************************/                                                                                              \
  /* StubRoutines (NOTE: incomplete) */                                                                                              \
  /***********************************/                                                                                              \
                                                                                                                                     \
808
     static_field(StubRoutines,                _verify_oop_count,                             jint)                                  \
D
duke 已提交
809
     static_field(StubRoutines,                _call_stub_return_address,                     address)                               \
810 811 812 813 814 815 816 817 818 819 820 821
     static_field(StubRoutines,                _aescrypt_encryptBlock,                        address)                               \
     static_field(StubRoutines,                _aescrypt_decryptBlock,                        address)                               \
     static_field(StubRoutines,                _cipherBlockChaining_encryptAESCrypt,          address)                               \
     static_field(StubRoutines,                _cipherBlockChaining_decryptAESCrypt,          address)                               \
     static_field(StubRoutines,                _updateBytesCRC32,                             address)                               \
     static_field(StubRoutines,                _crc_table_adr,                                address)                               \
                                                                                                                                     \
  /*****************/                                                                                                                \
  /* SharedRuntime */                                                                                                                \
  /*****************/                                                                                                                \
                                                                                                                                     \
     static_field(SharedRuntime,               _ic_miss_blob,                                 RuntimeStub*)                          \
D
duke 已提交
822 823 824 825 826 827 828
                                                                                                                                     \
  /***************************************/                                                                                          \
  /* PcDesc and other compiled code info */                                                                                          \
  /***************************************/                                                                                          \
                                                                                                                                     \
  nonstatic_field(PcDesc,                      _pc_offset,                                    int)                                   \
  nonstatic_field(PcDesc,                      _scope_decode_offset,                          int)                                   \
829
  nonstatic_field(PcDesc,                      _obj_decode_offset,                            int)                                   \
830
  nonstatic_field(PcDesc,                      _flags,                                        int)                                   \
D
duke 已提交
831 832 833 834 835 836 837 838 839
                                                                                                                                     \
  /***************************************************/                                                                              \
  /* CodeBlobs (NOTE: incomplete, but only a little) */                                                                              \
  /***************************************************/                                                                              \
                                                                                                                                     \
  nonstatic_field(CodeBlob,                    _name,                                         const char*)                           \
  nonstatic_field(CodeBlob,                    _size,                                         int)                                   \
  nonstatic_field(CodeBlob,                    _header_size,                                  int)                                   \
  nonstatic_field(CodeBlob,                    _relocation_size,                              int)                                   \
T
twisti 已提交
840 841
  nonstatic_field(CodeBlob,                    _content_offset,                               int)                                   \
  nonstatic_field(CodeBlob,                    _code_offset,                                  int)                                   \
D
duke 已提交
842 843 844 845 846
  nonstatic_field(CodeBlob,                    _frame_complete_offset,                        int)                                   \
  nonstatic_field(CodeBlob,                    _data_offset,                                  int)                                   \
  nonstatic_field(CodeBlob,                    _frame_size,                                   int)                                   \
  nonstatic_field(CodeBlob,                    _oop_maps,                                     OopMapSet*)                            \
                                                                                                                                     \
847 848
  nonstatic_field(RuntimeStub,                 _caller_must_gc_arguments,                     bool)                                  \
                                                                                                                                     \
D
duke 已提交
849 850 851 852
  /**************************************************/                                                                               \
  /* NMethods (NOTE: incomplete, but only a little) */                                                                               \
  /**************************************************/                                                                               \
                                                                                                                                     \
853
  nonstatic_field(nmethod,             _method,                                       Method*)                        \
D
duke 已提交
854
  nonstatic_field(nmethod,             _entry_bci,                                    int)                                   \
855 856 857
  nonstatic_field(nmethod,             _osr_link,                                     nmethod*)                              \
  nonstatic_field(nmethod,             _scavenge_root_link,                           nmethod*)                              \
  nonstatic_field(nmethod,             _scavenge_root_state,                          jbyte)                                 \
858
  nonstatic_field(nmethod,             _state,                                        volatile unsigned char)                \
D
duke 已提交
859 860
  nonstatic_field(nmethod,             _exception_offset,                             int)                                   \
  nonstatic_field(nmethod,             _deoptimize_offset,                            int)                                   \
861
  nonstatic_field(nmethod,             _deoptimize_mh_offset,                         int)                                   \
D
duke 已提交
862 863
  nonstatic_field(nmethod,             _orig_pc_offset,                               int)                                   \
  nonstatic_field(nmethod,             _stub_offset,                                  int)                                   \
864 865
  nonstatic_field(nmethod,             _consts_offset,                                int)                                   \
  nonstatic_field(nmethod,             _oops_offset,                                  int)                                   \
866
  nonstatic_field(nmethod,             _metadata_offset,                              int)                                   \
D
duke 已提交
867 868 869 870 871 872 873 874 875 876 877
  nonstatic_field(nmethod,             _scopes_data_offset,                           int)                                   \
  nonstatic_field(nmethod,             _scopes_pcs_offset,                            int)                                   \
  nonstatic_field(nmethod,             _dependencies_offset,                          int)                                   \
  nonstatic_field(nmethod,             _handler_table_offset,                         int)                                   \
  nonstatic_field(nmethod,             _nul_chk_table_offset,                         int)                                   \
  nonstatic_field(nmethod,             _nmethod_end_offset,                           int)                                   \
  nonstatic_field(nmethod,             _entry_point,                                  address)                               \
  nonstatic_field(nmethod,             _verified_entry_point,                         address)                               \
  nonstatic_field(nmethod,             _osr_entry_point,                              address)                               \
  nonstatic_field(nmethod,             _lock_count,                                   jint)                                  \
  nonstatic_field(nmethod,             _stack_traversal_mark,                         long)                                  \
878
  nonstatic_field(nmethod,             _compile_id,                                   int)                                   \
879
  nonstatic_field(nmethod,             _comp_level,                                   int)                                   \
N
never 已提交
880
  nonstatic_field(nmethod,             _exception_cache,                              ExceptionCache*)                       \
881
  nonstatic_field(nmethod,             _marked_for_deoptimization,                    bool)                                  \
882 883
                                                                                                                             \
  unchecked_c2_static_field(Deoptimization,         _trap_reason_name,                   void*)                              \
N
never 已提交
884
                                                                                                                                     \
D
duke 已提交
885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904
  /********************************/                                                                                                 \
  /* JavaCalls (NOTE: incomplete) */                                                                                                 \
  /********************************/                                                                                                 \
                                                                                                                                     \
  nonstatic_field(JavaCallWrapper,             _anchor,                                       JavaFrameAnchor)                       \
  /********************************/                                                                                                 \
  /* JavaFrameAnchor (NOTE: incomplete) */                                                                                           \
  /********************************/                                                                                                 \
  volatile_nonstatic_field(JavaFrameAnchor,    _last_Java_sp,                                 intptr_t*)                             \
  volatile_nonstatic_field(JavaFrameAnchor,    _last_Java_pc,                                 address)                               \
                                                                                                                                     \
  /******************************/                                                                                                   \
  /* Threads (NOTE: incomplete) */                                                                                                   \
  /******************************/                                                                                                   \
                                                                                                                                     \
     static_field(Threads,                     _thread_list,                                  JavaThread*)                           \
     static_field(Threads,                     _number_of_threads,                            int)                                   \
     static_field(Threads,                     _number_of_non_daemon_threads,                 int)                                   \
     static_field(Threads,                     _return_code,                                  int)                                   \
                                                                                                                                     \
N
never 已提交
905 906 907
  nonstatic_field(ThreadShadow,                _pending_exception,                            oop)                                   \
  nonstatic_field(ThreadShadow,                _exception_file,                               const char*)                           \
  nonstatic_field(ThreadShadow,                _exception_line,                               int)                                   \
D
duke 已提交
908 909 910
   volatile_nonstatic_field(Thread,            _suspend_flags,                                uint32_t)                              \
  nonstatic_field(Thread,                      _active_handles,                               JNIHandleBlock*)                       \
  nonstatic_field(Thread,                      _tlab,                                         ThreadLocalAllocBuffer)                \
911
  nonstatic_field(Thread,                      _allocated_bytes,                              jlong)                                 \
D
duke 已提交
912 913 914 915
  nonstatic_field(Thread,                      _current_pending_monitor,                      ObjectMonitor*)                        \
  nonstatic_field(Thread,                      _current_pending_monitor_is_from_java,         bool)                                  \
  nonstatic_field(Thread,                      _current_waiting_monitor,                      ObjectMonitor*)                        \
  nonstatic_field(NamedThread,                 _name,                                         char*)                                 \
916
  nonstatic_field(NamedThread,                 _processed_thread,                             JavaThread*)                           \
D
duke 已提交
917 918 919
  nonstatic_field(JavaThread,                  _next,                                         JavaThread*)                           \
  nonstatic_field(JavaThread,                  _threadObj,                                    oop)                                   \
  nonstatic_field(JavaThread,                  _anchor,                                       JavaFrameAnchor)                       \
N
never 已提交
920
  nonstatic_field(JavaThread,                  _vm_result,                                    oop)                                   \
921
  nonstatic_field(JavaThread,                  _vm_result_2,                                  Metadata*)                             \
N
never 已提交
922 923 924
  nonstatic_field(JavaThread,                  _pending_async_exception,                      oop)                                   \
  volatile_nonstatic_field(JavaThread,         _exception_oop,                                oop)                                   \
  volatile_nonstatic_field(JavaThread,         _exception_pc,                                 address)                               \
925
  volatile_nonstatic_field(JavaThread,         _is_method_handle_return,                      int)                                   \
N
never 已提交
926 927
  nonstatic_field(JavaThread,                  _special_runtime_exit_condition,               JavaThread::AsyncRequests)             \
  nonstatic_field(JavaThread,                  _saved_exception_pc,                           address)                               \
D
duke 已提交
928 929 930 931
   volatile_nonstatic_field(JavaThread,        _thread_state,                                 JavaThreadState)                       \
  nonstatic_field(JavaThread,                  _osthread,                                     OSThread*)                             \
  nonstatic_field(JavaThread,                  _stack_base,                                   address)                               \
  nonstatic_field(JavaThread,                  _stack_size,                                   size_t)                                \
N
never 已提交
932 933
  nonstatic_field(JavaThread,                  _vframe_array_head,                            vframeArray*)                          \
  nonstatic_field(JavaThread,                  _vframe_array_last,                            vframeArray*)                          \
934 935
  nonstatic_field(JavaThread,                  _satb_mark_queue,                              ObjPtrQueue)                           \
  nonstatic_field(JavaThread,                  _dirty_card_queue,                             DirtyCardQueue)                        \
N
never 已提交
936 937
  nonstatic_field(Thread,                      _resource_area,                                ResourceArea*)                         \
  nonstatic_field(CompilerThread,              _env,                                          ciEnv*)                                \
D
duke 已提交
938 939 940 941 942
                                                                                                                                     \
  /************/                                                                                                                     \
  /* OSThread */                                                                                                                     \
  /************/                                                                                                                     \
                                                                                                                                     \
943
  volatile_nonstatic_field(OSThread,           _interrupted,                                  jint)                                  \
D
duke 已提交
944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986
                                                                                                                                     \
  /************************/                                                                                                         \
  /* OopMap and OopMapSet */                                                                                                         \
  /************************/                                                                                                         \
                                                                                                                                     \
  nonstatic_field(OopMap,                      _pc_offset,                                    int)                                   \
  nonstatic_field(OopMap,                      _omv_count,                                    int)                                   \
  nonstatic_field(OopMap,                      _omv_data_size,                                int)                                   \
  nonstatic_field(OopMap,                      _omv_data,                                     unsigned char*)                        \
  nonstatic_field(OopMap,                      _write_stream,                                 CompressedWriteStream*)                \
  nonstatic_field(OopMapSet,                   _om_count,                                     int)                                   \
  nonstatic_field(OopMapSet,                   _om_size,                                      int)                                   \
  nonstatic_field(OopMapSet,                   _om_data,                                      OopMap**)                              \
                                                                                                                                     \
  /*********************************/                                                                                                \
  /* JNIHandles and JNIHandleBlock */                                                                                                \
  /*********************************/                                                                                                \
     static_field(JNIHandles,                  _global_handles,                               JNIHandleBlock*)                       \
     static_field(JNIHandles,                  _weak_global_handles,                          JNIHandleBlock*)                       \
     static_field(JNIHandles,                  _deleted_handle,                               oop)                                   \
                                                                                                                                     \
  unchecked_nonstatic_field(JNIHandleBlock,    _handles,                                      JNIHandleBlock::block_size_in_oops * sizeof(Oop)) /* Note: no type */ \
  nonstatic_field(JNIHandleBlock,              _top,                                          int)                                   \
  nonstatic_field(JNIHandleBlock,              _next,                                         JNIHandleBlock*)                       \
                                                                                                                                     \
  /********************/                                                                                                             \
  /* CompressedStream */                                                                                                             \
  /********************/                                                                                                             \
                                                                                                                                     \
  nonstatic_field(CompressedStream,            _buffer,                                       u_char*)                               \
  nonstatic_field(CompressedStream,            _position,                                     int)                                   \
                                                                                                                                     \
  /*********************************/                                                                                                \
  /* VMRegImpl (NOTE: incomplete) */                                                                                                 \
  /*********************************/                                                                                                \
                                                                                                                                     \
     static_field(VMRegImpl,                   regName[0],                                    const char*)                           \
     static_field(VMRegImpl,                   stack0,                                        VMReg)                                 \
                                                                                                                                     \
  /*******************************/                                                                                                  \
  /* Runtime1 (NOTE: incomplete) */                                                                                                  \
  /*******************************/                                                                                                  \
                                                                                                                                     \
N
never 已提交
987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012
  unchecked_c1_static_field(Runtime1,          _blobs,                                 sizeof(Runtime1::_blobs)) /* NOTE: no type */ \
                                                                                                                                     \
  /**************/                                                                                                                   \
  /* allocation */                                                                                                                   \
  /**************/                                                                                                                   \
                                                                                                                                     \
  nonstatic_field(Chunk, _next, Chunk*)                                                                                              \
  nonstatic_field(Chunk, _len, const size_t)                                                                                         \
                                                                                                                                     \
  nonstatic_field(Arena, _first, Chunk*)                                                                                             \
  nonstatic_field(Arena, _chunk, Chunk*)                                                                                             \
  nonstatic_field(Arena, _hwm, char*)                                                                                                \
  nonstatic_field(Arena, _max, char*)                                                                                                \
                                                                                                                                     \
  /************/                                                                                                                     \
  /* CI */                                                                                                                           \
  /************/                                                                                                                     \
                                                                                                                                     \
 nonstatic_field(ciEnv,               _system_dictionary_modification_counter, int)                                                  \
 nonstatic_field(ciEnv,               _compiler_data, void*)                                                                         \
 nonstatic_field(ciEnv,               _failure_reason, const char*)                                                                  \
 nonstatic_field(ciEnv,               _factory, ciObjectFactory*)                                                                    \
 nonstatic_field(ciEnv,               _dependencies, Dependencies*)                                                                  \
 nonstatic_field(ciEnv,               _task, CompileTask*)                                                                           \
 nonstatic_field(ciEnv,               _arena, Arena*)                                                                                \
                                                                                                                                     \
1013 1014
 nonstatic_field(ciBaseObject,    _ident, uint)                                                                                      \
                                                                                                                                     \
N
never 已提交
1015 1016 1017
 nonstatic_field(ciObject,    _handle, jobject)                                                                                      \
 nonstatic_field(ciObject,    _klass, ciKlass*)                                                                                      \
                                                                                                                                     \
1018 1019
 nonstatic_field(ciMetadata,  _metadata, Metadata*)                                                                           \
                                                                                                                                     \
N
never 已提交
1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030
 nonstatic_field(ciSymbol,    _symbol, Symbol*)                                                                                      \
                                                                                                                                     \
 nonstatic_field(ciType,    _basic_type, BasicType)                                                                                  \
                                                                                                                                     \
 nonstatic_field(ciKlass,   _name, ciSymbol*)                                                                                        \
                                                                                                                                     \
 nonstatic_field(ciArrayKlass,   _dimension, jint)                                                                                   \
                                                                                                                                     \
 nonstatic_field(ciObjArrayKlass, _element_klass, ciKlass*)                                                                          \
 nonstatic_field(ciObjArrayKlass, _base_element_klass, ciKlass*)                                                                     \
                                                                                                                                     \
1031
 nonstatic_field(ciInstanceKlass,   _init_state, InstanceKlass::ClassState)                                                          \
N
never 已提交
1032 1033 1034 1035
 nonstatic_field(ciInstanceKlass,   _is_shared,  bool)                                                                               \
                                                                                                                                     \
 nonstatic_field(ciMethod,     _interpreter_invocation_count, int)                                                                   \
 nonstatic_field(ciMethod,     _interpreter_throwout_count, int)                                                                     \
1036
 nonstatic_field(ciMethod,     _instructions_size, int)                                                                              \
N
never 已提交
1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047
                                                                                                                                     \
 nonstatic_field(ciMethodData, _data_size, int)                                                                                      \
 nonstatic_field(ciMethodData, _state, u_char)                                                                                       \
 nonstatic_field(ciMethodData, _extra_data_size, int)                                                                                \
 nonstatic_field(ciMethodData, _data, intptr_t*)                                                                                     \
 nonstatic_field(ciMethodData, _hint_di, int)                                                                                        \
 nonstatic_field(ciMethodData, _eflags, intx)                                                                                        \
 nonstatic_field(ciMethodData, _arg_local, intx)                                                                                     \
 nonstatic_field(ciMethodData, _arg_stack, intx)                                                                                     \
 nonstatic_field(ciMethodData, _arg_returned, intx)                                                                                  \
 nonstatic_field(ciMethodData, _current_mileage, int)                                                                                \
1048
 nonstatic_field(ciMethodData, _orig, MethodData)                                                                             \
N
never 已提交
1049 1050 1051 1052 1053 1054 1055 1056
                                                                                                                                     \
 nonstatic_field(ciField,     _holder, ciInstanceKlass*)                                                                             \
 nonstatic_field(ciField,     _name, ciSymbol*)                                                                                      \
 nonstatic_field(ciField,     _signature, ciSymbol*)                                                                                 \
 nonstatic_field(ciField,     _offset, int)                                                                                          \
 nonstatic_field(ciField,     _is_constant, bool)                                                                                    \
 nonstatic_field(ciField,     _constant_value, ciConstant)                                                                           \
                                                                                                                                     \
1057
 nonstatic_field(ciObjectFactory,     _ci_metadata, GrowableArray<ciMetadata*>*)                                                     \
N
never 已提交
1058 1059 1060 1061 1062 1063 1064 1065 1066
 nonstatic_field(ciObjectFactory,     _symbols, GrowableArray<ciSymbol*>*)                                                           \
 nonstatic_field(ciObjectFactory,     _unloaded_methods, GrowableArray<ciMethod*>*)                                                  \
                                                                                                                                     \
 nonstatic_field(ciConstant,     _type, BasicType)                                                                                   \
 nonstatic_field(ciConstant,     _value._int, jint)                                                                                  \
 nonstatic_field(ciConstant,     _value._long, jlong)                                                                                \
 nonstatic_field(ciConstant,     _value._float, jfloat)                                                                              \
 nonstatic_field(ciConstant,     _value._double, jdouble)                                                                            \
 nonstatic_field(ciConstant,     _value._object, ciObject*)                                                                          \
D
duke 已提交
1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087
                                                                                                                                     \
  /************/                                                                                                                     \
  /* Monitors */                                                                                                                     \
  /************/                                                                                                                     \
                                                                                                                                     \
  volatile_nonstatic_field(ObjectMonitor,      _header,                                       markOop)                               \
  unchecked_nonstatic_field(ObjectMonitor,     _object,                                       sizeof(void *)) /* NOTE: no type */    \
  unchecked_nonstatic_field(ObjectMonitor,     _owner,                                        sizeof(void *)) /* NOTE: no type */    \
  volatile_nonstatic_field(ObjectMonitor,      _count,                                        intptr_t)                              \
  volatile_nonstatic_field(ObjectMonitor,      _waiters,                                      intptr_t)                              \
  volatile_nonstatic_field(ObjectMonitor,      _recursions,                                   intptr_t)                              \
  nonstatic_field(ObjectMonitor,               FreeNext,                                      ObjectMonitor*)                        \
  volatile_nonstatic_field(BasicLock,          _displaced_header,                             markOop)                               \
  nonstatic_field(BasicObjectLock,             _lock,                                         BasicLock)                             \
  nonstatic_field(BasicObjectLock,             _obj,                                          oop)                                   \
  static_field(ObjectSynchronizer,             gBlockList,                                    ObjectMonitor*)                        \
                                                                                                                                     \
  /*********************/                                                                                                            \
  /* Matcher (C2 only) */                                                                                                            \
  /*********************/                                                                                                            \
                                                                                                                                     \
N
never 已提交
1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110
  unchecked_c2_static_field(Matcher,           _regEncode,                          sizeof(Matcher::_regEncode)) /* NOTE: no type */ \
                                                                                                                                     \
  c2_nonstatic_field(Node,               _in,                      Node**)                                                           \
  c2_nonstatic_field(Node,               _out,                     Node**)                                                           \
  c2_nonstatic_field(Node,               _cnt,                     node_idx_t)                                                       \
  c2_nonstatic_field(Node,               _max,                     node_idx_t)                                                       \
  c2_nonstatic_field(Node,               _outcnt,                  node_idx_t)                                                       \
  c2_nonstatic_field(Node,               _outmax,                  node_idx_t)                                                       \
  c2_nonstatic_field(Node,               _idx,                     const node_idx_t)                                                 \
  c2_nonstatic_field(Node,               _class_id,                jushort)                                                          \
  c2_nonstatic_field(Node,               _flags,                   jushort)                                                          \
                                                                                                                                     \
  c2_nonstatic_field(Compile,            _root,                    RootNode*)                                                        \
  c2_nonstatic_field(Compile,            _unique,                  uint)                                                             \
  c2_nonstatic_field(Compile,            _entry_bci,               int)                                                              \
  c2_nonstatic_field(Compile,            _top,                     Node*)                                                            \
  c2_nonstatic_field(Compile,            _cfg,                     PhaseCFG*)                                                        \
  c2_nonstatic_field(Compile,            _regalloc,                PhaseRegAlloc*)                                                   \
  c2_nonstatic_field(Compile,            _method,                  ciMethod*)                                                        \
  c2_nonstatic_field(Compile,            _compile_id,              const int)                                                        \
  c2_nonstatic_field(Compile,            _save_argument_registers, const bool)                                                       \
  c2_nonstatic_field(Compile,            _subsume_loads,           const bool)                                                       \
  c2_nonstatic_field(Compile,            _do_escape_analysis,      const bool)                                                       \
1111
  c2_nonstatic_field(Compile,            _eliminate_boxing,        const bool)                                                       \
N
never 已提交
1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156
  c2_nonstatic_field(Compile,            _ilt,                     InlineTree*)                                                      \
                                                                                                                                     \
  c2_nonstatic_field(InlineTree,         _caller_jvms,             JVMState*)                                                        \
  c2_nonstatic_field(InlineTree,         _method,                  ciMethod*)                                                        \
  c2_nonstatic_field(InlineTree,         _caller_tree,             InlineTree*)                                                      \
  c2_nonstatic_field(InlineTree,         _subtrees,                GrowableArray<InlineTree*>)                                       \
                                                                                                                                     \
  c2_nonstatic_field(OptoRegPair,        _first,                   short)                                                            \
  c2_nonstatic_field(OptoRegPair,        _second,                  short)                                                            \
                                                                                                                                     \
  c2_nonstatic_field(JVMState,           _caller,                  JVMState*)                                                        \
  c2_nonstatic_field(JVMState,           _depth,                   uint)                                                             \
  c2_nonstatic_field(JVMState,           _locoff,                  uint)                                                             \
  c2_nonstatic_field(JVMState,           _stkoff,                  uint)                                                             \
  c2_nonstatic_field(JVMState,           _monoff,                  uint)                                                             \
  c2_nonstatic_field(JVMState,           _scloff,                  uint)                                                             \
  c2_nonstatic_field(JVMState,           _endoff,                  uint)                                                             \
  c2_nonstatic_field(JVMState,           _sp,                      uint)                                                             \
  c2_nonstatic_field(JVMState,           _bci,                     int)                                                              \
  c2_nonstatic_field(JVMState,           _method,                  ciMethod*)                                                        \
  c2_nonstatic_field(JVMState,           _map,                     SafePointNode*)                                                   \
                                                                                                                                     \
  c2_nonstatic_field(SafePointNode,      _jvms,                    JVMState* const)                                                  \
                                                                                                                                     \
  c2_nonstatic_field(MachSafePointNode,  _jvms,                    JVMState*)                                                        \
  c2_nonstatic_field(MachSafePointNode,  _jvmadj,                  uint)                                                             \
                                                                                                                                     \
  c2_nonstatic_field(MachIfNode,         _prob,                    jfloat)                                                           \
  c2_nonstatic_field(MachIfNode,         _fcnt,                    jfloat)                                                           \
                                                                                                                                     \
  c2_nonstatic_field(CallNode,           _entry_point,             address)                                                          \
                                                                                                                                     \
  c2_nonstatic_field(CallJavaNode,       _method,                  ciMethod*)                                                        \
                                                                                                                                     \
  c2_nonstatic_field(CallRuntimeNode,    _name,                    const char*)                                                      \
                                                                                                                                     \
  c2_nonstatic_field(CallStaticJavaNode, _name,                    const char*)                                                      \
                                                                                                                                     \
  c2_nonstatic_field(MachCallJavaNode,   _method,                  ciMethod*)                                                        \
  c2_nonstatic_field(MachCallJavaNode,   _bci,                     int)                                                              \
                                                                                                                                     \
  c2_nonstatic_field(MachCallStaticJavaNode, _name,                const char*)                                                      \
                                                                                                                                     \
  c2_nonstatic_field(MachCallRuntimeNode,  _name,                  const char*)                                                      \
                                                                                                                                     \
1157
  c2_nonstatic_field(PhaseCFG,           _number_of_blocks,        uint)                                                             \
N
never 已提交
1158
  c2_nonstatic_field(PhaseCFG,           _blocks,                  Block_List)                                                       \
1159
  c2_nonstatic_field(PhaseCFG,           _node_to_block_mapping,   Block_Array)                                                      \
1160
  c2_nonstatic_field(PhaseCFG,           _root_block,              Block*)                                                           \
N
never 已提交
1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195
                                                                                                                                     \
  c2_nonstatic_field(PhaseRegAlloc,      _node_regs,               OptoRegPair*)                                                     \
  c2_nonstatic_field(PhaseRegAlloc,      _node_regs_max_index,     uint)                                                             \
  c2_nonstatic_field(PhaseRegAlloc,      _framesize,               uint)                                                             \
  c2_nonstatic_field(PhaseRegAlloc,      _max_reg,                 OptoReg::Name)                                                    \
                                                                                                                                     \
  c2_nonstatic_field(PhaseChaitin,       _trip_cnt,                int)                                                              \
  c2_nonstatic_field(PhaseChaitin,       _alternate,               int)                                                              \
  c2_nonstatic_field(PhaseChaitin,       _lo_degree,               uint)                                                             \
  c2_nonstatic_field(PhaseChaitin,       _lo_stk_degree,           uint)                                                             \
  c2_nonstatic_field(PhaseChaitin,       _hi_degree,               uint)                                                             \
  c2_nonstatic_field(PhaseChaitin,       _simplified,              uint)                                                             \
                                                                                                                                     \
  c2_nonstatic_field(Block,              _nodes,                   Node_List)                                                        \
  c2_nonstatic_field(Block,              _succs,                   Block_Array)                                                      \
  c2_nonstatic_field(Block,              _num_succs,               uint)                                                             \
  c2_nonstatic_field(Block,              _pre_order,               uint)                                                             \
  c2_nonstatic_field(Block,              _dom_depth,               uint)                                                             \
  c2_nonstatic_field(Block,              _idom,                    Block*)                                                           \
  c2_nonstatic_field(Block,              _freq,                    jfloat)                                                           \
                                                                                                                                     \
  c2_nonstatic_field(CFGElement,         _freq,                    jfloat)                                                           \
                                                                                                                                     \
  c2_nonstatic_field(Block_List,         _cnt,                     uint)                                                             \
                                                                                                                                     \
  c2_nonstatic_field(Block_Array,        _size,                    uint)                                                             \
  c2_nonstatic_field(Block_Array,        _blocks,                  Block**)                                                          \
  c2_nonstatic_field(Block_Array,        _arena,                   Arena*)                                                           \
                                                                                                                                     \
  c2_nonstatic_field(Node_List,          _cnt,                     uint)                                                             \
                                                                                                                                     \
  c2_nonstatic_field(Node_Array,         _max,                     uint)                                                             \
  c2_nonstatic_field(Node_Array,         _nodes,                   Node**)                                                           \
  c2_nonstatic_field(Node_Array,         _a,                       Arena*)                                                           \
                                                                                                                                     \
D
duke 已提交
1196 1197 1198 1199 1200
                                                                                                                                     \
  /*********************/                                                                                                            \
  /* -XX flags         */                                                                                                            \
  /*********************/                                                                                                            \
                                                                                                                                     \
1201 1202 1203 1204
  nonstatic_field(Flag,                        _type,                                         const char*)                           \
  nonstatic_field(Flag,                        _name,                                         const char*)                           \
  unchecked_nonstatic_field(Flag,              _addr,                                         sizeof(void*)) /* NOTE: no type */     \
  nonstatic_field(Flag,                        _flags,                                        Flag::Flags)                           \
D
duke 已提交
1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216
  static_field(Flag,                           flags,                                         Flag*)                                 \
  static_field(Flag,                           numFlags,                                      size_t)                                \
                                                                                                                                     \
  /*************************/                                                                                                        \
  /* JDK / VM version info */                                                                                                        \
  /*************************/                                                                                                        \
                                                                                                                                     \
  static_field(Abstract_VM_Version,            _s_vm_release,                                 const char*)                           \
  static_field(Abstract_VM_Version,            _s_internal_vm_info_string,                    const char*)                           \
  static_field(Abstract_VM_Version,            _vm_major_version,                             int)                                   \
  static_field(Abstract_VM_Version,            _vm_minor_version,                             int)                                   \
  static_field(Abstract_VM_Version,            _vm_build_number,                              int)                                   \
1217
  static_field(Abstract_VM_Version,            _reserve_for_allocation_prefetch,              int)                                   \
D
duke 已提交
1218
                                                                                                                                     \
K
kamg 已提交
1219 1220 1221
  static_field(JDK_Version,                    _current,                                      JDK_Version)                           \
  nonstatic_field(JDK_Version,                 _partially_initialized,                        bool)                                  \
  nonstatic_field(JDK_Version,                 _major,                                        unsigned char)                         \
D
duke 已提交
1222
                                                                                                                                     \
N
never 已提交
1223 1224 1225
  /*************************/                                                                                                        \
  /* JVMTI */                                                                                                                        \
  /*************************/                                                                                                        \
D
duke 已提交
1226
                                                                                                                                     \
1227
  JVMTI_STRUCTS(static_field)                                                                                                        \
D
duke 已提交
1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238
                                                                                                                                     \
  /*************/                                                                                                                    \
  /* Arguments */                                                                                                                    \
  /*************/                                                                                                                    \
                                                                                                                                     \
  static_field(Arguments,                      _jvm_flags_array,                              char**)                                \
  static_field(Arguments,                      _num_jvm_flags,                                int)                                   \
  static_field(Arguments,                      _jvm_args_array,                               char**)                                \
  static_field(Arguments,                      _num_jvm_args,                                 int)                                   \
  static_field(Arguments,                      _java_command,                                 char*)                                 \
                                                                                                                                     \
1239 1240 1241 1242 1243 1244 1245 1246
  /************/                                                                                                                     \
  /* Array<T> */                                                                                                                     \
  /************/                                                                                                                     \
                                                                                                                                     \
  nonstatic_field(Array<int>,                      _length,                                   int)                                   \
  unchecked_nonstatic_field(Array<int>,            _data,                                     sizeof(int))                           \
  unchecked_nonstatic_field(Array<u1>,             _data,                                     sizeof(u1))                            \
  unchecked_nonstatic_field(Array<u2>,             _data,                                     sizeof(u2))                            \
1247
  unchecked_nonstatic_field(Array<Method*>,        _data,                                     sizeof(Method*))                       \
1248 1249
  unchecked_nonstatic_field(Array<Klass*>,         _data,                                     sizeof(Klass*))                        \
                                                                                                                                     \
1250 1251 1252 1253
  /*********************************/                                                                                                \
  /* java_lang_Class fields        */                                                                                                \
  /*********************************/                                                                                                \
                                                                                                                                     \
1254 1255 1256 1257
  static_field(java_lang_Class,                _klass_offset,                                 int)                                   \
  static_field(java_lang_Class,                _array_klass_offset,                           int)                                   \
  static_field(java_lang_Class,                _oop_size_offset,                              int)                                   \
  static_field(java_lang_Class,                _static_oop_field_count_offset,                int)                                   \
D
duke 已提交
1258 1259 1260 1261 1262
                                                                                                                                     \
  /************************/                                                                                                         \
  /* Miscellaneous fields */                                                                                                         \
  /************************/                                                                                                         \
                                                                                                                                     \
1263
  nonstatic_field(CompileTask,                 _method,                                      Method*)                                \
N
never 已提交
1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276
  nonstatic_field(CompileTask,                 _osr_bci,                                     int)                                    \
  nonstatic_field(CompileTask,                 _comp_level,                                  int)                                    \
  nonstatic_field(CompileTask,                 _compile_id,                                  uint)                                   \
  nonstatic_field(CompileTask,                 _next,                                        CompileTask*)                           \
  nonstatic_field(CompileTask,                 _prev,                                        CompileTask*)                           \
                                                                                                                                     \
  nonstatic_field(vframeArray,                 _next,                                        vframeArray*)                           \
  nonstatic_field(vframeArray,                 _original,                                    frame)                                  \
  nonstatic_field(vframeArray,                 _caller,                                      frame)                                  \
  nonstatic_field(vframeArray,                 _frames,                                      int)                                    \
                                                                                                                                     \
  nonstatic_field(vframeArrayElement,          _frame,                                       frame)                                  \
  nonstatic_field(vframeArrayElement,          _bci,                                         int)                                    \
1277 1278 1279 1280 1281
  nonstatic_field(vframeArrayElement,          _method,                                      Method*)                                \
                                                                                                                                     \
  nonstatic_field(PtrQueue,                    _active,                                      bool)                                   \
  nonstatic_field(PtrQueue,                    _buf,                                         void**)                                 \
  nonstatic_field(PtrQueue,                    _index,                                       size_t)                                 \
N
never 已提交
1282 1283 1284 1285
                                                                                                                                     \
  nonstatic_field(AccessFlags,                 _flags,                                       jint)                                   \
  nonstatic_field(elapsedTimer,                _counter,                                     jlong)                                  \
  nonstatic_field(elapsedTimer,                _active,                                      bool)                                   \
1286 1287 1288 1289 1290 1291 1292 1293 1294
  nonstatic_field(InvocationCounter,           _counter,                                     unsigned int)                           \
  volatile_nonstatic_field(FreeChunk,          _size,                                        size_t)                                 \
  nonstatic_field(FreeChunk,                   _next,                                        FreeChunk*)                             \
  nonstatic_field(FreeChunk,                   _prev,                                        FreeChunk*)                             \
  nonstatic_field(FreeList<FreeChunk>,         _size,                                        size_t)                                 \
  nonstatic_field(FreeList<Metablock>,         _size,                                        size_t)                                 \
  nonstatic_field(FreeList<FreeChunk>,         _count,                                       ssize_t)                                \
  nonstatic_field(FreeList<Metablock>,         _count,                                       ssize_t)                                \
  nonstatic_field(MetablockTreeDictionary,     _total_size,                                  size_t)
D
duke 已提交
1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334


//--------------------------------------------------------------------------------
// VM_TYPES
//
// This list must enumerate at least all of the types in the above
// list. For the types in the above list, the entry below must have
// exactly the same spacing since string comparisons are done in the
// code which verifies the consistency of these tables (in the debug
// build).
//
// In addition to the above types, this list is required to enumerate
// the JNI's java types, which are used to indicate the size of Java
// fields in this VM to the SA. Further, oop types are currently
// distinguished by name (i.e., ends with "oop") over in the SA.
//
// The declare_toplevel_type macro should be used to declare types
// which do not have a superclass.
//
// The declare_integer_type and declare_unsigned_integer_type macros
// are required in order to properly identify C integer types over in
// the SA. They should be used for any type which is otherwise opaque
// and which it is necessary to coerce into an integer value. This
// includes, for example, the type uintptr_t. Note that while they
// will properly identify the type's size regardless of the platform,
// since it is does not seem possible to deduce or check signedness at
// compile time using the pointer comparison tricks, it is currently
// required that the given types have the same signedness across all
// platforms.
//
// NOTE that there are platform-specific additions to this table in
// vmStructs_<os>_<cpu>.hpp.

#define VM_TYPES(declare_type,                                            \
                 declare_toplevel_type,                                   \
                 declare_oop_type,                                        \
                 declare_integer_type,                                    \
                 declare_unsigned_integer_type,                           \
                 declare_c1_toplevel_type,                                \
                 declare_c2_type,                                         \
1335
                 declare_c2_toplevel_type)                                \
D
duke 已提交
1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369
                                                                          \
  /*************************************************************/         \
  /* Java primitive types -- required by the SA implementation */         \
  /* in order to determine the size of Java fields in this VM  */         \
  /* (the implementation looks up these names specifically)    */         \
  /* NOTE: since we fetch these sizes from the remote VM, we   */         \
  /* have a bootstrapping sequence during which it is not      */         \
  /* valid to fetch Java values from the remote process, only  */         \
  /* C integer values (of known size). NOTE also that we do    */         \
  /* NOT include "Java unsigned" types like juint here; since  */         \
  /* Java does not have unsigned primitive types, those can    */         \
  /* not be mapped directly and are considered to be C integer */         \
  /* types in this system (see the "other types" section,      */         \
  /* below.)                                                   */         \
  /*************************************************************/         \
                                                                          \
  declare_toplevel_type(jboolean)                                         \
  declare_toplevel_type(jbyte)                                            \
  declare_toplevel_type(jchar)                                            \
  declare_toplevel_type(jdouble)                                          \
  declare_toplevel_type(jfloat)                                           \
  declare_toplevel_type(jint)                                             \
  declare_toplevel_type(jlong)                                            \
  declare_toplevel_type(jshort)                                           \
                                                                          \
  /*********************************************************************/ \
  /* C integer types. User-defined typedefs (like "size_t" or          */ \
  /* "intptr_t") are guaranteed to be present with the same names over */ \
  /* in the SA's type database. Names like "unsigned short" are not    */ \
  /* guaranteed to be visible through the SA's type database lookup    */ \
  /* mechanism, though they will have a Type object created for them   */ \
  /* and are valid types for Fields.                                   */ \
  /*********************************************************************/ \
  declare_integer_type(bool)                                              \
N
never 已提交
1370
  declare_integer_type(short)                                             \
D
duke 已提交
1371 1372 1373 1374
  declare_integer_type(int)                                               \
  declare_integer_type(long)                                              \
  declare_integer_type(char)                                              \
  declare_unsigned_integer_type(unsigned char)                            \
1375
  declare_unsigned_integer_type(volatile unsigned char)                   \
N
never 已提交
1376
  declare_unsigned_integer_type(u_char)                                   \
D
duke 已提交
1377
  declare_unsigned_integer_type(unsigned int)                             \
N
never 已提交
1378
  declare_unsigned_integer_type(uint)                                     \
D
duke 已提交
1379
  declare_unsigned_integer_type(unsigned short)                           \
N
never 已提交
1380
  declare_unsigned_integer_type(jushort)                                  \
D
duke 已提交
1381 1382 1383
  declare_unsigned_integer_type(unsigned long)                            \
  /* The compiler thinks this is a different type than */                 \
  /* unsigned short on Win32 */                                           \
1384
  declare_unsigned_integer_type(u1)                                       \
1385
  declare_unsigned_integer_type(u2)                                       \
D
duke 已提交
1386 1387 1388 1389 1390 1391
  declare_unsigned_integer_type(unsigned)                                 \
                                                                          \
  /*****************************/                                         \
  /* C primitive pointer types */                                         \
  /*****************************/                                         \
                                                                          \
1392
  declare_toplevel_type(void*)                                            \
D
duke 已提交
1393 1394 1395 1396 1397
  declare_toplevel_type(int*)                                             \
  declare_toplevel_type(char*)                                            \
  declare_toplevel_type(char**)                                           \
  declare_toplevel_type(u_char*)                                          \
  declare_toplevel_type(unsigned char*)                                   \
1398
  declare_toplevel_type(volatile unsigned char*)                          \
D
duke 已提交
1399 1400 1401 1402 1403 1404 1405 1406
                                                                          \
  /*******************************************************************/   \
  /* Types which it will be handy to have available over in the SA   */   \
  /* in order to do platform-independent address -> integer coercion */   \
  /* (note: these will be looked up by name)                         */   \
  /*******************************************************************/   \
                                                                          \
  declare_unsigned_integer_type(size_t)                                   \
1407
  declare_integer_type(ssize_t)                                           \
D
duke 已提交
1408 1409 1410 1411 1412 1413 1414
  declare_integer_type(intx)                                              \
  declare_integer_type(intptr_t)                                          \
  declare_unsigned_integer_type(uintx)                                    \
  declare_unsigned_integer_type(uintptr_t)                                \
  declare_unsigned_integer_type(uint32_t)                                 \
  declare_unsigned_integer_type(uint64_t)                                 \
                                                                          \
1415 1416 1417
  /******************************************/                            \
  /* OopDesc hierarchy (NOTE: some missing) */                            \
  /******************************************/                            \
D
duke 已提交
1418 1419
                                                                          \
  declare_toplevel_type(oopDesc)                                          \
1420 1421 1422 1423 1424 1425 1426 1427 1428
    declare_type(arrayOopDesc, oopDesc)                                   \
      declare_type(objArrayOopDesc, arrayOopDesc)                         \
    declare_type(instanceOopDesc, oopDesc)                                \
    declare_type(markOopDesc, oopDesc)                                    \
                                                                          \
  /**************************************************/                    \
  /* MetadataOopDesc hierarchy (NOTE: some missing) */                    \
  /**************************************************/                    \
                                                                          \
1429
  declare_toplevel_type(CompiledICHolder)                                 \
1430 1431 1432
  declare_toplevel_type(MetaspaceObj)                                     \
    declare_type(Metadata, MetaspaceObj)                                  \
    declare_type(Klass, Metadata)                                         \
1433 1434 1435
           declare_type(ArrayKlass, Klass)                                \
           declare_type(ObjArrayKlass, ArrayKlass)                        \
           declare_type(TypeArrayKlass, ArrayKlass)                       \
1436
      declare_type(InstanceKlass, Klass)                                  \
1437 1438 1439
        declare_type(InstanceClassLoaderKlass, InstanceKlass)             \
        declare_type(InstanceMirrorKlass, InstanceKlass)                  \
        declare_type(InstanceRefKlass, InstanceKlass)                     \
1440 1441 1442 1443 1444 1445 1446 1447
    declare_type(ConstantPool, Metadata)                                  \
    declare_type(ConstantPoolCache, MetaspaceObj)                         \
    declare_type(MethodData, Metadata)                                    \
    declare_type(Method, Metadata)                                        \
    declare_type(MethodCounters, MetaspaceObj)                            \
    declare_type(ConstMethod, MetaspaceObj)                               \
                                                                          \
  declare_toplevel_type(vtableEntry)                                      \
1448
                                                                          \
1449 1450
           declare_toplevel_type(Symbol)                                  \
           declare_toplevel_type(Symbol*)                                 \
1451
  declare_toplevel_type(volatile Metadata*)                               \
D
duke 已提交
1452
                                                                          \
1453
  declare_toplevel_type(DataLayout)                                       \
N
never 已提交
1454 1455
  declare_toplevel_type(nmethodBucket)                                    \
                                                                          \
D
duke 已提交
1456 1457 1458 1459 1460 1461 1462
  /********/                                                              \
  /* Oops */                                                              \
  /********/                                                              \
                                                                          \
  declare_oop_type(markOop)                                               \
  declare_oop_type(objArrayOop)                                           \
  declare_oop_type(oop)                                                   \
1463
  declare_oop_type(narrowOop)                                             \
D
duke 已提交
1464 1465 1466 1467 1468 1469 1470 1471
  declare_oop_type(typeArrayOop)                                          \
                                                                          \
  /*************************************/                                 \
  /* MethodOop-related data structures */                                 \
  /*************************************/                                 \
                                                                          \
  declare_toplevel_type(CheckedExceptionElement)                          \
  declare_toplevel_type(LocalVariableTableElement)                        \
1472
  declare_toplevel_type(ExceptionTableElement)                            \
1473
  declare_toplevel_type(MethodParametersElement)                          \
D
duke 已提交
1474
                                                                          \
1475 1476 1477
  declare_toplevel_type(ClassLoaderData)                                  \
  declare_toplevel_type(ClassLoaderDataGraph)                             \
                                                                          \
D
duke 已提交
1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500
  /******************************************/                            \
  /* Generation and space hierarchies       */                            \
  /* (needed for run-time type information) */                            \
  /******************************************/                            \
                                                                          \
  declare_toplevel_type(CollectedHeap)                                    \
           declare_type(SharedHeap,                   CollectedHeap)      \
           declare_type(GenCollectedHeap,             SharedHeap)         \
  declare_toplevel_type(Generation)                                       \
           declare_type(DefNewGeneration,             Generation)         \
           declare_type(CardGeneration,               Generation)         \
           declare_type(OneContigSpaceCardGeneration, CardGeneration)     \
           declare_type(TenuredGeneration,            OneContigSpaceCardGeneration) \
  declare_toplevel_type(Space)                                            \
  declare_toplevel_type(BitMap)                                           \
           declare_type(CompactibleSpace,             Space)              \
           declare_type(ContiguousSpace,              CompactibleSpace)   \
           declare_type(EdenSpace,                    ContiguousSpace)    \
           declare_type(OffsetTableContigSpace,       ContiguousSpace)    \
           declare_type(TenuredSpace,                 OffsetTableContigSpace) \
  declare_toplevel_type(BarrierSet)                                       \
           declare_type(ModRefBarrierSet,             BarrierSet)         \
           declare_type(CardTableModRefBS,            ModRefBarrierSet)   \
1501
           declare_type(CardTableModRefBSForCTRS,     CardTableModRefBS)  \
1502
  declare_toplevel_type(BarrierSet::Name)                                 \
D
duke 已提交
1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520
  declare_toplevel_type(GenRemSet)                                        \
           declare_type(CardTableRS,                  GenRemSet)          \
  declare_toplevel_type(BlockOffsetSharedArray)                           \
  declare_toplevel_type(BlockOffsetTable)                                 \
           declare_type(BlockOffsetArray,             BlockOffsetTable)   \
           declare_type(BlockOffsetArrayContigSpace,  BlockOffsetArray)   \
           declare_type(BlockOffsetArrayNonContigSpace, BlockOffsetArray) \
                                                                          \
  /* Miscellaneous other GC types */                                      \
                                                                          \
  declare_toplevel_type(ageTable)                                         \
  declare_toplevel_type(Generation::StatRecord)                           \
  declare_toplevel_type(GenerationSpec)                                   \
  declare_toplevel_type(HeapWord)                                         \
  declare_toplevel_type(MemRegion)                                        \
  declare_toplevel_type(ThreadLocalAllocBuffer)                           \
  declare_toplevel_type(VirtualSpace)                                     \
  declare_toplevel_type(WaterMark)                                        \
1521 1522
  declare_toplevel_type(ObjPtrQueue)                                      \
  declare_toplevel_type(DirtyCardQueue)                                   \
D
duke 已提交
1523 1524 1525 1526 1527 1528 1529
                                                                          \
  /* Pointers to Garbage Collection types */                              \
                                                                          \
  declare_toplevel_type(BarrierSet*)                                      \
  declare_toplevel_type(BlockOffsetSharedArray*)                          \
  declare_toplevel_type(GenRemSet*)                                       \
  declare_toplevel_type(CardTableRS*)                                     \
1530 1531 1532 1533
  declare_toplevel_type(CardTableModRefBS*)                               \
  declare_toplevel_type(CardTableModRefBS**)                              \
  declare_toplevel_type(CardTableModRefBSForCTRS*)                        \
  declare_toplevel_type(CardTableModRefBSForCTRS**)                       \
D
duke 已提交
1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560
  declare_toplevel_type(CollectedHeap*)                                   \
  declare_toplevel_type(ContiguousSpace*)                                 \
  declare_toplevel_type(DefNewGeneration*)                                \
  declare_toplevel_type(EdenSpace*)                                       \
  declare_toplevel_type(GenCollectedHeap*)                                \
  declare_toplevel_type(Generation*)                                      \
  declare_toplevel_type(GenerationSpec**)                                 \
  declare_toplevel_type(HeapWord*)                                        \
  declare_toplevel_type(MemRegion*)                                       \
  declare_toplevel_type(OffsetTableContigSpace*)                          \
  declare_toplevel_type(OneContigSpaceCardGeneration*)                    \
  declare_toplevel_type(Space*)                                           \
  declare_toplevel_type(ThreadLocalAllocBuffer*)                          \
                                                                          \
  /************************/                                              \
  /* PerfMemory - jvmstat */                                              \
  /************************/                                              \
                                                                          \
  declare_toplevel_type(PerfDataPrologue)                                 \
  declare_toplevel_type(PerfDataPrologue*)                                \
  declare_toplevel_type(PerfDataEntry)                                    \
  declare_toplevel_type(PerfMemory)                                       \
                                                                          \
  /*********************************/                                     \
  /* SymbolTable, SystemDictionary */                                     \
  /*********************************/                                     \
                                                                          \
Z
zgu 已提交
1561 1562 1563 1564
  declare_toplevel_type(BasicHashtable<mtInternal>)                       \
    declare_type(IntptrHashtable, BasicHashtable<mtInternal>)             \
  declare_type(SymbolTable, SymbolHashtable)                              \
  declare_type(StringTable, StringHashtable)                              \
1565 1566 1567
    declare_type(LoaderConstraintTable, KlassHashtable)                   \
    declare_type(KlassTwoOopHashtable, KlassHashtable)                    \
    declare_type(Dictionary, KlassTwoOopHashtable)                        \
Z
zgu 已提交
1568 1569 1570
    declare_type(PlaceholderTable, SymbolTwoOopHashtable)                 \
  declare_toplevel_type(BasicHashtableEntry<mtInternal>)                  \
  declare_type(IntptrHashtableEntry, BasicHashtableEntry<mtInternal>)     \
1571
    declare_type(DictionaryEntry, KlassHashtableEntry)                    \
Z
zgu 已提交
1572
    declare_type(PlaceholderEntry, SymbolHashtableEntry)                  \
1573
    declare_type(LoaderConstraintEntry, KlassHashtableEntry)              \
Z
zgu 已提交
1574
  declare_toplevel_type(HashtableBucket<mtInternal>)                      \
D
duke 已提交
1575
  declare_toplevel_type(SystemDictionary)                                 \
N
never 已提交
1576
  declare_toplevel_type(vmSymbols)                                        \
D
duke 已提交
1577
  declare_toplevel_type(ProtectionDomainEntry)                            \
1578
  declare_toplevel_type(ProtectionDomainCacheEntry)                       \
D
duke 已提交
1579
                                                                          \
N
never 已提交
1580 1581 1582 1583 1584 1585
  declare_toplevel_type(GenericGrowableArray)                             \
  declare_toplevel_type(GrowableArray<int>)                               \
  declare_toplevel_type(Arena)                                            \
    declare_type(ResourceArea, Arena)                                     \
  declare_toplevel_type(Chunk)                                            \
                                                                          \
D
duke 已提交
1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596
  /***********************************************************/           \
  /* Thread hierarchy (needed for run-time type information) */           \
  /***********************************************************/           \
                                                                          \
  declare_toplevel_type(Threads)                                          \
  declare_toplevel_type(ThreadShadow)                                     \
           declare_type(Thread, ThreadShadow)                             \
           declare_type(NamedThread, Thread)                              \
           declare_type(WatcherThread, Thread)                            \
           declare_type(JavaThread, Thread)                               \
           declare_type(JvmtiAgentThread, JavaThread)                     \
1597
           declare_type(ServiceThread, JavaThread)                        \
N
never 已提交
1598
  declare_type(CompilerThread, JavaThread)                                \
D
duke 已提交
1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642
  declare_toplevel_type(OSThread)                                         \
  declare_toplevel_type(JavaFrameAnchor)                                  \
                                                                          \
  /***************/                                                       \
  /* Interpreter */                                                       \
  /***************/                                                       \
                                                                          \
  declare_toplevel_type(AbstractInterpreter)                              \
                                                                          \
  /*********/                                                             \
  /* Stubs */                                                             \
  /*********/                                                             \
                                                                          \
  declare_toplevel_type(StubQueue)                                        \
  declare_toplevel_type(StubRoutines)                                     \
  declare_toplevel_type(Stub)                                             \
           declare_type(InterpreterCodelet, Stub)                         \
                                                                          \
  /*************/                                                         \
  /* JavaCalls */                                                         \
  /*************/                                                         \
                                                                          \
  declare_toplevel_type(JavaCallWrapper)                                  \
                                                                          \
  /*************/                                                         \
  /* CodeCache */                                                         \
  /*************/                                                         \
                                                                          \
  declare_toplevel_type(CodeCache)                                        \
                                                                          \
  /************/                                                          \
  /* CodeHeap */                                                          \
  /************/                                                          \
                                                                          \
  declare_toplevel_type(CodeHeap)                                         \
  declare_toplevel_type(CodeHeap*)                                        \
  declare_toplevel_type(HeapBlock)                                        \
  declare_toplevel_type(HeapBlock::Header)                                \
           declare_type(FreeBlock, HeapBlock)                             \
                                                                          \
  /*************************************************************/         \
  /* CodeBlob hierarchy (needed for run-time type information) */         \
  /*************************************************************/         \
                                                                          \
1643 1644
  declare_toplevel_type(SharedRuntime)                                    \
                                                                          \
D
duke 已提交
1645
  declare_toplevel_type(CodeBlob)                                         \
1646 1647 1648 1649 1650 1651 1652 1653 1654 1655
  declare_type(BufferBlob,               CodeBlob)                        \
  declare_type(AdapterBlob,              BufferBlob)                      \
  declare_type(MethodHandlesAdapterBlob, BufferBlob)                      \
  declare_type(nmethod,                  CodeBlob)                        \
  declare_type(RuntimeStub,              CodeBlob)                        \
  declare_type(SingletonBlob,            CodeBlob)                        \
  declare_type(SafepointBlob,            SingletonBlob)                   \
  declare_type(DeoptimizationBlob,       SingletonBlob)                   \
  declare_c2_type(ExceptionBlob,         SingletonBlob)                   \
  declare_c2_type(UncommonTrapBlob,      CodeBlob)                        \
D
duke 已提交
1656 1657 1658 1659 1660 1661
                                                                          \
  /***************************************/                               \
  /* PcDesc and other compiled code info */                               \
  /***************************************/                               \
                                                                          \
  declare_toplevel_type(PcDesc)                                           \
N
never 已提交
1662 1663 1664 1665 1666
  declare_toplevel_type(ExceptionCache)                                   \
  declare_toplevel_type(PcDescCache)                                      \
  declare_toplevel_type(Dependencies)                                     \
  declare_toplevel_type(CompileTask)                                      \
  declare_toplevel_type(Deoptimization)                                   \
D
duke 已提交
1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692
                                                                          \
  /************************/                                              \
  /* OopMap and OopMapSet */                                              \
  /************************/                                              \
                                                                          \
  declare_toplevel_type(OopMap)                                           \
  declare_toplevel_type(OopMapSet)                                        \
                                                                          \
  /********************/                                                  \
  /* CompressedStream */                                                  \
  /********************/                                                  \
                                                                          \
  declare_toplevel_type(CompressedStream)                                 \
                                                                          \
  /**************/                                                        \
  /* VMRegImpl  */                                                        \
  /**************/                                                        \
                                                                          \
  declare_toplevel_type(VMRegImpl)                                        \
                                                                          \
  /*********************************/                                     \
  /* JNIHandles and JNIHandleBlock */                                     \
  /*********************************/                                     \
                                                                          \
  declare_toplevel_type(JNIHandles)                                       \
  declare_toplevel_type(JNIHandleBlock)                                   \
N
never 已提交
1693
  declare_toplevel_type(jobject)                                          \
D
duke 已提交
1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714
                                                                          \
  /**********************/                                                \
  /* Runtime1 (C1 only) */                                                \
  /**********************/                                                \
                                                                          \
  declare_c1_toplevel_type(Runtime1)                                      \
                                                                          \
  /************/                                                          \
  /* Monitors */                                                          \
  /************/                                                          \
                                                                          \
  declare_toplevel_type(ObjectMonitor)                                    \
  declare_toplevel_type(ObjectSynchronizer)                               \
  declare_toplevel_type(BasicLock)                                        \
  declare_toplevel_type(BasicObjectLock)                                  \
                                                                          \
  /*********************/                                                 \
  /* Matcher (C2 only) */                                                 \
  /*********************/                                                 \
                                                                          \
  declare_c2_toplevel_type(Matcher)                                       \
N
never 已提交
1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798
  declare_c2_toplevel_type(Compile)                                       \
  declare_c2_toplevel_type(InlineTree)                                    \
  declare_c2_toplevel_type(OptoRegPair)                                   \
  declare_c2_toplevel_type(JVMState)                                      \
  declare_c2_toplevel_type(Phase)                                         \
    declare_c2_type(PhaseCFG, Phase)                                      \
    declare_c2_type(PhaseRegAlloc, Phase)                                 \
    declare_c2_type(PhaseChaitin, PhaseRegAlloc)                          \
  declare_c2_toplevel_type(CFGElement)                                    \
    declare_c2_type(Block, CFGElement)                                    \
  declare_c2_toplevel_type(Block_Array)                                   \
    declare_c2_type(Block_List, Block_Array)                              \
  declare_c2_toplevel_type(Node_Array)                                    \
  declare_c2_type(Node_List, Node_Array)                                  \
  declare_c2_type(Unique_Node_List, Node_List)                            \
  declare_c2_toplevel_type(Node)                                          \
  declare_c2_type(AddNode, Node)                                          \
  declare_c2_type(AddINode, AddNode)                                      \
  declare_c2_type(AddLNode, AddNode)                                      \
  declare_c2_type(AddFNode, AddNode)                                      \
  declare_c2_type(AddDNode, AddNode)                                      \
  declare_c2_type(AddPNode, Node)                                         \
  declare_c2_type(OrINode, AddNode)                                       \
  declare_c2_type(OrLNode, AddNode)                                       \
  declare_c2_type(XorINode, AddNode)                                      \
  declare_c2_type(XorLNode, AddNode)                                      \
  declare_c2_type(MaxNode, AddNode)                                       \
  declare_c2_type(MaxINode, MaxNode)                                      \
  declare_c2_type(MinINode, MaxNode)                                      \
  declare_c2_type(StartNode, MultiNode)                                   \
  declare_c2_type(StartOSRNode, StartNode)                                \
  declare_c2_type(ParmNode, ProjNode)                                     \
  declare_c2_type(ReturnNode, Node)                                       \
  declare_c2_type(RethrowNode, Node)                                      \
  declare_c2_type(TailCallNode, ReturnNode)                               \
  declare_c2_type(TailJumpNode, ReturnNode)                               \
  declare_c2_type(SafePointNode, MultiNode)                               \
  declare_c2_type(CallNode, SafePointNode)                                \
  declare_c2_type(CallJavaNode, CallNode)                                 \
  declare_c2_type(CallStaticJavaNode, CallJavaNode)                       \
  declare_c2_type(CallDynamicJavaNode, CallJavaNode)                      \
  declare_c2_type(CallRuntimeNode, CallNode)                              \
  declare_c2_type(CallLeafNode, CallRuntimeNode)                          \
  declare_c2_type(CallLeafNoFPNode, CallLeafNode)                         \
  declare_c2_type(AllocateNode, CallNode)                                 \
  declare_c2_type(AllocateArrayNode, AllocateNode)                        \
  declare_c2_type(LockNode, AbstractLockNode)                             \
  declare_c2_type(UnlockNode, AbstractLockNode)                           \
  declare_c2_type(FastLockNode, CmpNode)                                  \
  declare_c2_type(FastUnlockNode, CmpNode)                                \
  declare_c2_type(RegionNode, Node)                                       \
  declare_c2_type(JProjNode, ProjNode)                                    \
  declare_c2_type(PhiNode, TypeNode)                                      \
  declare_c2_type(GotoNode, Node)                                         \
  declare_c2_type(CProjNode, ProjNode)                                    \
  declare_c2_type(MultiBranchNode, MultiNode)                             \
  declare_c2_type(IfNode, MultiBranchNode)                                \
  declare_c2_type(IfTrueNode, CProjNode)                                  \
  declare_c2_type(IfFalseNode, CProjNode)                                 \
  declare_c2_type(PCTableNode, MultiBranchNode)                           \
  declare_c2_type(JumpNode, PCTableNode)                                  \
  declare_c2_type(JumpProjNode, JProjNode)                                \
  declare_c2_type(CatchNode, PCTableNode)                                 \
  declare_c2_type(CatchProjNode, CProjNode)                               \
  declare_c2_type(CreateExNode, TypeNode)                                 \
  declare_c2_type(ClearArrayNode, Node)                                   \
  declare_c2_type(NeverBranchNode, MultiBranchNode)                       \
  declare_c2_type(ConNode, TypeNode)                                      \
  declare_c2_type(ConINode, ConNode)                                      \
  declare_c2_type(ConPNode, ConNode)                                      \
  declare_c2_type(ConNNode, ConNode)                                      \
  declare_c2_type(ConLNode, ConNode)                                      \
  declare_c2_type(ConFNode, ConNode)                                      \
  declare_c2_type(ConDNode, ConNode)                                      \
  declare_c2_type(BinaryNode, Node)                                       \
  declare_c2_type(CMoveNode, TypeNode)                                    \
  declare_c2_type(CMoveDNode, CMoveNode)                                  \
  declare_c2_type(CMoveFNode, CMoveNode)                                  \
  declare_c2_type(CMoveINode, CMoveNode)                                  \
  declare_c2_type(CMoveLNode, CMoveNode)                                  \
  declare_c2_type(CMovePNode, CMoveNode)                                  \
  declare_c2_type(CMoveNNode, CMoveNode)                                  \
  declare_c2_type(EncodePNode, TypeNode)                                  \
  declare_c2_type(DecodeNNode, TypeNode)                                  \
1799 1800
  declare_c2_type(EncodePKlassNode, TypeNode)                             \
  declare_c2_type(DecodeNKlassNode, TypeNode)                             \
N
never 已提交
1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822
  declare_c2_type(ConstraintCastNode, TypeNode)                           \
  declare_c2_type(CastIINode, ConstraintCastNode)                         \
  declare_c2_type(CastPPNode, ConstraintCastNode)                         \
  declare_c2_type(CheckCastPPNode, TypeNode)                              \
  declare_c2_type(Conv2BNode, Node)                                       \
  declare_c2_type(ConvD2FNode, Node)                                      \
  declare_c2_type(ConvD2INode, Node)                                      \
  declare_c2_type(ConvD2LNode, Node)                                      \
  declare_c2_type(ConvF2DNode, Node)                                      \
  declare_c2_type(ConvF2INode, Node)                                      \
  declare_c2_type(ConvF2LNode, Node)                                      \
  declare_c2_type(ConvI2DNode, Node)                                      \
  declare_c2_type(ConvI2FNode, Node)                                      \
  declare_c2_type(ConvI2LNode, TypeNode)                                  \
  declare_c2_type(ConvL2DNode, Node)                                      \
  declare_c2_type(ConvL2FNode, Node)                                      \
  declare_c2_type(ConvL2INode, Node)                                      \
  declare_c2_type(CastX2PNode, Node)                                      \
  declare_c2_type(CastP2XNode, Node)                                      \
  declare_c2_type(MemBarNode, MultiNode)                                  \
  declare_c2_type(MemBarAcquireNode, MemBarNode)                          \
  declare_c2_type(MemBarReleaseNode, MemBarNode)                          \
1823 1824
  declare_c2_type(LoadFenceNode, MemBarNode)                              \
  declare_c2_type(StoreFenceNode, MemBarNode)                             \
N
never 已提交
1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898
  declare_c2_type(MemBarVolatileNode, MemBarNode)                         \
  declare_c2_type(MemBarCPUOrderNode, MemBarNode)                         \
  declare_c2_type(InitializeNode, MemBarNode)                             \
  declare_c2_type(ThreadLocalNode, Node)                                  \
  declare_c2_type(Opaque1Node, Node)                                      \
  declare_c2_type(Opaque2Node, Node)                                      \
  declare_c2_type(PartialSubtypeCheckNode, Node)                          \
  declare_c2_type(MoveI2FNode, Node)                                      \
  declare_c2_type(MoveL2DNode, Node)                                      \
  declare_c2_type(MoveF2INode, Node)                                      \
  declare_c2_type(MoveD2LNode, Node)                                      \
  declare_c2_type(DivINode, Node)                                         \
  declare_c2_type(DivLNode, Node)                                         \
  declare_c2_type(DivFNode, Node)                                         \
  declare_c2_type(DivDNode, Node)                                         \
  declare_c2_type(ModINode, Node)                                         \
  declare_c2_type(ModLNode, Node)                                         \
  declare_c2_type(ModFNode, Node)                                         \
  declare_c2_type(ModDNode, Node)                                         \
  declare_c2_type(DivModNode, MultiNode)                                  \
  declare_c2_type(DivModINode, DivModNode)                                \
  declare_c2_type(DivModLNode, DivModNode)                                \
  declare_c2_type(BoxLockNode, Node)                                      \
  declare_c2_type(LoopNode, RegionNode)                                   \
  declare_c2_type(CountedLoopNode, LoopNode)                              \
  declare_c2_type(CountedLoopEndNode, IfNode)                             \
  declare_c2_type(MachNode, Node)                                         \
  declare_c2_type(MachIdealNode, MachNode)                                \
  declare_c2_type(MachTypeNode, MachNode)                                 \
  declare_c2_type(MachBreakpointNode, MachIdealNode)                      \
  declare_c2_type(MachUEPNode, MachIdealNode)                             \
  declare_c2_type(MachPrologNode, MachIdealNode)                          \
  declare_c2_type(MachEpilogNode, MachIdealNode)                          \
  declare_c2_type(MachNopNode, MachIdealNode)                             \
  declare_c2_type(MachSpillCopyNode, MachIdealNode)                       \
  declare_c2_type(MachNullCheckNode, MachIdealNode)                       \
  declare_c2_type(MachProjNode, ProjNode)                                 \
  declare_c2_type(MachIfNode, MachNode)                                   \
  declare_c2_type(MachFastLockNode, MachNode)                             \
  declare_c2_type(MachReturnNode, MachNode)                               \
  declare_c2_type(MachSafePointNode, MachReturnNode)                      \
  declare_c2_type(MachCallNode, MachSafePointNode)                        \
  declare_c2_type(MachCallJavaNode, MachCallNode)                         \
  declare_c2_type(MachCallStaticJavaNode, MachCallJavaNode)               \
  declare_c2_type(MachCallDynamicJavaNode, MachCallJavaNode)              \
  declare_c2_type(MachCallRuntimeNode, MachCallNode)                      \
  declare_c2_type(MachHaltNode, MachReturnNode)                           \
  declare_c2_type(MachTempNode, MachNode)                                 \
  declare_c2_type(MemNode, Node)                                          \
  declare_c2_type(MergeMemNode, Node)                                     \
  declare_c2_type(LoadNode, MemNode)                                      \
  declare_c2_type(LoadBNode, LoadNode)                                    \
  declare_c2_type(LoadUSNode, LoadNode)                                   \
  declare_c2_type(LoadINode, LoadNode)                                    \
  declare_c2_type(LoadRangeNode, LoadINode)                               \
  declare_c2_type(LoadLNode, LoadNode)                                    \
  declare_c2_type(LoadL_unalignedNode, LoadLNode)                         \
  declare_c2_type(LoadFNode, LoadNode)                                    \
  declare_c2_type(LoadDNode, LoadNode)                                    \
  declare_c2_type(LoadD_unalignedNode, LoadDNode)                         \
  declare_c2_type(LoadPNode, LoadNode)                                    \
  declare_c2_type(LoadNNode, LoadNode)                                    \
  declare_c2_type(LoadKlassNode, LoadPNode)                               \
  declare_c2_type(LoadNKlassNode, LoadNNode)                              \
  declare_c2_type(LoadSNode, LoadNode)                                    \
  declare_c2_type(StoreNode, MemNode)                                     \
  declare_c2_type(StoreBNode, StoreNode)                                  \
  declare_c2_type(StoreCNode, StoreNode)                                  \
  declare_c2_type(StoreINode, StoreNode)                                  \
  declare_c2_type(StoreLNode, StoreNode)                                  \
  declare_c2_type(StoreFNode, StoreNode)                                  \
  declare_c2_type(StoreDNode, StoreNode)                                  \
  declare_c2_type(StorePNode, StoreNode)                                  \
  declare_c2_type(StoreNNode, StoreNode)                                  \
1899
  declare_c2_type(StoreNKlassNode, StoreNode)                             \
N
never 已提交
1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981
  declare_c2_type(StoreCMNode, StoreNode)                                 \
  declare_c2_type(LoadPLockedNode, LoadPNode)                             \
  declare_c2_type(SCMemProjNode, ProjNode)                                \
  declare_c2_type(LoadStoreNode, Node)                                    \
  declare_c2_type(StorePConditionalNode, LoadStoreNode)                   \
  declare_c2_type(StoreLConditionalNode, LoadStoreNode)                   \
  declare_c2_type(CompareAndSwapLNode, LoadStoreNode)                     \
  declare_c2_type(CompareAndSwapINode, LoadStoreNode)                     \
  declare_c2_type(CompareAndSwapPNode, LoadStoreNode)                     \
  declare_c2_type(CompareAndSwapNNode, LoadStoreNode)                     \
  declare_c2_type(PrefetchReadNode, Node)                                 \
  declare_c2_type(PrefetchWriteNode, Node)                                \
  declare_c2_type(MulNode, Node)                                          \
  declare_c2_type(MulINode, MulNode)                                      \
  declare_c2_type(MulLNode, MulNode)                                      \
  declare_c2_type(MulFNode, MulNode)                                      \
  declare_c2_type(MulDNode, MulNode)                                      \
  declare_c2_type(MulHiLNode, Node)                                       \
  declare_c2_type(AndINode, MulINode)                                     \
  declare_c2_type(AndLNode, MulLNode)                                     \
  declare_c2_type(LShiftINode, Node)                                      \
  declare_c2_type(LShiftLNode, Node)                                      \
  declare_c2_type(RShiftINode, Node)                                      \
  declare_c2_type(RShiftLNode, Node)                                      \
  declare_c2_type(URShiftINode, Node)                                     \
  declare_c2_type(URShiftLNode, Node)                                     \
  declare_c2_type(MultiNode, Node)                                        \
  declare_c2_type(ProjNode, Node)                                         \
  declare_c2_type(TypeNode, Node)                                         \
  declare_c2_type(NodeHash, StackObj)                                     \
  declare_c2_type(RootNode, LoopNode)                                     \
  declare_c2_type(HaltNode, Node)                                         \
  declare_c2_type(SubNode, Node)                                          \
  declare_c2_type(SubINode, SubNode)                                      \
  declare_c2_type(SubLNode, SubNode)                                      \
  declare_c2_type(SubFPNode, SubNode)                                     \
  declare_c2_type(SubFNode, SubFPNode)                                    \
  declare_c2_type(SubDNode, SubFPNode)                                    \
  declare_c2_type(CmpNode, SubNode)                                       \
  declare_c2_type(CmpINode, CmpNode)                                      \
  declare_c2_type(CmpUNode, CmpNode)                                      \
  declare_c2_type(CmpPNode, CmpNode)                                      \
  declare_c2_type(CmpNNode, CmpNode)                                      \
  declare_c2_type(CmpLNode, CmpNode)                                      \
  declare_c2_type(CmpL3Node, CmpLNode)                                    \
  declare_c2_type(CmpFNode, CmpNode)                                      \
  declare_c2_type(CmpF3Node, CmpFNode)                                    \
  declare_c2_type(CmpDNode, CmpNode)                                      \
  declare_c2_type(CmpD3Node, CmpDNode)                                    \
  declare_c2_type(BoolNode, Node)                                         \
  declare_c2_type(AbsNode, Node)                                          \
  declare_c2_type(AbsINode, AbsNode)                                      \
  declare_c2_type(AbsFNode, AbsNode)                                      \
  declare_c2_type(AbsDNode, AbsNode)                                      \
  declare_c2_type(CmpLTMaskNode, Node)                                    \
  declare_c2_type(NegNode, Node)                                          \
  declare_c2_type(NegFNode, NegNode)                                      \
  declare_c2_type(NegDNode, NegNode)                                      \
  declare_c2_type(CosDNode, Node)                                         \
  declare_c2_type(SinDNode, Node)                                         \
  declare_c2_type(TanDNode, Node)                                         \
  declare_c2_type(AtanDNode, Node)                                        \
  declare_c2_type(SqrtDNode, Node)                                        \
  declare_c2_type(ExpDNode, Node)                                         \
  declare_c2_type(LogDNode, Node)                                         \
  declare_c2_type(Log10DNode, Node)                                       \
  declare_c2_type(PowDNode, Node)                                         \
  declare_c2_type(ReverseBytesINode, Node)                                \
  declare_c2_type(ReverseBytesLNode, Node)                                \
  declare_c2_type(VectorNode, Node)                                       \
  declare_c2_type(AddVBNode, VectorNode)                                  \
  declare_c2_type(AddVSNode, VectorNode)                                  \
  declare_c2_type(AddVINode, VectorNode)                                  \
  declare_c2_type(AddVLNode, VectorNode)                                  \
  declare_c2_type(AddVFNode, VectorNode)                                  \
  declare_c2_type(AddVDNode, VectorNode)                                  \
  declare_c2_type(SubVBNode, VectorNode)                                  \
  declare_c2_type(SubVSNode, VectorNode)                                  \
  declare_c2_type(SubVINode, VectorNode)                                  \
  declare_c2_type(SubVLNode, VectorNode)                                  \
  declare_c2_type(SubVFNode, VectorNode)                                  \
  declare_c2_type(SubVDNode, VectorNode)                                  \
1982 1983
  declare_c2_type(MulVSNode, VectorNode)                                  \
  declare_c2_type(MulVINode, VectorNode)                                  \
N
never 已提交
1984 1985 1986 1987 1988 1989 1990
  declare_c2_type(MulVFNode, VectorNode)                                  \
  declare_c2_type(MulVDNode, VectorNode)                                  \
  declare_c2_type(DivVFNode, VectorNode)                                  \
  declare_c2_type(DivVDNode, VectorNode)                                  \
  declare_c2_type(LShiftVBNode, VectorNode)                               \
  declare_c2_type(LShiftVSNode, VectorNode)                               \
  declare_c2_type(LShiftVINode, VectorNode)                               \
1991
  declare_c2_type(LShiftVLNode, VectorNode)                               \
1992 1993 1994
  declare_c2_type(RShiftVBNode, VectorNode)                               \
  declare_c2_type(RShiftVSNode, VectorNode)                               \
  declare_c2_type(RShiftVINode, VectorNode)                               \
1995 1996 1997 1998 1999
  declare_c2_type(RShiftVLNode, VectorNode)                               \
  declare_c2_type(URShiftVBNode, VectorNode)                              \
  declare_c2_type(URShiftVSNode, VectorNode)                              \
  declare_c2_type(URShiftVINode, VectorNode)                              \
  declare_c2_type(URShiftVLNode, VectorNode)                              \
N
never 已提交
2000 2001 2002
  declare_c2_type(AndVNode, VectorNode)                                   \
  declare_c2_type(OrVNode, VectorNode)                                    \
  declare_c2_type(XorVNode, VectorNode)                                   \
2003 2004 2005 2006 2007 2008 2009 2010
  declare_c2_type(LoadVectorNode, LoadNode)                               \
  declare_c2_type(StoreVectorNode, StoreNode)                             \
  declare_c2_type(ReplicateBNode, VectorNode)                             \
  declare_c2_type(ReplicateSNode, VectorNode)                             \
  declare_c2_type(ReplicateINode, VectorNode)                             \
  declare_c2_type(ReplicateLNode, VectorNode)                             \
  declare_c2_type(ReplicateFNode, VectorNode)                             \
  declare_c2_type(ReplicateDNode, VectorNode)                             \
N
never 已提交
2011 2012 2013 2014 2015 2016 2017
  declare_c2_type(PackNode, VectorNode)                                   \
  declare_c2_type(PackBNode, PackNode)                                    \
  declare_c2_type(PackSNode, PackNode)                                    \
  declare_c2_type(PackINode, PackNode)                                    \
  declare_c2_type(PackLNode, PackNode)                                    \
  declare_c2_type(PackFNode, PackNode)                                    \
  declare_c2_type(PackDNode, PackNode)                                    \
2018 2019
  declare_c2_type(Pack2LNode, PackNode)                                   \
  declare_c2_type(Pack2DNode, PackNode)                                   \
N
never 已提交
2020 2021
  declare_c2_type(ExtractNode, Node)                                      \
  declare_c2_type(ExtractBNode, ExtractNode)                              \
2022 2023
  declare_c2_type(ExtractUBNode, ExtractNode)                             \
  declare_c2_type(ExtractCNode, ExtractNode)                              \
N
never 已提交
2024 2025 2026 2027 2028
  declare_c2_type(ExtractSNode, ExtractNode)                              \
  declare_c2_type(ExtractINode, ExtractNode)                              \
  declare_c2_type(ExtractLNode, ExtractNode)                              \
  declare_c2_type(ExtractFNode, ExtractNode)                              \
  declare_c2_type(ExtractDNode, ExtractNode)                              \
2029 2030 2031 2032 2033 2034 2035 2036 2037
  declare_c2_type(OverflowNode, CmpNode)                                  \
  declare_c2_type(OverflowINode, OverflowNode)                            \
  declare_c2_type(OverflowAddINode, OverflowINode)                        \
  declare_c2_type(OverflowSubINode, OverflowINode)                        \
  declare_c2_type(OverflowMulINode, OverflowINode)                        \
  declare_c2_type(OverflowLNode, OverflowNode)                            \
  declare_c2_type(OverflowAddLNode, OverflowLNode)                        \
  declare_c2_type(OverflowSubLNode, OverflowLNode)                        \
  declare_c2_type(OverflowMulLNode, OverflowLNode)                        \
D
duke 已提交
2038 2039 2040 2041 2042 2043 2044
                                                                          \
  /*********************/                                                 \
  /* Adapter Blob Entries */                                              \
  /*********************/                                                 \
  declare_toplevel_type(AdapterHandlerEntry)                              \
  declare_toplevel_type(AdapterHandlerEntry*)                             \
                                                                          \
N
never 已提交
2045 2046 2047 2048 2049 2050 2051 2052
  /*********************/                                                 \
  /* CI */                                                                \
  /*********************/                                                 \
  declare_toplevel_type(ciEnv)                                            \
  declare_toplevel_type(ciObjectFactory)                                  \
  declare_toplevel_type(ciConstant)                                       \
  declare_toplevel_type(ciField)                                          \
  declare_toplevel_type(ciSymbol)                                         \
2053 2054 2055 2056 2057 2058 2059
  declare_toplevel_type(ciBaseObject)                                     \
  declare_type(ciObject, ciBaseObject)                                    \
  declare_type(ciInstance, ciObject)                                      \
  declare_type(ciMetadata, ciBaseObject)                                  \
  declare_type(ciMethod, ciMetadata)                                      \
  declare_type(ciMethodData, ciMetadata)                                  \
  declare_type(ciType, ciMetadata)                                        \
N
never 已提交
2060 2061 2062 2063 2064 2065
  declare_type(ciKlass, ciType)                                           \
  declare_type(ciInstanceKlass, ciKlass)                                  \
  declare_type(ciArrayKlass, ciKlass)                                     \
  declare_type(ciTypeArrayKlass, ciArrayKlass)                            \
  declare_type(ciObjArrayKlass, ciArrayKlass)                             \
                                                                          \
D
duke 已提交
2066 2067 2068 2069 2070 2071 2072 2073
  /********************/                                                  \
  /* -XX flags        */                                                  \
  /********************/                                                  \
                                                                          \
  declare_toplevel_type(Flag)                                             \
  declare_toplevel_type(Flag*)                                            \
                                                                          \
  /********************/                                                  \
N
never 已提交
2074 2075 2076 2077 2078 2079
  /* JVMTI            */                                                  \
  /********************/                                                  \
                                                                          \
  declare_toplevel_type(JvmtiExport)                                      \
                                                                          \
  /********************/                                                  \
D
duke 已提交
2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099
  /* JDK/VM version   */                                                  \
  /********************/                                                  \
                                                                          \
  declare_toplevel_type(Abstract_VM_Version)                              \
  declare_toplevel_type(JDK_Version)                                      \
                                                                          \
  /*************/                                                         \
  /* Arguments */                                                         \
  /*************/                                                         \
                                                                          \
  declare_toplevel_type(Arguments)                                        \
                                                                          \
  /***************/                                                       \
  /* Other types */                                                       \
  /***************/                                                       \
                                                                          \
  /* all enum types */                                                    \
                                                                          \
   declare_integer_type(Bytecodes::Code)                                  \
   declare_integer_type(Generation::Name)                                 \
2100
   declare_integer_type(InstanceKlass::ClassState)                        \
D
duke 已提交
2101 2102 2103
   declare_integer_type(JavaThreadState)                                  \
   declare_integer_type(Location::Type)                                   \
   declare_integer_type(Location::Where)                                  \
2104
   declare_integer_type(Flag::Flags)                                      \
N
never 已提交
2105
   COMPILER2_PRESENT(declare_integer_type(OptoReg::Name))                 \
D
duke 已提交
2106
                                                                          \
2107 2108 2109 2110 2111
   declare_toplevel_type(CHeapObj<mtInternal>)                            \
            declare_type(Array<int>, MetaspaceObj)                        \
            declare_type(Array<u1>, MetaspaceObj)                         \
            declare_type(Array<u2>, MetaspaceObj)                         \
            declare_type(Array<Klass*>, MetaspaceObj)                     \
2112
            declare_type(Array<Method*>, MetaspaceObj)                    \
2113
                                                                          \
D
duke 已提交
2114 2115
   declare_integer_type(AccessFlags)  /* FIXME: wrong type (not integer) */\
  declare_toplevel_type(address)      /* FIXME: should this be an integer type? */\
N
never 已提交
2116
   declare_integer_type(BasicType)   /* FIXME: wrong type (not integer) */\
D
duke 已提交
2117 2118 2119 2120 2121 2122
  declare_toplevel_type(BreakpointInfo)                                   \
  declare_toplevel_type(BreakpointInfo*)                                  \
  declare_toplevel_type(CodeBlob*)                                        \
  declare_toplevel_type(CompressedWriteStream*)                           \
  declare_toplevel_type(ConstantPoolCacheEntry)                           \
  declare_toplevel_type(elapsedTimer)                                     \
N
never 已提交
2123
  declare_toplevel_type(frame)                                            \
D
duke 已提交
2124 2125 2126
  declare_toplevel_type(intptr_t*)                                        \
   declare_unsigned_integer_type(InvocationCounter) /* FIXME: wrong type (not integer) */ \
  declare_toplevel_type(JavaThread*)                                      \
2127
  declare_toplevel_type(java_lang_Class)                                  \
N
never 已提交
2128
  declare_integer_type(JavaThread::AsyncRequests)                         \
D
duke 已提交
2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140
  declare_toplevel_type(jbyte*)                                           \
  declare_toplevel_type(jbyte**)                                          \
  declare_toplevel_type(jint*)                                            \
  declare_toplevel_type(jniIdMapBase*)                                    \
  declare_unsigned_integer_type(juint)                                    \
  declare_unsigned_integer_type(julong)                                   \
  declare_toplevel_type(JNIHandleBlock*)                                  \
  declare_toplevel_type(JNIid)                                            \
  declare_toplevel_type(JNIid*)                                           \
  declare_toplevel_type(jmethodID*)                                       \
  declare_toplevel_type(Mutex*)                                           \
  declare_toplevel_type(nmethod*)                                         \
N
never 已提交
2141
  COMPILER2_PRESENT(declare_unsigned_integer_type(node_idx_t))            \
D
duke 已提交
2142 2143 2144 2145 2146 2147 2148 2149 2150 2151
  declare_toplevel_type(ObjectMonitor*)                                   \
  declare_toplevel_type(oop*)                                             \
  declare_toplevel_type(OopMap**)                                         \
  declare_toplevel_type(OopMapCache*)                                     \
  declare_toplevel_type(OopMapSet*)                                       \
  declare_toplevel_type(VMReg)                                            \
  declare_toplevel_type(OSThread*)                                        \
   declare_integer_type(ReferenceType)                                    \
  declare_toplevel_type(StubQueue*)                                       \
  declare_toplevel_type(Thread*)                                          \
N
never 已提交
2152
  declare_toplevel_type(Universe)                                         \
2153
  declare_toplevel_type(os)                                               \
N
never 已提交
2154
  declare_toplevel_type(vframeArray)                                      \
2155
  declare_toplevel_type(vframeArrayElement)                               \
2156 2157 2158 2159 2160 2161
  declare_toplevel_type(Annotations*)                                     \
                                                                          \
  /***************/                                                       \
  /* Miscellaneous types */                                               \
  /***************/                                                       \
                                                                          \
2162 2163
  declare_toplevel_type(PtrQueue)                                         \
                                                                          \
2164 2165 2166 2167 2168 2169 2170 2171 2172
  /* freelist */                                                          \
  declare_toplevel_type(FreeChunk*)                                       \
  declare_toplevel_type(Metablock*)                                       \
  declare_toplevel_type(FreeBlockDictionary<FreeChunk>*)                  \
  declare_toplevel_type(FreeList<FreeChunk>*)                             \
  declare_toplevel_type(FreeList<FreeChunk>)                              \
  declare_toplevel_type(FreeBlockDictionary<Metablock>*)                  \
  declare_toplevel_type(FreeList<Metablock>*)                             \
  declare_toplevel_type(FreeList<Metablock>)                              \
2173
  declare_type(MetablockTreeDictionary, FreeBlockDictionary<Metablock>)
N
never 已提交
2174

D
duke 已提交
2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187

//--------------------------------------------------------------------------------
// VM_INT_CONSTANTS
//
// This table contains integer constants required over in the
// serviceability agent. The "declare_constant" macro is used for all
// enums, etc., while "declare_preprocessor_constant" must be used for
// all #defined constants.

#define VM_INT_CONSTANTS(declare_constant,                                \
                         declare_preprocessor_constant,                   \
                         declare_c1_constant,                             \
                         declare_c2_constant,                             \
2188
                         declare_c2_preprocessor_constant)                \
D
duke 已提交
2189 2190 2191 2192 2193
                                                                          \
  /******************/                                                    \
  /* Useful globals */                                                    \
  /******************/                                                    \
                                                                          \
2194
  declare_preprocessor_constant("ASSERT", DEBUG_ONLY(1) NOT_DEBUG(0))     \
D
duke 已提交
2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205
                                                                          \
  /**************/                                                        \
  /* Stack bias */                                                        \
  /**************/                                                        \
                                                                          \
  declare_preprocessor_constant("STACK_BIAS", STACK_BIAS)                 \
                                                                          \
  /****************/                                                      \
  /* Object sizes */                                                      \
  /****************/                                                      \
                                                                          \
2206
  declare_constant(oopSize)                                               \
D
duke 已提交
2207
  declare_constant(LogBytesPerWord)                                       \
2208
  declare_constant(BytesPerWord)                                          \
D
duke 已提交
2209 2210
  declare_constant(BytesPerLong)                                          \
                                                                          \
2211 2212
  declare_constant(LogKlassAlignmentInBytes)                              \
                                                                          \
D
duke 已提交
2213 2214 2215 2216 2217 2218 2219 2220
  /********************************************/                          \
  /* Generation and Space Hierarchy Constants */                          \
  /********************************************/                          \
                                                                          \
  declare_constant(ageTable::table_size)                                  \
                                                                          \
  declare_constant(BarrierSet::ModRef)                                    \
  declare_constant(BarrierSet::CardTableModRef)                           \
2221 2222 2223
  declare_constant(BarrierSet::CardTableExtension)                        \
  declare_constant(BarrierSet::G1SATBCT)                                  \
  declare_constant(BarrierSet::G1SATBCTLogging)                           \
D
duke 已提交
2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288
  declare_constant(BarrierSet::Other)                                     \
                                                                          \
  declare_constant(BlockOffsetSharedArray::LogN)                          \
  declare_constant(BlockOffsetSharedArray::LogN_words)                    \
  declare_constant(BlockOffsetSharedArray::N_bytes)                       \
  declare_constant(BlockOffsetSharedArray::N_words)                       \
                                                                          \
  declare_constant(BlockOffsetArray::N_words)                             \
                                                                          \
  declare_constant(CardTableModRefBS::clean_card)                         \
  declare_constant(CardTableModRefBS::last_card)                          \
  declare_constant(CardTableModRefBS::dirty_card)                         \
  declare_constant(CardTableModRefBS::Precise)                            \
  declare_constant(CardTableModRefBS::ObjHeadPreciseArray)                \
  declare_constant(CardTableModRefBS::card_shift)                         \
  declare_constant(CardTableModRefBS::card_size)                          \
  declare_constant(CardTableModRefBS::card_size_in_words)                 \
                                                                          \
  declare_constant(CardTableRS::youngergen_card)                          \
                                                                          \
  declare_constant(CollectedHeap::Abstract)                               \
  declare_constant(CollectedHeap::SharedHeap)                             \
  declare_constant(CollectedHeap::GenCollectedHeap)                       \
                                                                          \
  declare_constant(GenCollectedHeap::max_gens)                            \
                                                                          \
  /* constants from Generation::Name enum */                              \
                                                                          \
  declare_constant(Generation::DefNew)                                    \
  declare_constant(Generation::MarkSweepCompact)                          \
  declare_constant(Generation::Other)                                     \
                                                                          \
  declare_constant(Generation::LogOfGenGrain)                             \
  declare_constant(Generation::GenGrain)                                  \
                                                                          \
  declare_constant(HeapWordSize)                                          \
  declare_constant(LogHeapWordSize)                                       \
                                                                          \
                                                                          \
  /************************/                                              \
  /* PerfMemory - jvmstat */                                              \
  /************************/                                              \
                                                                          \
  declare_preprocessor_constant("PERFDATA_MAJOR_VERSION", PERFDATA_MAJOR_VERSION) \
  declare_preprocessor_constant("PERFDATA_MINOR_VERSION", PERFDATA_MINOR_VERSION) \
  declare_preprocessor_constant("PERFDATA_BIG_ENDIAN", PERFDATA_BIG_ENDIAN)       \
  declare_preprocessor_constant("PERFDATA_LITTLE_ENDIAN", PERFDATA_LITTLE_ENDIAN) \
                                                                          \
  /***********************************/                                   \
  /* LoaderConstraintTable constants */                                   \
  /***********************************/                                   \
                                                                          \
  declare_constant(LoaderConstraintTable::_loader_constraint_size)        \
  declare_constant(LoaderConstraintTable::_nof_buckets)                   \
                                                                          \
  /************************************************************/          \
  /* HotSpot specific JVM_ACC constants from global anon enum */          \
  /************************************************************/          \
                                                                          \
  declare_constant(JVM_ACC_WRITTEN_FLAGS)                                 \
  declare_constant(JVM_ACC_MONITOR_MATCH)                                 \
  declare_constant(JVM_ACC_HAS_MONITOR_BYTECODES)                         \
  declare_constant(JVM_ACC_HAS_LOOPS)                                     \
  declare_constant(JVM_ACC_LOOPS_FLAG_INIT)                               \
  declare_constant(JVM_ACC_QUEUED)                                        \
2289
  declare_constant(JVM_ACC_NOT_C2_OSR_COMPILABLE)                         \
D
duke 已提交
2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335
  declare_constant(JVM_ACC_HAS_LINE_NUMBER_TABLE)                         \
  declare_constant(JVM_ACC_HAS_CHECKED_EXCEPTIONS)                        \
  declare_constant(JVM_ACC_HAS_JSRS)                                      \
  declare_constant(JVM_ACC_IS_OLD)                                        \
  declare_constant(JVM_ACC_IS_OBSOLETE)                                   \
  declare_constant(JVM_ACC_IS_PREFIXED_NATIVE)                            \
  declare_constant(JVM_ACC_HAS_MIRANDA_METHODS)                           \
  declare_constant(JVM_ACC_HAS_VANILLA_CONSTRUCTOR)                       \
  declare_constant(JVM_ACC_HAS_FINALIZER)                                 \
  declare_constant(JVM_ACC_IS_CLONEABLE)                                  \
  declare_constant(JVM_ACC_HAS_LOCAL_VARIABLE_TABLE)                      \
  declare_constant(JVM_ACC_PROMOTED_FLAGS)                                \
  declare_constant(JVM_ACC_FIELD_ACCESS_WATCHED)                          \
  declare_constant(JVM_ACC_FIELD_MODIFICATION_WATCHED)                    \
                                                                          \
  /*****************************/                                         \
  /* Thread::SuspendFlags enum */                                         \
  /*****************************/                                         \
                                                                          \
  declare_constant(Thread::_external_suspend)                             \
  declare_constant(Thread::_ext_suspended)                                \
  declare_constant(Thread::_has_async_exception)                          \
                                                                          \
  /*******************/                                                   \
  /* JavaThreadState */                                                   \
  /*******************/                                                   \
                                                                          \
  declare_constant(_thread_uninitialized)                                 \
  declare_constant(_thread_new)                                           \
  declare_constant(_thread_new_trans)                                     \
  declare_constant(_thread_in_native)                                     \
  declare_constant(_thread_in_native_trans)                               \
  declare_constant(_thread_in_vm)                                         \
  declare_constant(_thread_in_vm_trans)                                   \
  declare_constant(_thread_in_Java)                                       \
  declare_constant(_thread_in_Java_trans)                                 \
  declare_constant(_thread_blocked)                                       \
  declare_constant(_thread_blocked_trans)                                 \
                                                                          \
  /******************************/                                        \
  /* Klass misc. enum constants */                                        \
  /******************************/                                        \
                                                                          \
  declare_constant(Klass::_primary_super_limit)                           \
  declare_constant(Klass::_lh_instance_slow_path_bit)                     \
  declare_constant(Klass::_lh_log2_element_size_shift)                    \
2336
  declare_constant(Klass::_lh_log2_element_size_mask)                     \
D
duke 已提交
2337
  declare_constant(Klass::_lh_element_type_shift)                         \
2338
  declare_constant(Klass::_lh_element_type_mask)                          \
D
duke 已提交
2339
  declare_constant(Klass::_lh_header_size_shift)                          \
2340
  declare_constant(Klass::_lh_header_size_mask)                           \
D
duke 已提交
2341 2342 2343 2344 2345
  declare_constant(Klass::_lh_array_tag_shift)                            \
  declare_constant(Klass::_lh_array_tag_type_value)                       \
  declare_constant(Klass::_lh_array_tag_obj_value)                        \
                                                                          \
  /********************************/                                      \
C
coleenp 已提交
2346
  /* ConstMethod anon-enum */                                             \
D
duke 已提交
2347 2348
  /********************************/                                      \
                                                                          \
C
coleenp 已提交
2349 2350 2351 2352 2353
  declare_constant(ConstMethod::_has_linenumber_table)                    \
  declare_constant(ConstMethod::_has_checked_exceptions)                  \
  declare_constant(ConstMethod::_has_localvariable_table)                 \
  declare_constant(ConstMethod::_has_exception_table)                     \
  declare_constant(ConstMethod::_has_generic_signature)                   \
2354
  declare_constant(ConstMethod::_has_method_parameters)                   \
C
coleenp 已提交
2355 2356 2357 2358
  declare_constant(ConstMethod::_has_method_annotations)                  \
  declare_constant(ConstMethod::_has_parameter_annotations)               \
  declare_constant(ConstMethod::_has_default_annotations)                 \
  declare_constant(ConstMethod::_has_type_annotations)                    \
D
duke 已提交
2359
                                                                          \
2360 2361 2362 2363 2364 2365
  /**************/                                                        \
  /* DataLayout */                                                        \
  /**************/                                                        \
                                                                          \
  declare_constant(DataLayout::cell_size)                                 \
                                                                          \
D
duke 已提交
2366
  /*************************************/                                 \
2367
  /* InstanceKlass enum                */                                 \
D
duke 已提交
2368 2369 2370
  /*************************************/                                 \
                                                                          \
                                                                          \
2371 2372 2373 2374 2375 2376 2377 2378
  /*************************************/                                 \
  /* FieldInfo FieldOffset enum        */                                 \
  /*************************************/                                 \
                                                                          \
  declare_constant(FieldInfo::access_flags_offset)                        \
  declare_constant(FieldInfo::name_index_offset)                          \
  declare_constant(FieldInfo::signature_index_offset)                     \
  declare_constant(FieldInfo::initval_index_offset)                       \
2379 2380
  declare_constant(FieldInfo::low_packed_offset)                          \
  declare_constant(FieldInfo::high_packed_offset)                         \
2381 2382
  declare_constant(FieldInfo::field_slots)                                \
                                                                          \
2383 2384 2385 2386 2387
  /*************************************/                                 \
  /* FieldInfo tag constants           */                                 \
  /*************************************/                                 \
                                                                          \
  declare_preprocessor_constant("FIELDINFO_TAG_SIZE", FIELDINFO_TAG_SIZE) \
2388
  declare_preprocessor_constant("FIELDINFO_TAG_MASK", FIELDINFO_TAG_MASK) \
2389 2390
  declare_preprocessor_constant("FIELDINFO_TAG_OFFSET", FIELDINFO_TAG_OFFSET) \
                                                                          \
D
duke 已提交
2391
  /************************************************/                      \
2392
  /* InstanceKlass InnerClassAttributeOffset enum */                      \
D
duke 已提交
2393 2394
  /************************************************/                      \
                                                                          \
2395 2396 2397 2398 2399
  declare_constant(InstanceKlass::inner_class_inner_class_info_offset)    \
  declare_constant(InstanceKlass::inner_class_outer_class_info_offset)    \
  declare_constant(InstanceKlass::inner_class_inner_name_offset)          \
  declare_constant(InstanceKlass::inner_class_access_flags_offset)        \
  declare_constant(InstanceKlass::inner_class_next_offset)                \
D
duke 已提交
2400 2401
                                                                          \
  /*********************************/                                     \
2402
  /* InstanceKlass ClassState enum */                                     \
D
duke 已提交
2403 2404
  /*********************************/                                     \
                                                                          \
2405 2406 2407 2408 2409 2410
  declare_constant(InstanceKlass::allocated)                              \
  declare_constant(InstanceKlass::loaded)                                 \
  declare_constant(InstanceKlass::linked)                                 \
  declare_constant(InstanceKlass::being_initialized)                      \
  declare_constant(InstanceKlass::fully_initialized)                      \
  declare_constant(InstanceKlass::initialization_error)                   \
D
duke 已提交
2411 2412
                                                                          \
  /*********************************/                                     \
2413
  /* Symbol* - symbol max length */                                       \
D
duke 已提交
2414 2415
  /*********************************/                                     \
                                                                          \
2416
  declare_constant(Symbol::max_symbol_length)                             \
D
duke 已提交
2417
                                                                          \
2418
  /*************************************************/                     \
2419
  /* ConstantPool* layout enum for InvokeDynamic */                     \
2420 2421
  /*************************************************/                     \
                                                                          \
2422 2423 2424
  declare_constant(ConstantPool::_indy_bsm_offset)                 \
  declare_constant(ConstantPool::_indy_argc_offset)                \
  declare_constant(ConstantPool::_indy_argv_offset)                \
2425
                                                                          \
2426 2427 2428
  /********************************/                                      \
  /* ConstantPoolCacheEntry enums */                                      \
  /********************************/                                      \
D
duke 已提交
2429
                                                                          \
2430 2431 2432 2433 2434 2435
  declare_constant(ConstantPoolCacheEntry::is_volatile_shift)             \
  declare_constant(ConstantPoolCacheEntry::is_final_shift)                \
  declare_constant(ConstantPoolCacheEntry::is_forced_virtual_shift)       \
  declare_constant(ConstantPoolCacheEntry::is_vfinal_shift)               \
  declare_constant(ConstantPoolCacheEntry::is_field_entry_shift)          \
  declare_constant(ConstantPoolCacheEntry::tos_state_shift)               \
D
duke 已提交
2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465
                                                                          \
  /***************************************/                               \
  /* java_lang_Thread::ThreadStatus enum */                               \
  /***************************************/                               \
                                                                          \
  declare_constant(java_lang_Thread::NEW)                                 \
  declare_constant(java_lang_Thread::RUNNABLE)                            \
  declare_constant(java_lang_Thread::SLEEPING)                            \
  declare_constant(java_lang_Thread::IN_OBJECT_WAIT)                      \
  declare_constant(java_lang_Thread::IN_OBJECT_WAIT_TIMED)                \
  declare_constant(java_lang_Thread::PARKED)                              \
  declare_constant(java_lang_Thread::PARKED_TIMED)                        \
  declare_constant(java_lang_Thread::BLOCKED_ON_MONITOR_ENTER)            \
  declare_constant(java_lang_Thread::TERMINATED)                          \
                                                                          \
  /******************************/                                        \
  /* Debug info                 */                                        \
  /******************************/                                        \
                                                                          \
  declare_constant(Location::OFFSET_MASK)                                 \
  declare_constant(Location::OFFSET_SHIFT)                                \
  declare_constant(Location::TYPE_MASK)                                   \
  declare_constant(Location::TYPE_SHIFT)                                  \
  declare_constant(Location::WHERE_MASK)                                  \
  declare_constant(Location::WHERE_SHIFT)                                 \
                                                                          \
  /* constants from Location::Type enum  */                               \
                                                                          \
  declare_constant(Location::normal)                                      \
  declare_constant(Location::oop)                                         \
2466
  declare_constant(Location::narrowoop)                                   \
D
duke 已提交
2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478
  declare_constant(Location::int_in_long)                                 \
  declare_constant(Location::lng)                                         \
  declare_constant(Location::float_in_dbl)                                \
  declare_constant(Location::dbl)                                         \
  declare_constant(Location::addr)                                        \
  declare_constant(Location::invalid)                                     \
                                                                          \
  /* constants from Location::Where enum */                               \
                                                                          \
  declare_constant(Location::on_stack)                                    \
  declare_constant(Location::in_register)                                 \
                                                                          \
N
never 已提交
2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499
  declare_constant(Deoptimization::Reason_many)                           \
  declare_constant(Deoptimization::Reason_none)                           \
  declare_constant(Deoptimization::Reason_null_check)                     \
  declare_constant(Deoptimization::Reason_null_assert)                    \
  declare_constant(Deoptimization::Reason_range_check)                    \
  declare_constant(Deoptimization::Reason_class_check)                    \
  declare_constant(Deoptimization::Reason_array_check)                    \
  declare_constant(Deoptimization::Reason_intrinsic)                      \
  declare_constant(Deoptimization::Reason_bimorphic)                      \
  declare_constant(Deoptimization::Reason_unloaded)                       \
  declare_constant(Deoptimization::Reason_uninitialized)                  \
  declare_constant(Deoptimization::Reason_unreached)                      \
  declare_constant(Deoptimization::Reason_unhandled)                      \
  declare_constant(Deoptimization::Reason_constraint)                     \
  declare_constant(Deoptimization::Reason_div0_check)                     \
  declare_constant(Deoptimization::Reason_age)                            \
  declare_constant(Deoptimization::Reason_predicate)                      \
  declare_constant(Deoptimization::Reason_loop_limit_check)               \
  declare_constant(Deoptimization::Reason_LIMIT)                          \
  declare_constant(Deoptimization::Reason_RECORDED_LIMIT)                 \
                                                                          \
2500 2501 2502 2503 2504 2505 2506
  declare_constant(Deoptimization::Action_none)                           \
  declare_constant(Deoptimization::Action_maybe_recompile)                \
  declare_constant(Deoptimization::Action_reinterpret)                    \
  declare_constant(Deoptimization::Action_make_not_entrant)               \
  declare_constant(Deoptimization::Action_make_not_compilable)            \
  declare_constant(Deoptimization::Action_LIMIT)                          \
                                                                          \
D
duke 已提交
2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534
  /*********************/                                                 \
  /* Matcher (C2 only) */                                                 \
  /*********************/                                                 \
                                                                          \
  declare_c2_preprocessor_constant("Matcher::interpreter_frame_pointer_reg", Matcher::interpreter_frame_pointer_reg()) \
                                                                          \
  /*********************************************/                         \
  /* MethodCompilation (globalDefinitions.hpp) */                         \
  /*********************************************/                         \
                                                                          \
  declare_constant(InvocationEntryBci)                                    \
  declare_constant(InvalidOSREntryBci)                                    \
                                                                          \
  /***************/                                                       \
  /* OopMapValue */                                                       \
  /***************/                                                       \
                                                                          \
  declare_constant(OopMapValue::type_bits)                                \
  declare_constant(OopMapValue::register_bits)                            \
  declare_constant(OopMapValue::type_shift)                               \
  declare_constant(OopMapValue::register_shift)                           \
  declare_constant(OopMapValue::type_mask)                                \
  declare_constant(OopMapValue::type_mask_in_place)                       \
  declare_constant(OopMapValue::register_mask)                            \
  declare_constant(OopMapValue::register_mask_in_place)                   \
  declare_constant(OopMapValue::unused_value)                             \
  declare_constant(OopMapValue::oop_value)                                \
  declare_constant(OopMapValue::value_value)                              \
2535
  declare_constant(OopMapValue::narrowoop_value)                          \
D
duke 已提交
2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550
  declare_constant(OopMapValue::callee_saved_value)                       \
  declare_constant(OopMapValue::derived_oop_value)                        \
                                                                          \
  /******************/                                                    \
  /* JNIHandleBlock */                                                    \
  /******************/                                                    \
                                                                          \
  declare_constant(JNIHandleBlock::block_size_in_oops)                    \
                                                                          \
  /**********************/                                                \
  /* ObjectSynchronizer */                                                \
  /**********************/                                                \
                                                                          \
  declare_constant(ObjectSynchronizer::_BLOCKSIZE)                        \
                                                                          \
2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562
  /**********************/                                                \
  /* PcDesc             */                                                \
  /**********************/                                                \
                                                                          \
  declare_constant(PcDesc::PCDESC_reexecute)                              \
  declare_constant(PcDesc::PCDESC_is_method_handle_invoke)                \
  declare_constant(PcDesc::PCDESC_return_oop)                             \
                                                                          \
  /**********************/                                                \
  /* frame              */                                                \
  /**********************/                                                \
                                                                          \
2563
  NOT_ZERO(X86_ONLY(declare_constant(frame::entry_frame_call_wrapper_offset)))      \
2564 2565
  declare_constant(frame::pc_return_offset)                               \
                                                                          \
N
never 已提交
2566 2567 2568 2569 2570 2571 2572
  /*************/                                                         \
  /* vmSymbols */                                                         \
  /*************/                                                         \
                                                                          \
  declare_constant(vmSymbols::FIRST_SID)                                  \
  declare_constant(vmSymbols::SID_LIMIT)                                  \
                                                                          \
2573 2574 2575 2576 2577 2578 2579 2580 2581 2582
  /****************/                                                      \
  /* vmIntrinsics */                                                      \
  /****************/                                                      \
                                                                          \
  declare_constant(vmIntrinsics::_invokeBasic)                            \
  declare_constant(vmIntrinsics::_linkToVirtual)                          \
  declare_constant(vmIntrinsics::_linkToStatic)                           \
  declare_constant(vmIntrinsics::_linkToSpecial)                          \
  declare_constant(vmIntrinsics::_linkToInterface)                        \
                                                                          \
D
duke 已提交
2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601
  /********************************/                                      \
  /* Calling convention constants */                                      \
  /********************************/                                      \
                                                                          \
  declare_constant(RegisterImpl::number_of_registers)                     \
  declare_constant(ConcreteRegisterImpl::number_of_registers)             \
  declare_preprocessor_constant("REG_COUNT", REG_COUNT)                \
  declare_c2_preprocessor_constant("SAVED_ON_ENTRY_REG_COUNT", SAVED_ON_ENTRY_REG_COUNT) \
  declare_c2_preprocessor_constant("C_SAVED_ON_ENTRY_REG_COUNT", C_SAVED_ON_ENTRY_REG_COUNT)


//--------------------------------------------------------------------------------
// VM_LONG_CONSTANTS
//
// This table contains long constants required over in the
// serviceability agent. The "declare_constant" macro is used for all
// enums, etc., while "declare_preprocessor_constant" must be used for
// all #defined constants.

2602
#define VM_LONG_CONSTANTS(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \
D
duke 已提交
2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629
                                                                          \
  /*********************/                                                 \
  /* MarkOop constants */                                                 \
  /*********************/                                                 \
                                                                          \
  /* Note: some of these are declared as long constants just for */       \
  /* consistency. The mask constants are the only ones requiring */       \
  /* 64 bits (on 64-bit platforms). */                                    \
                                                                          \
  declare_constant(markOopDesc::age_bits)                                 \
  declare_constant(markOopDesc::lock_bits)                                \
  declare_constant(markOopDesc::biased_lock_bits)                         \
  declare_constant(markOopDesc::max_hash_bits)                            \
  declare_constant(markOopDesc::hash_bits)                                \
                                                                          \
  declare_constant(markOopDesc::lock_shift)                               \
  declare_constant(markOopDesc::biased_lock_shift)                        \
  declare_constant(markOopDesc::age_shift)                                \
  declare_constant(markOopDesc::hash_shift)                               \
                                                                          \
  declare_constant(markOopDesc::lock_mask)                                \
  declare_constant(markOopDesc::lock_mask_in_place)                       \
  declare_constant(markOopDesc::biased_lock_mask)                         \
  declare_constant(markOopDesc::biased_lock_mask_in_place)                \
  declare_constant(markOopDesc::biased_lock_bit_in_place)                 \
  declare_constant(markOopDesc::age_mask)                                 \
  declare_constant(markOopDesc::age_mask_in_place)                        \
2630 2631
  declare_constant(markOopDesc::epoch_mask)                               \
  declare_constant(markOopDesc::epoch_mask_in_place)                      \
D
duke 已提交
2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644
  declare_constant(markOopDesc::hash_mask)                                \
  declare_constant(markOopDesc::hash_mask_in_place)                       \
  declare_constant(markOopDesc::biased_lock_alignment)                    \
                                                                          \
  declare_constant(markOopDesc::locked_value)                             \
  declare_constant(markOopDesc::unlocked_value)                           \
  declare_constant(markOopDesc::monitor_value)                            \
  declare_constant(markOopDesc::marked_value)                             \
  declare_constant(markOopDesc::biased_lock_pattern)                      \
                                                                          \
  declare_constant(markOopDesc::no_hash)                                  \
  declare_constant(markOopDesc::no_hash_in_place)                         \
  declare_constant(markOopDesc::no_lock_in_place)                         \
2645 2646 2647 2648 2649
  declare_constant(markOopDesc::max_age)                                  \
                                                                          \
  /* Constants in markOop used by CMS. */                                 \
  declare_constant(markOopDesc::cms_shift)                                \
  declare_constant(markOopDesc::cms_mask)                                 \
2650
  declare_constant(markOopDesc::size_shift)
D
duke 已提交
2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689


//--------------------------------------------------------------------------------
// Macros operating on the above lists
//--------------------------------------------------------------------------------

// This utility macro quotes the passed string
#define QUOTE(x) #x

//--------------------------------------------------------------------------------
// VMStructEntry macros
//

// This macro generates a VMStructEntry line for a nonstatic field
#define GENERATE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type)              \
 { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 0, cast_uint64_t(offset_of(typeName, fieldName)), NULL },

// This macro generates a VMStructEntry line for a static field
#define GENERATE_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, type)                 \
 { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 1, 0, &typeName::fieldName },

// This macro generates a VMStructEntry line for an unchecked
// nonstatic field, in which the size of the type is also specified.
// The type string is given as NULL, indicating an "opaque" type.
#define GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, size)    \
  { QUOTE(typeName), QUOTE(fieldName), NULL, 0, cast_uint64_t(offset_of(typeName, fieldName)), NULL },

// This macro generates a VMStructEntry line for an unchecked
// static field, in which the size of the type is also specified.
// The type string is given as NULL, indicating an "opaque" type.
#define GENERATE_UNCHECKED_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, size)       \
 { QUOTE(typeName), QUOTE(fieldName), NULL, 1, 0, (void*) &typeName::fieldName },

// This macro generates the sentinel value indicating the end of the list
#define GENERATE_VM_STRUCT_LAST_ENTRY() \
 { NULL, NULL, NULL, 0, 0, NULL }

// This macro checks the type of a VMStructEntry by comparing pointer types
#define CHECK_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type)                 \
2690 2691
 {typeName *dummyObj = NULL; type* dummy = &dummyObj->fieldName;                   \
  assert(offset_of(typeName, fieldName) < sizeof(typeName), "Illegal nonstatic struct entry, field offset too large"); }
D
duke 已提交
2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891

// This macro checks the type of a volatile VMStructEntry by comparing pointer types
#define CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type)        \
 {typedef type dummyvtype; typeName *dummyObj = NULL; volatile dummyvtype* dummy = &dummyObj->fieldName; }

// This macro checks the type of a VMStructEntry by comparing pointer types
#define CHECK_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, type)                    \
 {type* dummy = &typeName::fieldName; }

// This macro ensures the type of a field and its containing type are
// present in the type table. The assertion string is shorter than
// preferable because (incredibly) of a bug in Solstice NFS client
// which seems to prevent very long lines from compiling. This assertion
// means that an entry in VMStructs::localHotSpotVMStructs[] was not
// found in VMStructs::localHotSpotVMTypes[].
#define ENSURE_FIELD_TYPE_PRESENT(typeName, fieldName, type)                       \
 { assert(findType(QUOTE(typeName)) != 0, "type \"" QUOTE(typeName) "\" not found in type table"); \
   assert(findType(QUOTE(type)) != 0, "type \"" QUOTE(type) "\" not found in type table"); }

// This is a no-op macro for unchecked fields
#define CHECK_NO_OP(a, b, c)

//
// Build-specific macros:
//

// Generate and check a nonstatic field in non-product builds
#ifndef PRODUCT
# define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)    CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT(a, b, c)          ENSURE_FIELD_TYPE_PRESENT(a, b, c)
# define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)    CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT(a, b, c)          ENSURE_FIELD_TYPE_PRESENT(a, b, c)
#else
# define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT(a, b, c)
# define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT(a, b, c)
#endif /* PRODUCT */

// Generate and check a nonstatic field in C1 builds
#ifdef COMPILER1
# define GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define CHECK_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)    CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define ENSURE_C1_FIELD_TYPE_PRESENT(a, b, c)          ENSURE_FIELD_TYPE_PRESENT(a, b, c)
#else
# define GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define CHECK_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define ENSURE_C1_FIELD_TYPE_PRESENT(a, b, c)
#endif /* COMPILER1 */
// Generate and check a nonstatic field in C2 builds
#ifdef COMPILER2
# define GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)    CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define ENSURE_C2_FIELD_TYPE_PRESENT(a, b, c)          ENSURE_FIELD_TYPE_PRESENT(a, b, c)
#else
# define GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
# define ENSURE_C2_FIELD_TYPE_PRESENT(a, b, c)
#endif /* COMPILER2 */

// Generate but do not check a static field in C1 builds
#ifdef COMPILER1
# define GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c)
#else
# define GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c)
#endif /* COMPILER1 */

// Generate but do not check a static field in C2 builds
#ifdef COMPILER2
# define GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c)
#else
# define GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c)
#endif /* COMPILER2 */

//--------------------------------------------------------------------------------
// VMTypeEntry macros
//

#define GENERATE_VM_TYPE_ENTRY(type, superclass) \
 { QUOTE(type), QUOTE(superclass), 0, 0, 0, sizeof(type) },

#define GENERATE_TOPLEVEL_VM_TYPE_ENTRY(type) \
 { QUOTE(type), NULL,              0, 0, 0, sizeof(type) },

#define GENERATE_OOP_VM_TYPE_ENTRY(type) \
 { QUOTE(type), NULL,              1, 0, 0, sizeof(type) },

#define GENERATE_INTEGER_VM_TYPE_ENTRY(type) \
 { QUOTE(type), NULL,              0, 1, 0, sizeof(type) },

#define GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY(type) \
 { QUOTE(type), NULL,              0, 1, 1, sizeof(type) },

#define GENERATE_VM_TYPE_LAST_ENTRY() \
 { NULL, NULL, 0, 0, 0, 0 }

#define CHECK_VM_TYPE_ENTRY(type, superclass) \
 { type* dummyObj = NULL; superclass* dummySuperObj = dummyObj; }

#define CHECK_VM_TYPE_NO_OP(a)
#define CHECK_SINGLE_ARG_VM_TYPE_NO_OP(a)

//
// Build-specific macros:
//

#ifdef COMPILER1
# define GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY(a)               GENERATE_TOPLEVEL_VM_TYPE_ENTRY(a)
# define CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY(a)
#else
# define GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY(a)
# define CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY(a)
#endif /* COMPILER1 */

#ifdef COMPILER2
# define GENERATE_C2_VM_TYPE_ENTRY(a, b)                     GENERATE_VM_TYPE_ENTRY(a, b)
# define CHECK_C2_VM_TYPE_ENTRY(a, b)                        CHECK_VM_TYPE_ENTRY(a, b)
# define GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY(a)               GENERATE_TOPLEVEL_VM_TYPE_ENTRY(a)
# define CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY(a)
#else
# define GENERATE_C2_VM_TYPE_ENTRY(a, b)
# define CHECK_C2_VM_TYPE_ENTRY(a, b)
# define GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY(a)
# define CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY(a)
#endif /* COMPILER2 */


//--------------------------------------------------------------------------------
// VMIntConstantEntry macros
//

#define GENERATE_VM_INT_CONSTANT_ENTRY(name) \
 { QUOTE(name), (int32_t) name },

#define GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value) \
 { name, (int32_t) value },

// This macro generates the sentinel value indicating the end of the list
#define GENERATE_VM_INT_CONSTANT_LAST_ENTRY() \
 { NULL, 0 }


// Generate an int constant for a C1 build
#ifdef COMPILER1
# define GENERATE_C1_VM_INT_CONSTANT_ENTRY(name)  GENERATE_VM_INT_CONSTANT_ENTRY(name)
#else
# define GENERATE_C1_VM_INT_CONSTANT_ENTRY(name)
#endif /* COMPILER1 */

// Generate an int constant for a C2 build
#ifdef COMPILER2
# define GENERATE_C2_VM_INT_CONSTANT_ENTRY(name)                      GENERATE_VM_INT_CONSTANT_ENTRY(name)
# define GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value)  GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value)
#else
# define GENERATE_C2_VM_INT_CONSTANT_ENTRY(name)
# define GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value)
#endif /* COMPILER1 */

//--------------------------------------------------------------------------------
// VMLongConstantEntry macros
//

#define GENERATE_VM_LONG_CONSTANT_ENTRY(name) \
  { QUOTE(name), cast_uint64_t(name) },

#define GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) \
  { name, cast_uint64_t(value) },

// This macro generates the sentinel value indicating the end of the list
#define GENERATE_VM_LONG_CONSTANT_LAST_ENTRY() \
 { NULL, 0 }

// Generate a long constant for a C1 build
#ifdef COMPILER1
# define GENERATE_C1_VM_LONG_CONSTANT_ENTRY(name)  GENERATE_VM_LONG_CONSTANT_ENTRY(name)
#else
# define GENERATE_C1_VM_LONG_CONSTANT_ENTRY(name)
#endif /* COMPILER1 */

// Generate a long constant for a C2 build
#ifdef COMPILER2
# define GENERATE_C2_VM_LONG_CONSTANT_ENTRY(name)                     GENERATE_VM_LONG_CONSTANT_ENTRY(name)
# define GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value)
#else
# define GENERATE_C2_VM_LONG_CONSTANT_ENTRY(name)
# define GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value)
#endif /* COMPILER1 */

//
// Instantiation of VMStructEntries, VMTypeEntries and VMIntConstantEntries
//

// These initializers are allowed to access private fields in classes
// as long as class VMStructs is a friend
VMStructEntry VMStructs::localHotSpotVMStructs[] = {

2892 2893 2894 2895 2896 2897 2898 2899 2900
  VM_STRUCTS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
             GENERATE_STATIC_VM_STRUCT_ENTRY,
             GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,
             GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
             GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
             GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY,
             GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY,
             GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY,
             GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)
D
duke 已提交
2901

2902
#if INCLUDE_ALL_GCS
2903
  VM_STRUCTS_PARALLELGC(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
D
duke 已提交
2904 2905
                        GENERATE_STATIC_VM_STRUCT_ENTRY)

2906 2907
  VM_STRUCTS_CMS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
                 GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
D
duke 已提交
2908
                 GENERATE_STATIC_VM_STRUCT_ENTRY)
T
tonyp 已提交
2909

2910
  VM_STRUCTS_G1(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
T
tonyp 已提交
2911
                GENERATE_STATIC_VM_STRUCT_ENTRY)
2912
#endif // INCLUDE_ALL_GCS
D
duke 已提交
2913

2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932
  VM_STRUCTS_CPU(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
                 GENERATE_STATIC_VM_STRUCT_ENTRY,
                 GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,
                 GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
                 GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
                 GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY,
                 GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY,
                 GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)

  VM_STRUCTS_OS_CPU(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
                    GENERATE_STATIC_VM_STRUCT_ENTRY,
                    GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,
                    GENERATE_NONSTATIC_VM_STRUCT_ENTRY,
                    GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
                    GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY,
                    GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY,
                    GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)

  GENERATE_VM_STRUCT_LAST_ENTRY()
D
duke 已提交
2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943
};

VMTypeEntry VMStructs::localHotSpotVMTypes[] = {

  VM_TYPES(GENERATE_VM_TYPE_ENTRY,
           GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
           GENERATE_OOP_VM_TYPE_ENTRY,
           GENERATE_INTEGER_VM_TYPE_ENTRY,
           GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
           GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
           GENERATE_C2_VM_TYPE_ENTRY,
2944
           GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY)
D
duke 已提交
2945

2946
#if INCLUDE_ALL_GCS
D
duke 已提交
2947 2948 2949 2950 2951 2952 2953
  VM_TYPES_PARALLELGC(GENERATE_VM_TYPE_ENTRY,
                      GENERATE_TOPLEVEL_VM_TYPE_ENTRY)

  VM_TYPES_CMS(GENERATE_VM_TYPE_ENTRY,
               GENERATE_TOPLEVEL_VM_TYPE_ENTRY)

  VM_TYPES_PARNEW(GENERATE_VM_TYPE_ENTRY)
T
tonyp 已提交
2954 2955 2956

  VM_TYPES_G1(GENERATE_VM_TYPE_ENTRY,
              GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
2957
#endif // INCLUDE_ALL_GCS
D
duke 已提交
2958 2959 2960 2961 2962 2963 2964 2965

  VM_TYPES_CPU(GENERATE_VM_TYPE_ENTRY,
               GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
               GENERATE_OOP_VM_TYPE_ENTRY,
               GENERATE_INTEGER_VM_TYPE_ENTRY,
               GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
               GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
               GENERATE_C2_VM_TYPE_ENTRY,
2966
               GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY)
D
duke 已提交
2967 2968 2969 2970 2971 2972 2973 2974

  VM_TYPES_OS_CPU(GENERATE_VM_TYPE_ENTRY,
                  GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
                  GENERATE_OOP_VM_TYPE_ENTRY,
                  GENERATE_INTEGER_VM_TYPE_ENTRY,
                  GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
                  GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
                  GENERATE_C2_VM_TYPE_ENTRY,
2975 2976 2977
                  GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY)

  GENERATE_VM_TYPE_LAST_ENTRY()
D
duke 已提交
2978 2979 2980 2981 2982 2983 2984 2985
};

VMIntConstantEntry VMStructs::localHotSpotVMIntConstants[] = {

  VM_INT_CONSTANTS(GENERATE_VM_INT_CONSTANT_ENTRY,
                   GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
                   GENERATE_C1_VM_INT_CONSTANT_ENTRY,
                   GENERATE_C2_VM_INT_CONSTANT_ENTRY,
2986
                   GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
D
duke 已提交
2987

2988
#if INCLUDE_ALL_GCS
D
duke 已提交
2989 2990 2991
  VM_INT_CONSTANTS_CMS(GENERATE_VM_INT_CONSTANT_ENTRY)

  VM_INT_CONSTANTS_PARNEW(GENERATE_VM_INT_CONSTANT_ENTRY)
2992
#endif // INCLUDE_ALL_GCS
D
duke 已提交
2993 2994 2995 2996 2997

  VM_INT_CONSTANTS_CPU(GENERATE_VM_INT_CONSTANT_ENTRY,
                       GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
                       GENERATE_C1_VM_INT_CONSTANT_ENTRY,
                       GENERATE_C2_VM_INT_CONSTANT_ENTRY,
2998
                       GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)
D
duke 已提交
2999 3000 3001 3002 3003

  VM_INT_CONSTANTS_OS_CPU(GENERATE_VM_INT_CONSTANT_ENTRY,
                          GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
                          GENERATE_C1_VM_INT_CONSTANT_ENTRY,
                          GENERATE_C2_VM_INT_CONSTANT_ENTRY,
3004 3005 3006
                          GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)

  GENERATE_VM_INT_CONSTANT_LAST_ENTRY()
D
duke 已提交
3007 3008 3009 3010 3011 3012 3013 3014
};

VMLongConstantEntry VMStructs::localHotSpotVMLongConstants[] = {

  VM_LONG_CONSTANTS(GENERATE_VM_LONG_CONSTANT_ENTRY,
                    GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
                    GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
                    GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
3015
                    GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
D
duke 已提交
3016 3017 3018 3019 3020

  VM_LONG_CONSTANTS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY,
                        GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
                        GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
                        GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
3021
                        GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)
D
duke 已提交
3022 3023 3024 3025 3026

  VM_LONG_CONSTANTS_OS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY,
                           GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
                           GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
                           GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
3027 3028 3029
                           GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)

  GENERATE_VM_LONG_CONSTANT_LAST_ENTRY()
D
duke 已提交
3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043
};

// This is used both to check the types of referenced fields and, in
// debug builds, to ensure that all of the field types are present.
void
VMStructs::init() {
  VM_STRUCTS(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
             CHECK_STATIC_VM_STRUCT_ENTRY,
             CHECK_NO_OP,
             CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY,
             CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
             CHECK_C1_NONSTATIC_VM_STRUCT_ENTRY,
             CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY,
             CHECK_NO_OP,
3044
             CHECK_NO_OP);
D
duke 已提交
3045

3046
#if INCLUDE_ALL_GCS
D
duke 已提交
3047 3048 3049 3050
  VM_STRUCTS_PARALLELGC(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
             CHECK_STATIC_VM_STRUCT_ENTRY);

  VM_STRUCTS_CMS(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
3051
             CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY,
D
duke 已提交
3052
             CHECK_STATIC_VM_STRUCT_ENTRY);
T
tonyp 已提交
3053 3054 3055

  VM_STRUCTS_G1(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
                CHECK_STATIC_VM_STRUCT_ENTRY);
3056
#endif // INCLUDE_ALL_GCS
D
duke 已提交
3057 3058 3059 3060 3061 3062 3063 3064

  VM_STRUCTS_CPU(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
                 CHECK_STATIC_VM_STRUCT_ENTRY,
                 CHECK_NO_OP,
                 CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY,
                 CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
                 CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY,
                 CHECK_NO_OP,
3065
                 CHECK_NO_OP);
D
duke 已提交
3066 3067 3068 3069 3070 3071 3072 3073

  VM_STRUCTS_OS_CPU(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
                    CHECK_STATIC_VM_STRUCT_ENTRY,
                    CHECK_NO_OP,
                    CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY,
                    CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
                    CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY,
                    CHECK_NO_OP,
3074
                    CHECK_NO_OP);
D
duke 已提交
3075 3076 3077 3078 3079 3080 3081 3082

  VM_TYPES(CHECK_VM_TYPE_ENTRY,
           CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
           CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
           CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
           CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
           CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY,
           CHECK_C2_VM_TYPE_ENTRY,
3083
           CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY);
D
duke 已提交
3084

3085
#if INCLUDE_ALL_GCS
D
duke 已提交
3086 3087 3088 3089 3090 3091 3092
  VM_TYPES_PARALLELGC(CHECK_VM_TYPE_ENTRY,
                      CHECK_SINGLE_ARG_VM_TYPE_NO_OP);

  VM_TYPES_CMS(CHECK_VM_TYPE_ENTRY,
               CHECK_SINGLE_ARG_VM_TYPE_NO_OP);

  VM_TYPES_PARNEW(CHECK_VM_TYPE_ENTRY)
T
tonyp 已提交
3093 3094 3095

  VM_TYPES_G1(CHECK_VM_TYPE_ENTRY,
              CHECK_SINGLE_ARG_VM_TYPE_NO_OP);
3096
#endif // INCLUDE_ALL_GCS
D
duke 已提交
3097 3098 3099 3100 3101 3102 3103 3104

  VM_TYPES_CPU(CHECK_VM_TYPE_ENTRY,
               CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
               CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
               CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
               CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
               CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY,
               CHECK_C2_VM_TYPE_ENTRY,
3105
               CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY);
D
duke 已提交
3106 3107 3108 3109 3110 3111 3112 3113

  VM_TYPES_OS_CPU(CHECK_VM_TYPE_ENTRY,
                  CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
                  CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
                  CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
                  CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
                  CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY,
                  CHECK_C2_VM_TYPE_ENTRY,
3114
                  CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY);
D
duke 已提交
3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132

  //
  // Split VM_STRUCTS() invocation into two parts to allow MS VC++ 6.0
  // to build with the source mounted over SNC3.2. Symptom was that
  // debug build failed with an internal compiler error. Has been seen
  // mounting sources from Solaris 2.6 and 2.7 hosts, but so far not
  // 2.8 hosts. Appears to occur because line is too long.
  //
  // If an assertion failure is triggered here it means that an entry
  // in VMStructs::localHotSpotVMStructs[] was not found in
  // VMStructs::localHotSpotVMTypes[]. (The assertion itself had to be
  // made less descriptive because of this above bug -- see the
  // definition of ENSURE_FIELD_TYPE_PRESENT.)
  //
  // NOTE: taken out because this was just not working on everyone's
  // Solstice NFS setup. If everyone switches to local workspaces on
  // Win32, we can put this back in.
#ifndef _WINDOWS
3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150
  debug_only(VM_STRUCTS(ENSURE_FIELD_TYPE_PRESENT,
                        CHECK_NO_OP,
                        CHECK_NO_OP,
                        CHECK_NO_OP,
                        CHECK_NO_OP,
                        CHECK_NO_OP,
                        CHECK_NO_OP,
                        CHECK_NO_OP,
                        CHECK_NO_OP));
  debug_only(VM_STRUCTS(CHECK_NO_OP,
                        ENSURE_FIELD_TYPE_PRESENT,
                        CHECK_NO_OP,
                        ENSURE_FIELD_TYPE_PRESENT,
                        ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT,
                        ENSURE_C1_FIELD_TYPE_PRESENT,
                        ENSURE_C2_FIELD_TYPE_PRESENT,
                        CHECK_NO_OP,
                        CHECK_NO_OP));
3151
#if INCLUDE_ALL_GCS
3152
  debug_only(VM_STRUCTS_PARALLELGC(ENSURE_FIELD_TYPE_PRESENT,
D
duke 已提交
3153
                                   ENSURE_FIELD_TYPE_PRESENT));
3154 3155
  debug_only(VM_STRUCTS_CMS(ENSURE_FIELD_TYPE_PRESENT,
                            ENSURE_FIELD_TYPE_PRESENT,
D
duke 已提交
3156
                            ENSURE_FIELD_TYPE_PRESENT));
3157
  debug_only(VM_STRUCTS_G1(ENSURE_FIELD_TYPE_PRESENT,
T
tonyp 已提交
3158
                           ENSURE_FIELD_TYPE_PRESENT));
3159
#endif // INCLUDE_ALL_GCS
3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175
  debug_only(VM_STRUCTS_CPU(ENSURE_FIELD_TYPE_PRESENT,
                            ENSURE_FIELD_TYPE_PRESENT,
                            CHECK_NO_OP,
                            ENSURE_FIELD_TYPE_PRESENT,
                            ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT,
                            ENSURE_C2_FIELD_TYPE_PRESENT,
                            CHECK_NO_OP,
                            CHECK_NO_OP));
  debug_only(VM_STRUCTS_OS_CPU(ENSURE_FIELD_TYPE_PRESENT,
                               ENSURE_FIELD_TYPE_PRESENT,
                               CHECK_NO_OP,
                               ENSURE_FIELD_TYPE_PRESENT,
                               ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT,
                               ENSURE_C2_FIELD_TYPE_PRESENT,
                               CHECK_NO_OP,
                               CHECK_NO_OP));
D
duke 已提交
3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215
#endif
}

extern "C" {

// see comments on cast_uint64_t at the top of this file
#define ASSIGN_CONST_TO_64BIT_VAR(var, expr) \
    JNIEXPORT uint64_t var = cast_uint64_t(expr);
#define ASSIGN_OFFSET_TO_64BIT_VAR(var, type, field)   \
  ASSIGN_CONST_TO_64BIT_VAR(var, offset_of(type, field))
#define ASSIGN_STRIDE_TO_64BIT_VAR(var, array) \
  ASSIGN_CONST_TO_64BIT_VAR(var, (char*)&array[1] - (char*)&array[0])

JNIEXPORT VMStructEntry* gHotSpotVMStructs                 = VMStructs::localHotSpotVMStructs;
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryTypeNameOffset,  VMStructEntry, typeName);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryFieldNameOffset, VMStructEntry, fieldName);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryTypeStringOffset, VMStructEntry, typeString);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryIsStaticOffset, VMStructEntry, isStatic);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryOffsetOffset, VMStructEntry, offset);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryAddressOffset, VMStructEntry, address);
ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMStructEntryArrayStride, gHotSpotVMStructs);
JNIEXPORT VMTypeEntry*   gHotSpotVMTypes                   = VMStructs::localHotSpotVMTypes;
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryTypeNameOffset, VMTypeEntry, typeName);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntrySuperclassNameOffset, VMTypeEntry, superclassName);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsOopTypeOffset, VMTypeEntry, isOopType);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsIntegerTypeOffset, VMTypeEntry, isIntegerType);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsUnsignedOffset, VMTypeEntry, isUnsigned);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntrySizeOffset, VMTypeEntry, size);
ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMTypeEntryArrayStride,gHotSpotVMTypes);
JNIEXPORT VMIntConstantEntry* gHotSpotVMIntConstants       = VMStructs::localHotSpotVMIntConstants;
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMIntConstantEntryNameOffset, VMIntConstantEntry, name);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMIntConstantEntryValueOffset, VMIntConstantEntry, value);
ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMIntConstantEntryArrayStride, gHotSpotVMIntConstants);
JNIEXPORT VMLongConstantEntry* gHotSpotVMLongConstants     = VMStructs::localHotSpotVMLongConstants;
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMLongConstantEntryNameOffset, VMLongConstantEntry, name);
ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMLongConstantEntryValueOffset, VMLongConstantEntry, value);
ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMLongConstantEntryArrayStride, gHotSpotVMLongConstants);
}

#ifdef ASSERT
3216 3217 3218 3219
static int recursiveFindType(VMTypeEntry* origtypes, const char* typeName, bool isRecurse) {
  {
    VMTypeEntry* types = origtypes;
    while (types->typeName != NULL) {
N
never 已提交
3220 3221
      if (strcmp(typeName, types->typeName) == 0) {
        // Found it
3222 3223 3224 3225 3226
        return 1;
      }
      ++types;
    }
  }
N
never 已提交
3227
  // Search for the base type by peeling off const and *
3228 3229
  size_t len = strlen(typeName);
  if (typeName[len-1] == '*') {
3230
    char * s = NEW_C_HEAP_ARRAY(char, len, mtInternal);
3231 3232 3233 3234
    strncpy(s, typeName, len - 1);
    s[len-1] = '\0';
    // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName);
    if (recursiveFindType(origtypes, s, true) == 1) {
3235
      FREE_C_HEAP_ARRAY(char, s, mtInternal);
3236 3237
      return 1;
    }
3238
    FREE_C_HEAP_ARRAY(char, s, mtInternal);
3239
  }
3240
  const char* start = NULL;
3241
  if (strstr(typeName, "GrowableArray<") == typeName) {
3242 3243 3244 3245 3246
    start = typeName + strlen("GrowableArray<");
  } else if (strstr(typeName, "Array<") == typeName) {
    start = typeName + strlen("Array<");
  }
  if (start != NULL) {
3247 3248
    const char * end = strrchr(typeName, '>');
    int len = end - start + 1;
3249
    char * s = NEW_C_HEAP_ARRAY(char, len, mtInternal);
3250 3251 3252 3253
    strncpy(s, start, len - 1);
    s[len-1] = '\0';
    // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName);
    if (recursiveFindType(origtypes, s, true) == 1) {
3254
      FREE_C_HEAP_ARRAY(char, s, mtInternal);
3255 3256
      return 1;
    }
3257
    FREE_C_HEAP_ARRAY(char, s, mtInternal);
3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270
  }
  if (strstr(typeName, "const ") == typeName) {
    const char * s = typeName + strlen("const ");
    // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName);
    if (recursiveFindType(origtypes, s, true) == 1) {
      return 1;
    }
  }
  if (strstr(typeName, " const") == typeName + len - 6) {
    char * s = strdup(typeName);
    s[len - 6] = '\0';
    // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName);
    if (recursiveFindType(origtypes, s, true) == 1) {
D
dholmes 已提交
3271
      free(s);
3272 3273
      return 1;
    }
D
dholmes 已提交
3274
    free(s);
3275 3276 3277 3278
  }
  if (!isRecurse) {
    tty->print_cr("type \"%s\" not found", typeName);
  }
N
never 已提交
3279
  return 0;
3280 3281 3282
}


D
duke 已提交
3283 3284 3285 3286
int
VMStructs::findType(const char* typeName) {
  VMTypeEntry* types = gHotSpotVMTypes;

3287
  return recursiveFindType(types, typeName, false);
D
duke 已提交
3288 3289 3290 3291 3292 3293
}
#endif

void vmStructs_init() {
  debug_only(VMStructs::init());
}
3294 3295 3296

#ifndef PRODUCT
void VMStructs::test() {
3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320
  // Make sure last entry in the each array is indeed the correct end marker.
  // The reason why these are static is to make sure they are zero initialized.
  // Putting them on the stack will leave some garbage in the padding of some fields.
  static VMStructEntry struct_last_entry = GENERATE_VM_STRUCT_LAST_ENTRY();
  assert(memcmp(&localHotSpotVMStructs[(sizeof(localHotSpotVMStructs) / sizeof(VMStructEntry)) - 1],
                &struct_last_entry,
                sizeof(VMStructEntry)) == 0, "Incorrect last entry in localHotSpotVMStructs");

  static VMTypeEntry type_last_entry = GENERATE_VM_TYPE_LAST_ENTRY();
  assert(memcmp(&localHotSpotVMTypes[sizeof(localHotSpotVMTypes) / sizeof(VMTypeEntry) - 1],
                &type_last_entry,
                sizeof(VMTypeEntry)) == 0, "Incorrect last entry in localHotSpotVMTypes");

  static VMIntConstantEntry int_last_entry = GENERATE_VM_INT_CONSTANT_LAST_ENTRY();
  assert(memcmp(&localHotSpotVMIntConstants[sizeof(localHotSpotVMIntConstants) / sizeof(VMIntConstantEntry) - 1],
                &int_last_entry,
                sizeof(VMIntConstantEntry)) == 0, "Incorrect last entry in localHotSpotVMIntConstants");

  static VMLongConstantEntry long_last_entry = GENERATE_VM_LONG_CONSTANT_LAST_ENTRY();
  assert(memcmp(&localHotSpotVMLongConstants[sizeof(localHotSpotVMLongConstants) / sizeof(VMLongConstantEntry) - 1],
                &long_last_entry,
                sizeof(VMLongConstantEntry)) == 0, "Incorrect last entry in localHotSpotVMLongConstants");


3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331
  // Check for duplicate entries in type array
  for (int i = 0; localHotSpotVMTypes[i].typeName != NULL; i++) {
    for (int j = i + 1; localHotSpotVMTypes[j].typeName != NULL; j++) {
      if (strcmp(localHotSpotVMTypes[i].typeName, localHotSpotVMTypes[j].typeName) == 0) {
        tty->print_cr("Duplicate entries for '%s'", localHotSpotVMTypes[i].typeName);
        assert(false, "Duplicate types in localHotSpotVMTypes array");
      }
    }
  }
}
#endif