annotate src/share/vm/runtime/vmStructs.cpp @ 196:d1605aabd0a1

6719955: Update copyright year Summary: Update copyright year for files that have been modified in 2008 Reviewed-by: ohair, tbell
author xdono
date Wed, 02 Jul 2008 12:55:16 -0700
parents c0ecab83e6f3
children d95b224e9f17
rev   line source
duke@0 1 /*
xdono@196 2 * Copyright 2000-2008 Sun Microsystems, Inc. All Rights Reserved.
duke@0 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 4 *
duke@0 5 * This code is free software; you can redistribute it and/or modify it
duke@0 6 * under the terms of the GNU General Public License version 2 only, as
duke@0 7 * published by the Free Software Foundation.
duke@0 8 *
duke@0 9 * This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 12 * version 2 for more details (a copy is included in the LICENSE file that
duke@0 13 * accompanied this code).
duke@0 14 *
duke@0 15 * You should have received a copy of the GNU General Public License version
duke@0 16 * 2 along with this work; if not, write to the Free Software Foundation,
duke@0 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 18 *
duke@0 19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
duke@0 20 * CA 95054 USA or visit www.sun.com if you need additional information or
duke@0 21 * have any questions.
duke@0 22 *
duke@0 23 */
duke@0 24
duke@0 25 # include "incls/_precompiled.incl"
duke@0 26 # include "incls/_vmStructs.cpp.incl"
duke@0 27
duke@0 28 // Note: the cross-product of (c1, c2, product, nonproduct, ...),
duke@0 29 // (nonstatic, static), and (unchecked, checked) has not been taken.
duke@0 30 // Only the macros currently needed have been defined.
duke@0 31
duke@0 32 // A field whose type is not checked is given a null string as the
duke@0 33 // type name, indicating an "opaque" type to the serviceability agent.
duke@0 34
duke@0 35 // NOTE: there is an interdependency between this file and
duke@0 36 // HotSpotTypeDataBase.java, which parses the type strings.
duke@0 37
duke@0 38 #ifndef REG_COUNT
duke@0 39 #define REG_COUNT 0
duke@0 40 #endif
duke@0 41
duke@0 42 // whole purpose of this function is to work around bug c++/27724 in gcc 4.1.1
duke@0 43 // with optimization turned on it doesn't affect produced code
duke@0 44 static inline uint64_t cast_uint64_t(size_t x)
duke@0 45 {
duke@0 46 return x;
duke@0 47 }
duke@0 48
duke@0 49
duke@0 50 //--------------------------------------------------------------------------------
duke@0 51 // VM_STRUCTS
duke@0 52 //
duke@0 53 // This list enumerates all of the fields the serviceability agent
duke@0 54 // needs to know about. Be sure to see also the type table below this one.
duke@0 55 // NOTE that there are platform-specific additions to this table in
duke@0 56 // vmStructs_<os>_<cpu>.hpp.
duke@0 57
duke@0 58 #define VM_STRUCTS(nonstatic_field, \
duke@0 59 static_field, \
duke@0 60 unchecked_nonstatic_field, \
duke@0 61 volatile_nonstatic_field, \
duke@0 62 nonproduct_nonstatic_field, \
duke@0 63 c1_nonstatic_field, \
duke@0 64 c2_nonstatic_field, \
duke@0 65 unchecked_c1_static_field, \
duke@0 66 unchecked_c2_static_field, \
duke@0 67 last_entry) \
duke@0 68 \
duke@0 69 /******************************************************************/ \
duke@0 70 /* OopDesc and Klass hierarchies (NOTE: methodDataOop incomplete) */ \
duke@0 71 /******************************************************************/ \
duke@0 72 \
duke@0 73 volatile_nonstatic_field(oopDesc, _mark, markOop) \
coleenp@113 74 volatile_nonstatic_field(oopDesc, _metadata._klass, wideKlassOop) \
coleenp@113 75 volatile_nonstatic_field(oopDesc, _metadata._compressed_klass, narrowOop) \
duke@0 76 static_field(oopDesc, _bs, BarrierSet*) \
duke@0 77 nonstatic_field(arrayKlass, _dimension, int) \
duke@0 78 nonstatic_field(arrayKlass, _higher_dimension, klassOop) \
duke@0 79 nonstatic_field(arrayKlass, _lower_dimension, klassOop) \
duke@0 80 nonstatic_field(arrayKlass, _vtable_len, int) \
duke@0 81 nonstatic_field(arrayKlass, _alloc_size, juint) \
duke@0 82 nonstatic_field(arrayKlass, _component_mirror, oop) \
duke@0 83 nonstatic_field(compiledICHolderKlass, _alloc_size, juint) \
duke@0 84 nonstatic_field(compiledICHolderOopDesc, _holder_method, methodOop) \
duke@0 85 nonstatic_field(compiledICHolderOopDesc, _holder_klass, klassOop) \
duke@0 86 nonstatic_field(constantPoolOopDesc, _tags, typeArrayOop) \
duke@0 87 nonstatic_field(constantPoolOopDesc, _cache, constantPoolCacheOop) \
duke@0 88 nonstatic_field(constantPoolOopDesc, _pool_holder, klassOop) \
coleenp@113 89 nonstatic_field(constantPoolOopDesc, _length, int) \
coleenp@113 90 nonstatic_field(constantPoolCacheOopDesc, _length, int) \
duke@0 91 nonstatic_field(constantPoolCacheOopDesc, _constant_pool, constantPoolOop) \
duke@0 92 nonstatic_field(instanceKlass, _array_klasses, klassOop) \
duke@0 93 nonstatic_field(instanceKlass, _methods, objArrayOop) \
duke@0 94 nonstatic_field(instanceKlass, _method_ordering, typeArrayOop) \
duke@0 95 nonstatic_field(instanceKlass, _local_interfaces, objArrayOop) \
duke@0 96 nonstatic_field(instanceKlass, _transitive_interfaces, objArrayOop) \
duke@0 97 nonstatic_field(instanceKlass, _nof_implementors, int) \
duke@0 98 nonstatic_field(instanceKlass, _implementors[0], klassOop) \
duke@0 99 nonstatic_field(instanceKlass, _fields, typeArrayOop) \
duke@0 100 nonstatic_field(instanceKlass, _constants, constantPoolOop) \
duke@0 101 nonstatic_field(instanceKlass, _class_loader, oop) \
duke@0 102 nonstatic_field(instanceKlass, _protection_domain, oop) \
duke@0 103 nonstatic_field(instanceKlass, _signers, objArrayOop) \
duke@0 104 nonstatic_field(instanceKlass, _source_file_name, symbolOop) \
duke@0 105 nonstatic_field(instanceKlass, _source_debug_extension, symbolOop) \
duke@0 106 nonstatic_field(instanceKlass, _inner_classes, typeArrayOop) \
duke@0 107 nonstatic_field(instanceKlass, _nonstatic_field_size, int) \
duke@0 108 nonstatic_field(instanceKlass, _static_field_size, int) \
duke@0 109 nonstatic_field(instanceKlass, _static_oop_field_size, int) \
duke@0 110 nonstatic_field(instanceKlass, _nonstatic_oop_map_size, int) \
duke@0 111 nonstatic_field(instanceKlass, _is_marked_dependent, bool) \
duke@0 112 nonstatic_field(instanceKlass, _minor_version, u2) \
duke@0 113 nonstatic_field(instanceKlass, _major_version, u2) \
duke@0 114 nonstatic_field(instanceKlass, _init_state, instanceKlass::ClassState) \
duke@0 115 nonstatic_field(instanceKlass, _init_thread, Thread*) \
duke@0 116 nonstatic_field(instanceKlass, _vtable_len, int) \
duke@0 117 nonstatic_field(instanceKlass, _itable_len, int) \
duke@0 118 nonstatic_field(instanceKlass, _reference_type, ReferenceType) \
duke@0 119 volatile_nonstatic_field(instanceKlass, _oop_map_cache, OopMapCache*) \
duke@0 120 nonstatic_field(instanceKlass, _jni_ids, JNIid*) \
duke@0 121 nonstatic_field(instanceKlass, _osr_nmethods_head, nmethod*) \
duke@0 122 nonstatic_field(instanceKlass, _breakpoints, BreakpointInfo*) \
duke@0 123 nonstatic_field(instanceKlass, _generic_signature, symbolOop) \
duke@0 124 nonstatic_field(instanceKlass, _methods_jmethod_ids, jmethodID*) \
duke@0 125 nonstatic_field(instanceKlass, _methods_cached_itable_indices, int*) \
duke@0 126 volatile_nonstatic_field(instanceKlass, _idnum_allocated_count, u2) \
duke@0 127 nonstatic_field(instanceKlass, _class_annotations, typeArrayOop) \
duke@0 128 nonstatic_field(instanceKlass, _fields_annotations, objArrayOop) \
duke@0 129 nonstatic_field(instanceKlass, _methods_annotations, objArrayOop) \
duke@0 130 nonstatic_field(instanceKlass, _methods_parameter_annotations, objArrayOop) \
duke@0 131 nonstatic_field(instanceKlass, _methods_default_annotations, objArrayOop) \
duke@0 132 nonstatic_field(Klass, _super_check_offset, juint) \
duke@0 133 nonstatic_field(Klass, _secondary_super_cache, klassOop) \
duke@0 134 nonstatic_field(Klass, _secondary_supers, objArrayOop) \
duke@0 135 nonstatic_field(Klass, _primary_supers[0], klassOop) \
duke@0 136 nonstatic_field(Klass, _java_mirror, oop) \
duke@0 137 nonstatic_field(Klass, _modifier_flags, jint) \
duke@0 138 nonstatic_field(Klass, _super, klassOop) \
duke@0 139 nonstatic_field(Klass, _layout_helper, jint) \
duke@0 140 nonstatic_field(Klass, _name, symbolOop) \
duke@0 141 nonstatic_field(Klass, _access_flags, AccessFlags) \
duke@0 142 nonstatic_field(Klass, _subklass, klassOop) \
duke@0 143 nonstatic_field(Klass, _next_sibling, klassOop) \
duke@0 144 nonproduct_nonstatic_field(Klass, _verify_count, int) \
duke@0 145 nonstatic_field(Klass, _alloc_count, juint) \
duke@0 146 nonstatic_field(klassKlass, _alloc_size, juint) \
duke@0 147 nonstatic_field(methodKlass, _alloc_size, juint) \
duke@0 148 nonstatic_field(methodDataOopDesc, _size, int) \
duke@0 149 nonstatic_field(methodDataOopDesc, _method, methodOop) \
duke@0 150 nonstatic_field(methodOopDesc, _constMethod, constMethodOop) \
duke@0 151 nonstatic_field(methodOopDesc, _constants, constantPoolOop) \
duke@0 152 c2_nonstatic_field(methodOopDesc, _method_data, methodDataOop) \
duke@0 153 c2_nonstatic_field(methodOopDesc, _interpreter_invocation_count, int) \
duke@0 154 nonstatic_field(methodOopDesc, _access_flags, AccessFlags) \
duke@0 155 nonstatic_field(methodOopDesc, _vtable_index, int) \
duke@0 156 nonstatic_field(methodOopDesc, _method_size, u2) \
duke@0 157 nonstatic_field(methodOopDesc, _max_stack, u2) \
duke@0 158 nonstatic_field(methodOopDesc, _max_locals, u2) \
duke@0 159 nonstatic_field(methodOopDesc, _size_of_parameters, u2) \
duke@0 160 c2_nonstatic_field(methodOopDesc, _interpreter_throwout_count, u2) \
duke@0 161 nonstatic_field(methodOopDesc, _number_of_breakpoints, u2) \
duke@0 162 nonstatic_field(methodOopDesc, _invocation_counter, InvocationCounter) \
duke@0 163 nonstatic_field(methodOopDesc, _backedge_counter, InvocationCounter) \
duke@0 164 nonproduct_nonstatic_field(methodOopDesc, _compiled_invocation_count, int) \
duke@0 165 volatile_nonstatic_field(methodOopDesc, _code, nmethod*) \
duke@0 166 nonstatic_field(methodOopDesc, _i2i_entry, address) \
duke@0 167 nonstatic_field(methodOopDesc, _adapter, AdapterHandlerEntry*) \
duke@0 168 volatile_nonstatic_field(methodOopDesc, _from_compiled_entry, address) \
duke@0 169 volatile_nonstatic_field(methodOopDesc, _from_interpreted_entry, address) \
duke@0 170 volatile_nonstatic_field(constMethodOopDesc, _fingerprint, uint64_t) \
duke@0 171 nonstatic_field(constMethodOopDesc, _method, methodOop) \
duke@0 172 nonstatic_field(constMethodOopDesc, _stackmap_data, typeArrayOop) \
duke@0 173 nonstatic_field(constMethodOopDesc, _exception_table, typeArrayOop) \
duke@0 174 nonstatic_field(constMethodOopDesc, _constMethod_size, int) \
duke@0 175 nonstatic_field(constMethodOopDesc, _interpreter_kind, jbyte) \
duke@0 176 nonstatic_field(constMethodOopDesc, _flags, jbyte) \
duke@0 177 nonstatic_field(constMethodOopDesc, _code_size, u2) \
duke@0 178 nonstatic_field(constMethodOopDesc, _name_index, u2) \
duke@0 179 nonstatic_field(constMethodOopDesc, _signature_index, u2) \
duke@0 180 nonstatic_field(constMethodOopDesc, _method_idnum, u2) \
duke@0 181 nonstatic_field(constMethodOopDesc, _generic_signature_index, u2) \
duke@0 182 nonstatic_field(objArrayKlass, _element_klass, klassOop) \
duke@0 183 nonstatic_field(objArrayKlass, _bottom_klass, klassOop) \
duke@0 184 nonstatic_field(symbolKlass, _alloc_size, juint) \
duke@0 185 nonstatic_field(symbolOopDesc, _length, unsigned short) \
duke@0 186 unchecked_nonstatic_field(symbolOopDesc, _body, sizeof(jbyte)) /* NOTE: no type */ \
duke@0 187 nonstatic_field(typeArrayKlass, _max_length, int) \
duke@0 188 \
duke@0 189 /***********************/ \
duke@0 190 /* Constant Pool Cache */ \
duke@0 191 /***********************/ \
duke@0 192 \
duke@0 193 volatile_nonstatic_field(ConstantPoolCacheEntry, _indices, intx) \
duke@0 194 volatile_nonstatic_field(ConstantPoolCacheEntry, _f1, oop) \
duke@0 195 volatile_nonstatic_field(ConstantPoolCacheEntry, _f2, intx) \
duke@0 196 volatile_nonstatic_field(ConstantPoolCacheEntry, _flags, intx) \
duke@0 197 \
duke@0 198 /********************************/ \
duke@0 199 /* MethodOop-related structures */ \
duke@0 200 /********************************/ \
duke@0 201 \
duke@0 202 nonstatic_field(CheckedExceptionElement, class_cp_index, u2) \
duke@0 203 nonstatic_field(LocalVariableTableElement, start_bci, u2) \
duke@0 204 nonstatic_field(LocalVariableTableElement, length, u2) \
duke@0 205 nonstatic_field(LocalVariableTableElement, name_cp_index, u2) \
duke@0 206 nonstatic_field(LocalVariableTableElement, descriptor_cp_index, u2) \
duke@0 207 nonstatic_field(LocalVariableTableElement, signature_cp_index, u2) \
duke@0 208 nonstatic_field(LocalVariableTableElement, slot, u2) \
duke@0 209 nonstatic_field(BreakpointInfo, _orig_bytecode, Bytecodes::Code) \
duke@0 210 nonstatic_field(BreakpointInfo, _bci, int) \
duke@0 211 nonstatic_field(BreakpointInfo, _name_index, u2) \
duke@0 212 nonstatic_field(BreakpointInfo, _signature_index, u2) \
duke@0 213 nonstatic_field(BreakpointInfo, _next, BreakpointInfo*) \
duke@0 214 /***********/ \
duke@0 215 /* JNI IDs */ \
duke@0 216 /***********/ \
duke@0 217 \
duke@0 218 nonstatic_field(JNIid, _holder, klassOop) \
duke@0 219 nonstatic_field(JNIid, _next, JNIid*) \
duke@0 220 nonstatic_field(JNIid, _offset, int) \
duke@0 221 /************/ \
duke@0 222 /* Universe */ \
duke@0 223 /************/ \
duke@0 224 \
duke@0 225 static_field(Universe, _boolArrayKlassObj, klassOop) \
duke@0 226 static_field(Universe, _byteArrayKlassObj, klassOop) \
duke@0 227 static_field(Universe, _charArrayKlassObj, klassOop) \
duke@0 228 static_field(Universe, _intArrayKlassObj, klassOop) \
duke@0 229 static_field(Universe, _shortArrayKlassObj, klassOop) \
duke@0 230 static_field(Universe, _longArrayKlassObj, klassOop) \
duke@0 231 static_field(Universe, _singleArrayKlassObj, klassOop) \
duke@0 232 static_field(Universe, _doubleArrayKlassObj, klassOop) \
duke@0 233 static_field(Universe, _symbolKlassObj, klassOop) \
duke@0 234 static_field(Universe, _methodKlassObj, klassOop) \
duke@0 235 static_field(Universe, _constMethodKlassObj, klassOop) \
duke@0 236 static_field(Universe, _methodDataKlassObj, klassOop) \
duke@0 237 static_field(Universe, _klassKlassObj, klassOop) \
duke@0 238 static_field(Universe, _arrayKlassKlassObj, klassOop) \
duke@0 239 static_field(Universe, _objArrayKlassKlassObj, klassOop) \
duke@0 240 static_field(Universe, _typeArrayKlassKlassObj, klassOop) \
duke@0 241 static_field(Universe, _instanceKlassKlassObj, klassOop) \
duke@0 242 static_field(Universe, _constantPoolKlassObj, klassOop) \
duke@0 243 static_field(Universe, _constantPoolCacheKlassObj, klassOop) \
duke@0 244 static_field(Universe, _compiledICHolderKlassObj, klassOop) \
duke@0 245 static_field(Universe, _systemObjArrayKlassObj, klassOop) \
duke@0 246 static_field(Universe, _mirrors[0], oop) \
duke@0 247 static_field(Universe, _main_thread_group, oop) \
duke@0 248 static_field(Universe, _system_thread_group, oop) \
duke@0 249 static_field(Universe, _the_empty_byte_array, typeArrayOop) \
duke@0 250 static_field(Universe, _the_empty_short_array, typeArrayOop) \
duke@0 251 static_field(Universe, _the_empty_int_array, typeArrayOop) \
duke@0 252 static_field(Universe, _the_empty_system_obj_array, objArrayOop) \
duke@0 253 static_field(Universe, _the_empty_class_klass_array, objArrayOop) \
duke@0 254 static_field(Universe, _out_of_memory_error_java_heap, oop) \
duke@0 255 static_field(Universe, _out_of_memory_error_perm_gen, oop) \
duke@0 256 static_field(Universe, _out_of_memory_error_array_size, oop) \
duke@0 257 static_field(Universe, _out_of_memory_error_gc_overhead_limit, oop) \
duke@0 258 static_field(Universe, _null_ptr_exception_instance, oop) \
duke@0 259 static_field(Universe, _arithmetic_exception_instance, oop) \
duke@0 260 static_field(Universe, _vm_exception, oop) \
duke@0 261 static_field(Universe, _collectedHeap, CollectedHeap*) \
duke@0 262 static_field(Universe, _base_vtable_size, int) \
duke@0 263 static_field(Universe, _bootstrapping, bool) \
duke@0 264 static_field(Universe, _fully_initialized, bool) \
duke@0 265 static_field(Universe, _verify_count, int) \
coleenp@113 266 static_field(Universe, _heap_base, address) \
duke@0 267 \
duke@0 268 /**********************************************************************************/ \
duke@0 269 /* Generation and Space hierarchies */ \
duke@0 270 /**********************************************************************************/ \
duke@0 271 \
duke@0 272 unchecked_nonstatic_field(ageTable, sizes, sizeof(ageTable::sizes)) \
duke@0 273 \
duke@0 274 nonstatic_field(BarrierSet, _max_covered_regions, int) \
duke@0 275 nonstatic_field(BlockOffsetTable, _bottom, HeapWord*) \
duke@0 276 nonstatic_field(BlockOffsetTable, _end, HeapWord*) \
duke@0 277 \
duke@0 278 nonstatic_field(BlockOffsetSharedArray, _reserved, MemRegion) \
duke@0 279 nonstatic_field(BlockOffsetSharedArray, _end, HeapWord*) \
duke@0 280 nonstatic_field(BlockOffsetSharedArray, _vs, VirtualSpace) \
duke@0 281 nonstatic_field(BlockOffsetSharedArray, _offset_array, u_char*) \
duke@0 282 \
duke@0 283 nonstatic_field(BlockOffsetArray, _array, BlockOffsetSharedArray*) \
duke@0 284 nonstatic_field(BlockOffsetArray, _sp, Space*) \
duke@0 285 nonstatic_field(BlockOffsetArrayContigSpace, _next_offset_threshold, HeapWord*) \
duke@0 286 nonstatic_field(BlockOffsetArrayContigSpace, _next_offset_index, size_t) \
duke@0 287 \
duke@0 288 nonstatic_field(BlockOffsetArrayNonContigSpace, _unallocated_block, HeapWord*) \
duke@0 289 \
duke@0 290 nonstatic_field(CardGeneration, _rs, GenRemSet*) \
duke@0 291 nonstatic_field(CardGeneration, _bts, BlockOffsetSharedArray*) \
duke@0 292 \
duke@0 293 nonstatic_field(CardTableModRefBS, _whole_heap, const MemRegion) \
duke@0 294 nonstatic_field(CardTableModRefBS, _guard_index, const size_t) \
duke@0 295 nonstatic_field(CardTableModRefBS, _last_valid_index, const size_t) \
duke@0 296 nonstatic_field(CardTableModRefBS, _page_size, const size_t) \
duke@0 297 nonstatic_field(CardTableModRefBS, _byte_map_size, const size_t) \
duke@0 298 nonstatic_field(CardTableModRefBS, _byte_map, jbyte*) \
duke@0 299 nonstatic_field(CardTableModRefBS, _cur_covered_regions, int) \
duke@0 300 nonstatic_field(CardTableModRefBS, _covered, MemRegion*) \
duke@0 301 nonstatic_field(CardTableModRefBS, _committed, MemRegion*) \
duke@0 302 nonstatic_field(CardTableModRefBS, _guard_region, MemRegion) \
duke@0 303 nonstatic_field(CardTableModRefBS, byte_map_base, jbyte*) \
duke@0 304 \
duke@0 305 nonstatic_field(CardTableRS, _ct_bs, CardTableModRefBS) \
duke@0 306 \
duke@0 307 nonstatic_field(CollectedHeap, _reserved, MemRegion) \
duke@0 308 nonstatic_field(SharedHeap, _perm_gen, PermGen*) \
duke@0 309 nonstatic_field(CollectedHeap, _barrier_set, BarrierSet*) \
duke@0 310 nonstatic_field(CollectedHeap, _is_gc_active, bool) \
duke@0 311 nonstatic_field(CompactibleSpace, _compaction_top, HeapWord*) \
duke@0 312 nonstatic_field(CompactibleSpace, _first_dead, HeapWord*) \
duke@0 313 nonstatic_field(CompactibleSpace, _end_of_live, HeapWord*) \
duke@0 314 \
duke@0 315 nonstatic_field(CompactingPermGen, _gen, OneContigSpaceCardGeneration*) \
duke@0 316 \
duke@0 317 nonstatic_field(ContiguousSpace, _top, HeapWord*) \
duke@0 318 nonstatic_field(ContiguousSpace, _concurrent_iteration_safe_limit, HeapWord*) \
duke@0 319 nonstatic_field(ContiguousSpace, _saved_mark_word, HeapWord*) \
duke@0 320 \
duke@0 321 nonstatic_field(DefNewGeneration, _next_gen, Generation*) \
duke@0 322 nonstatic_field(DefNewGeneration, _tenuring_threshold, int) \
duke@0 323 nonstatic_field(DefNewGeneration, _age_table, ageTable) \
duke@0 324 nonstatic_field(DefNewGeneration, _eden_space, EdenSpace*) \
duke@0 325 nonstatic_field(DefNewGeneration, _from_space, ContiguousSpace*) \
duke@0 326 nonstatic_field(DefNewGeneration, _to_space, ContiguousSpace*) \
duke@0 327 \
duke@0 328 nonstatic_field(EdenSpace, _gen, DefNewGeneration*) \
duke@0 329 \
duke@0 330 nonstatic_field(Generation, _reserved, MemRegion) \
duke@0 331 nonstatic_field(Generation, _virtual_space, VirtualSpace) \
duke@0 332 nonstatic_field(Generation, _level, int) \
duke@0 333 nonstatic_field(Generation, _stat_record, Generation::StatRecord) \
duke@0 334 \
duke@0 335 nonstatic_field(Generation::StatRecord, invocations, int) \
duke@0 336 nonstatic_field(Generation::StatRecord, accumulated_time, elapsedTimer) \
duke@0 337 \
duke@0 338 nonstatic_field(GenerationSpec, _name, Generation::Name) \
duke@0 339 nonstatic_field(GenerationSpec, _init_size, size_t) \
duke@0 340 nonstatic_field(GenerationSpec, _max_size, size_t) \
duke@0 341 \
duke@0 342 static_field(GenCollectedHeap, _gch, GenCollectedHeap*) \
duke@0 343 nonstatic_field(GenCollectedHeap, _n_gens, int) \
duke@0 344 unchecked_nonstatic_field(GenCollectedHeap, _gens, sizeof(GenCollectedHeap::_gens)) /* NOTE: no type */ \
duke@0 345 nonstatic_field(GenCollectedHeap, _gen_specs, GenerationSpec**) \
duke@0 346 \
duke@0 347 nonstatic_field(HeapWord, i, char*) \
duke@0 348 \
duke@0 349 nonstatic_field(MemRegion, _start, HeapWord*) \
duke@0 350 nonstatic_field(MemRegion, _word_size, size_t) \
duke@0 351 \
duke@0 352 nonstatic_field(OffsetTableContigSpace, _offsets, BlockOffsetArray) \
duke@0 353 \
duke@0 354 nonstatic_field(OneContigSpaceCardGeneration, _min_heap_delta_bytes, size_t) \
duke@0 355 nonstatic_field(OneContigSpaceCardGeneration, _the_space, ContiguousSpace*) \
duke@0 356 nonstatic_field(OneContigSpaceCardGeneration, _last_gc, WaterMark) \
duke@0 357 \
duke@0 358 nonstatic_field(CompactingPermGenGen, _ro_vs, VirtualSpace) \
duke@0 359 nonstatic_field(CompactingPermGenGen, _rw_vs, VirtualSpace) \
duke@0 360 nonstatic_field(CompactingPermGenGen, _md_vs, VirtualSpace) \
duke@0 361 nonstatic_field(CompactingPermGenGen, _mc_vs, VirtualSpace) \
duke@0 362 nonstatic_field(CompactingPermGenGen, _ro_space, OffsetTableContigSpace*) \
duke@0 363 nonstatic_field(CompactingPermGenGen, _rw_space, OffsetTableContigSpace*) \
duke@0 364 static_field(CompactingPermGenGen, unshared_bottom, HeapWord*) \
duke@0 365 static_field(CompactingPermGenGen, unshared_end, HeapWord*) \
duke@0 366 static_field(CompactingPermGenGen, shared_bottom, HeapWord*) \
duke@0 367 static_field(CompactingPermGenGen, readonly_bottom, HeapWord*) \
duke@0 368 static_field(CompactingPermGenGen, readonly_end, HeapWord*) \
duke@0 369 static_field(CompactingPermGenGen, readwrite_bottom, HeapWord*) \
duke@0 370 static_field(CompactingPermGenGen, readwrite_end, HeapWord*) \
duke@0 371 static_field(CompactingPermGenGen, miscdata_bottom, HeapWord*) \
duke@0 372 static_field(CompactingPermGenGen, miscdata_end, HeapWord*) \
duke@0 373 static_field(CompactingPermGenGen, misccode_bottom, HeapWord*) \
duke@0 374 static_field(CompactingPermGenGen, misccode_end, HeapWord*) \
duke@0 375 static_field(CompactingPermGenGen, shared_end, HeapWord*) \
duke@0 376 \
duke@0 377 nonstatic_field(PermGen, _capacity_expansion_limit, size_t) \
duke@0 378 \
duke@0 379 nonstatic_field(PermanentGenerationSpec, _name, PermGen::Name) \
duke@0 380 nonstatic_field(PermanentGenerationSpec, _init_size, size_t) \
duke@0 381 nonstatic_field(PermanentGenerationSpec, _max_size, size_t) \
duke@0 382 \
duke@0 383 nonstatic_field(Space, _bottom, HeapWord*) \
duke@0 384 nonstatic_field(Space, _end, HeapWord*) \
duke@0 385 \
duke@0 386 nonstatic_field(TenuredGeneration, _shrink_factor, size_t) \
duke@0 387 nonstatic_field(TenuredGeneration, _capacity_at_prologue, size_t) \
duke@0 388 nonstatic_field(ThreadLocalAllocBuffer, _start, HeapWord*) \
duke@0 389 nonstatic_field(ThreadLocalAllocBuffer, _top, HeapWord*) \
duke@0 390 nonstatic_field(ThreadLocalAllocBuffer, _end, HeapWord*) \
duke@0 391 nonstatic_field(ThreadLocalAllocBuffer, _desired_size, size_t) \
duke@0 392 nonstatic_field(ThreadLocalAllocBuffer, _refill_waste_limit, size_t) \
duke@0 393 static_field(ThreadLocalAllocBuffer, _target_refills, unsigned) \
duke@0 394 nonstatic_field(VirtualSpace, _low_boundary, char*) \
duke@0 395 nonstatic_field(VirtualSpace, _high_boundary, char*) \
duke@0 396 nonstatic_field(VirtualSpace, _low, char*) \
duke@0 397 nonstatic_field(VirtualSpace, _high, char*) \
duke@0 398 nonstatic_field(VirtualSpace, _lower_high, char*) \
duke@0 399 nonstatic_field(VirtualSpace, _middle_high, char*) \
duke@0 400 nonstatic_field(VirtualSpace, _upper_high, char*) \
duke@0 401 nonstatic_field(WaterMark, _point, HeapWord*) \
duke@0 402 nonstatic_field(WaterMark, _space, Space*) \
duke@0 403 \
duke@0 404 /************************/ \
duke@0 405 /* PerfMemory - jvmstat */ \
duke@0 406 /************************/ \
duke@0 407 \
duke@0 408 nonstatic_field(PerfDataPrologue, magic, jint) \
duke@0 409 nonstatic_field(PerfDataPrologue, byte_order, jbyte) \
duke@0 410 nonstatic_field(PerfDataPrologue, major_version, jbyte) \
duke@0 411 nonstatic_field(PerfDataPrologue, minor_version, jbyte) \
duke@0 412 nonstatic_field(PerfDataPrologue, accessible, jbyte) \
duke@0 413 nonstatic_field(PerfDataPrologue, used, jint) \
duke@0 414 nonstatic_field(PerfDataPrologue, overflow, jint) \
duke@0 415 nonstatic_field(PerfDataPrologue, mod_time_stamp, jlong) \
duke@0 416 nonstatic_field(PerfDataPrologue, entry_offset, jint) \
duke@0 417 nonstatic_field(PerfDataPrologue, num_entries, jint) \
duke@0 418 \
duke@0 419 nonstatic_field(PerfDataEntry, entry_length, jint) \
duke@0 420 nonstatic_field(PerfDataEntry, name_offset, jint) \
duke@0 421 nonstatic_field(PerfDataEntry, vector_length, jint) \
duke@0 422 nonstatic_field(PerfDataEntry, data_type, jbyte) \
duke@0 423 nonstatic_field(PerfDataEntry, flags, jbyte) \
duke@0 424 nonstatic_field(PerfDataEntry, data_units, jbyte) \
duke@0 425 nonstatic_field(PerfDataEntry, data_variability, jbyte) \
duke@0 426 nonstatic_field(PerfDataEntry, data_offset, jint) \
duke@0 427 \
duke@0 428 static_field(PerfMemory, _start, char*) \
duke@0 429 static_field(PerfMemory, _end, char*) \
duke@0 430 static_field(PerfMemory, _top, char*) \
duke@0 431 static_field(PerfMemory, _capacity, size_t) \
duke@0 432 static_field(PerfMemory, _prologue, PerfDataPrologue*) \
duke@0 433 static_field(PerfMemory, _initialized, jint) \
duke@0 434 \
duke@0 435 /***************/ \
duke@0 436 /* SymbolTable */ \
duke@0 437 /***************/ \
duke@0 438 \
duke@0 439 static_field(SymbolTable, _the_table, SymbolTable*) \
duke@0 440 \
duke@0 441 /***************/ \
duke@0 442 /* StringTable */ \
duke@0 443 /***************/ \
duke@0 444 \
duke@0 445 static_field(StringTable, _the_table, StringTable*) \
duke@0 446 \
duke@0 447 /********************/ \
duke@0 448 /* SystemDictionary */ \
duke@0 449 /********************/ \
duke@0 450 \
duke@0 451 static_field(SystemDictionary, _dictionary, Dictionary*) \
duke@0 452 static_field(SystemDictionary, _placeholders, PlaceholderTable*) \
duke@0 453 static_field(SystemDictionary, _shared_dictionary, Dictionary*) \
duke@0 454 static_field(SystemDictionary, _system_loader_lock_obj, oop) \
duke@0 455 static_field(SystemDictionary, _loader_constraints, LoaderConstraintTable*) \
jrose@147 456 static_field(SystemDictionary, WK_KLASS(object_klass), klassOop) \
jrose@147 457 static_field(SystemDictionary, WK_KLASS(string_klass), klassOop) \
jrose@147 458 static_field(SystemDictionary, WK_KLASS(class_klass), klassOop) \
jrose@147 459 static_field(SystemDictionary, WK_KLASS(cloneable_klass), klassOop) \
jrose@147 460 static_field(SystemDictionary, WK_KLASS(classloader_klass), klassOop) \
jrose@147 461 static_field(SystemDictionary, WK_KLASS(serializable_klass), klassOop) \
jrose@147 462 static_field(SystemDictionary, WK_KLASS(system_klass), klassOop) \
jrose@147 463 static_field(SystemDictionary, WK_KLASS(throwable_klass), klassOop) \
jrose@147 464 static_field(SystemDictionary, WK_KLASS(threaddeath_klass), klassOop) \
jrose@147 465 static_field(SystemDictionary, WK_KLASS(error_klass), klassOop) \
jrose@147 466 static_field(SystemDictionary, WK_KLASS(exception_klass), klassOop) \
jrose@147 467 static_field(SystemDictionary, WK_KLASS(runtime_exception_klass), klassOop) \
jrose@147 468 static_field(SystemDictionary, WK_KLASS(classNotFoundException_klass), klassOop) \
jrose@147 469 static_field(SystemDictionary, WK_KLASS(noClassDefFoundError_klass), klassOop) \
jrose@147 470 static_field(SystemDictionary, WK_KLASS(linkageError_klass), klassOop) \
jrose@147 471 static_field(SystemDictionary, WK_KLASS(ClassCastException_klass), klassOop) \
jrose@147 472 static_field(SystemDictionary, WK_KLASS(ArrayStoreException_klass), klassOop) \
jrose@147 473 static_field(SystemDictionary, WK_KLASS(virtualMachineError_klass), klassOop) \
jrose@147 474 static_field(SystemDictionary, WK_KLASS(OutOfMemoryError_klass), klassOop) \
jrose@147 475 static_field(SystemDictionary, WK_KLASS(StackOverflowError_klass), klassOop) \
jrose@147 476 static_field(SystemDictionary, WK_KLASS(protectionDomain_klass), klassOop) \
jrose@147 477 static_field(SystemDictionary, WK_KLASS(AccessControlContext_klass), klassOop) \
jrose@147 478 static_field(SystemDictionary, WK_KLASS(reference_klass), klassOop) \
jrose@147 479 static_field(SystemDictionary, WK_KLASS(soft_reference_klass), klassOop) \
jrose@147 480 static_field(SystemDictionary, WK_KLASS(weak_reference_klass), klassOop) \
jrose@147 481 static_field(SystemDictionary, WK_KLASS(final_reference_klass), klassOop) \
jrose@147 482 static_field(SystemDictionary, WK_KLASS(phantom_reference_klass), klassOop) \
jrose@147 483 static_field(SystemDictionary, WK_KLASS(finalizer_klass), klassOop) \
jrose@147 484 static_field(SystemDictionary, WK_KLASS(thread_klass), klassOop) \
jrose@147 485 static_field(SystemDictionary, WK_KLASS(threadGroup_klass), klassOop) \
jrose@147 486 static_field(SystemDictionary, WK_KLASS(properties_klass), klassOop) \
jrose@147 487 static_field(SystemDictionary, WK_KLASS(stringBuffer_klass), klassOop) \
jrose@147 488 static_field(SystemDictionary, WK_KLASS(vector_klass), klassOop) \
jrose@147 489 static_field(SystemDictionary, WK_KLASS(hashtable_klass), klassOop) \
duke@0 490 static_field(SystemDictionary, _box_klasses[0], klassOop) \
duke@0 491 static_field(SystemDictionary, _java_system_loader, oop) \
duke@0 492 \
duke@0 493 /*******************/ \
duke@0 494 /* HashtableBucket */ \
duke@0 495 /*******************/ \
duke@0 496 \
duke@0 497 nonstatic_field(HashtableBucket, _entry, BasicHashtableEntry*) \
duke@0 498 \
duke@0 499 /******************/ \
duke@0 500 /* HashtableEntry */ \
duke@0 501 /******************/ \
duke@0 502 \
duke@0 503 nonstatic_field(BasicHashtableEntry, _next, BasicHashtableEntry*) \
duke@0 504 nonstatic_field(BasicHashtableEntry, _hash, unsigned int) \
duke@0 505 nonstatic_field(HashtableEntry, _literal, oop) \
duke@0 506 \
duke@0 507 /*************/ \
duke@0 508 /* Hashtable */ \
duke@0 509 /*************/ \
duke@0 510 \
duke@0 511 nonstatic_field(BasicHashtable, _table_size, int) \
duke@0 512 nonstatic_field(BasicHashtable, _buckets, HashtableBucket*) \
duke@0 513 nonstatic_field(BasicHashtable, _free_list, BasicHashtableEntry*) \
duke@0 514 nonstatic_field(BasicHashtable, _first_free_entry, char*) \
duke@0 515 nonstatic_field(BasicHashtable, _end_block, char*) \
duke@0 516 nonstatic_field(BasicHashtable, _entry_size, int) \
duke@0 517 \
duke@0 518 /*******************/ \
duke@0 519 /* DictionaryEntry */ \
duke@0 520 /*******************/ \
duke@0 521 \
duke@0 522 nonstatic_field(DictionaryEntry, _loader, oop) \
duke@0 523 nonstatic_field(DictionaryEntry, _pd_set, ProtectionDomainEntry*) \
duke@0 524 \
duke@0 525 /********************/ \
duke@0 526 \
duke@0 527 nonstatic_field(PlaceholderEntry, _loader, oop) \
duke@0 528 \
duke@0 529 /**************************/ \
duke@0 530 /* ProctectionDomainEntry */ \
duke@0 531 /**************************/ \
duke@0 532 \
duke@0 533 nonstatic_field(ProtectionDomainEntry, _next, ProtectionDomainEntry*) \
duke@0 534 nonstatic_field(ProtectionDomainEntry, _protection_domain, oop) \
duke@0 535 \
duke@0 536 /*************************/ \
duke@0 537 /* LoaderConstraintEntry */ \
duke@0 538 /*************************/ \
duke@0 539 \
duke@0 540 nonstatic_field(LoaderConstraintEntry, _name, symbolOop) \
duke@0 541 nonstatic_field(LoaderConstraintEntry, _num_loaders, int) \
duke@0 542 nonstatic_field(LoaderConstraintEntry, _max_loaders, int) \
duke@0 543 nonstatic_field(LoaderConstraintEntry, _loaders, oop*) \
duke@0 544 \
duke@0 545 /********************************/ \
duke@0 546 /* CodeCache (NOTE: incomplete) */ \
duke@0 547 /********************************/ \
duke@0 548 \
duke@0 549 static_field(CodeCache, _heap, CodeHeap*) \
duke@0 550 \
duke@0 551 /*******************************/ \
duke@0 552 /* CodeHeap (NOTE: incomplete) */ \
duke@0 553 /*******************************/ \
duke@0 554 \
duke@0 555 nonstatic_field(CodeHeap, _memory, VirtualSpace) \
duke@0 556 nonstatic_field(CodeHeap, _segmap, VirtualSpace) \
duke@0 557 nonstatic_field(CodeHeap, _log2_segment_size, int) \
duke@0 558 nonstatic_field(HeapBlock, _header, HeapBlock::Header) \
duke@0 559 nonstatic_field(HeapBlock::Header, _length, size_t) \
duke@0 560 nonstatic_field(HeapBlock::Header, _used, bool) \
duke@0 561 \
duke@0 562 /**********************************/ \
duke@0 563 /* Interpreter (NOTE: incomplete) */ \
duke@0 564 /**********************************/ \
duke@0 565 \
duke@0 566 static_field(AbstractInterpreter, _code, StubQueue*) \
duke@0 567 \
duke@0 568 /****************************/ \
duke@0 569 /* Stubs (NOTE: incomplete) */ \
duke@0 570 /****************************/ \
duke@0 571 \
duke@0 572 nonstatic_field(StubQueue, _stub_buffer, address) \
duke@0 573 nonstatic_field(StubQueue, _buffer_limit, int) \
duke@0 574 nonstatic_field(StubQueue, _queue_begin, int) \
duke@0 575 nonstatic_field(StubQueue, _queue_end, int) \
duke@0 576 nonstatic_field(StubQueue, _number_of_stubs, int) \
duke@0 577 nonstatic_field(InterpreterCodelet, _size, int) \
duke@0 578 nonstatic_field(InterpreterCodelet, _description, const char*) \
duke@0 579 nonstatic_field(InterpreterCodelet, _bytecode, Bytecodes::Code) \
duke@0 580 \
duke@0 581 /***********************************/ \
duke@0 582 /* StubRoutines (NOTE: incomplete) */ \
duke@0 583 /***********************************/ \
duke@0 584 \
duke@0 585 static_field(StubRoutines, _call_stub_return_address, address) \
duke@0 586 IA32_ONLY(static_field(StubRoutines::i486,_call_stub_compiled_return, address)) \
duke@0 587 \
duke@0 588 /***************************************/ \
duke@0 589 /* PcDesc and other compiled code info */ \
duke@0 590 /***************************************/ \
duke@0 591 \
duke@0 592 nonstatic_field(PcDesc, _pc_offset, int) \
duke@0 593 nonstatic_field(PcDesc, _scope_decode_offset, int) \
duke@0 594 \
duke@0 595 /***************************************************/ \
duke@0 596 /* CodeBlobs (NOTE: incomplete, but only a little) */ \
duke@0 597 /***************************************************/ \
duke@0 598 \
duke@0 599 nonstatic_field(CodeBlob, _name, const char*) \
duke@0 600 nonstatic_field(CodeBlob, _size, int) \
duke@0 601 nonstatic_field(CodeBlob, _header_size, int) \
duke@0 602 nonstatic_field(CodeBlob, _relocation_size, int) \
duke@0 603 nonstatic_field(CodeBlob, _instructions_offset, int) \
duke@0 604 nonstatic_field(CodeBlob, _frame_complete_offset, int) \
duke@0 605 nonstatic_field(CodeBlob, _data_offset, int) \
duke@0 606 nonstatic_field(CodeBlob, _oops_offset, int) \
duke@0 607 nonstatic_field(CodeBlob, _oops_length, int) \
duke@0 608 nonstatic_field(CodeBlob, _frame_size, int) \
duke@0 609 nonstatic_field(CodeBlob, _oop_maps, OopMapSet*) \
duke@0 610 \
duke@0 611 /**************************************************/ \
duke@0 612 /* NMethods (NOTE: incomplete, but only a little) */ \
duke@0 613 /**************************************************/ \
duke@0 614 \
duke@0 615 static_field(nmethod, _zombie_instruction_size, int) \
duke@0 616 nonstatic_field(nmethod, _method, methodOop) \
duke@0 617 nonstatic_field(nmethod, _entry_bci, int) \
duke@0 618 nonstatic_field(nmethod, _link, nmethod*) \
duke@0 619 nonstatic_field(nmethod, _exception_offset, int) \
duke@0 620 nonstatic_field(nmethod, _deoptimize_offset, int) \
duke@0 621 nonstatic_field(nmethod, _orig_pc_offset, int) \
duke@0 622 nonstatic_field(nmethod, _stub_offset, int) \
duke@0 623 nonstatic_field(nmethod, _scopes_data_offset, int) \
duke@0 624 nonstatic_field(nmethod, _scopes_pcs_offset, int) \
duke@0 625 nonstatic_field(nmethod, _dependencies_offset, int) \
duke@0 626 nonstatic_field(nmethod, _handler_table_offset, int) \
duke@0 627 nonstatic_field(nmethod, _nul_chk_table_offset, int) \
duke@0 628 nonstatic_field(nmethod, _nmethod_end_offset, int) \
duke@0 629 nonstatic_field(nmethod, _entry_point, address) \
duke@0 630 nonstatic_field(nmethod, _verified_entry_point, address) \
duke@0 631 nonstatic_field(nmethod, _osr_entry_point, address) \
duke@0 632 nonstatic_field(nmethod, _lock_count, jint) \
duke@0 633 nonstatic_field(nmethod, _stack_traversal_mark, long) \
duke@0 634 \
duke@0 635 /********************************/ \
duke@0 636 /* JavaCalls (NOTE: incomplete) */ \
duke@0 637 /********************************/ \
duke@0 638 \
duke@0 639 nonstatic_field(JavaCallWrapper, _anchor, JavaFrameAnchor) \
duke@0 640 /********************************/ \
duke@0 641 /* JavaFrameAnchor (NOTE: incomplete) */ \
duke@0 642 /********************************/ \
duke@0 643 volatile_nonstatic_field(JavaFrameAnchor, _last_Java_sp, intptr_t*) \
duke@0 644 volatile_nonstatic_field(JavaFrameAnchor, _last_Java_pc, address) \
duke@0 645 \
duke@0 646 /******************************/ \
duke@0 647 /* Threads (NOTE: incomplete) */ \
duke@0 648 /******************************/ \
duke@0 649 \
duke@0 650 static_field(Threads, _thread_list, JavaThread*) \
duke@0 651 static_field(Threads, _number_of_threads, int) \
duke@0 652 static_field(Threads, _number_of_non_daemon_threads, int) \
duke@0 653 static_field(Threads, _return_code, int) \
duke@0 654 \
duke@0 655 volatile_nonstatic_field(Thread, _suspend_flags, uint32_t) \
duke@0 656 nonstatic_field(Thread, _active_handles, JNIHandleBlock*) \
duke@0 657 nonstatic_field(Thread, _highest_lock, address) \
duke@0 658 nonstatic_field(Thread, _tlab, ThreadLocalAllocBuffer) \
duke@0 659 nonstatic_field(Thread, _current_pending_monitor, ObjectMonitor*) \
duke@0 660 nonstatic_field(Thread, _current_pending_monitor_is_from_java, bool) \
duke@0 661 nonstatic_field(Thread, _current_waiting_monitor, ObjectMonitor*) \
duke@0 662 nonstatic_field(NamedThread, _name, char*) \
duke@0 663 nonstatic_field(JavaThread, _next, JavaThread*) \
duke@0 664 nonstatic_field(JavaThread, _threadObj, oop) \
duke@0 665 nonstatic_field(JavaThread, _anchor, JavaFrameAnchor) \
duke@0 666 volatile_nonstatic_field(JavaThread, _thread_state, JavaThreadState) \
duke@0 667 nonstatic_field(JavaThread, _osthread, OSThread*) \
duke@0 668 nonstatic_field(JavaThread, _stack_base, address) \
duke@0 669 nonstatic_field(JavaThread, _stack_size, size_t) \
duke@0 670 \
duke@0 671 /************/ \
duke@0 672 /* OSThread */ \
duke@0 673 /************/ \
duke@0 674 \
duke@0 675 nonstatic_field(OSThread, _interrupted, jint) \
duke@0 676 \
duke@0 677 /************************/ \
duke@0 678 /* OopMap and OopMapSet */ \
duke@0 679 /************************/ \
duke@0 680 \
duke@0 681 nonstatic_field(OopMap, _pc_offset, int) \
duke@0 682 nonstatic_field(OopMap, _omv_count, int) \
duke@0 683 nonstatic_field(OopMap, _omv_data_size, int) \
duke@0 684 nonstatic_field(OopMap, _omv_data, unsigned char*) \
duke@0 685 nonstatic_field(OopMap, _write_stream, CompressedWriteStream*) \
duke@0 686 nonstatic_field(OopMapSet, _om_count, int) \
duke@0 687 nonstatic_field(OopMapSet, _om_size, int) \
duke@0 688 nonstatic_field(OopMapSet, _om_data, OopMap**) \
duke@0 689 \
duke@0 690 /*********************************/ \
duke@0 691 /* JNIHandles and JNIHandleBlock */ \
duke@0 692 /*********************************/ \
duke@0 693 static_field(JNIHandles, _global_handles, JNIHandleBlock*) \
duke@0 694 static_field(JNIHandles, _weak_global_handles, JNIHandleBlock*) \
duke@0 695 static_field(JNIHandles, _deleted_handle, oop) \
duke@0 696 \
duke@0 697 unchecked_nonstatic_field(JNIHandleBlock, _handles, JNIHandleBlock::block_size_in_oops * sizeof(Oop)) /* Note: no type */ \
duke@0 698 nonstatic_field(JNIHandleBlock, _top, int) \
duke@0 699 nonstatic_field(JNIHandleBlock, _next, JNIHandleBlock*) \
duke@0 700 \
duke@0 701 /********************/ \
duke@0 702 /* CompressedStream */ \
duke@0 703 /********************/ \
duke@0 704 \
duke@0 705 nonstatic_field(CompressedStream, _buffer, u_char*) \
duke@0 706 nonstatic_field(CompressedStream, _position, int) \
duke@0 707 \
duke@0 708 /*********************************/ \
duke@0 709 /* VMRegImpl (NOTE: incomplete) */ \
duke@0 710 /*********************************/ \
duke@0 711 \
duke@0 712 static_field(VMRegImpl, regName[0], const char*) \
duke@0 713 static_field(VMRegImpl, stack0, VMReg) \
duke@0 714 \
duke@0 715 /*******************************/ \
duke@0 716 /* Runtime1 (NOTE: incomplete) */ \
duke@0 717 /*******************************/ \
duke@0 718 \
duke@0 719 unchecked_c1_static_field(Runtime1, _blobs, sizeof(Runtime1::_blobs)) /* NOTE: no type */ \
duke@0 720 \
duke@0 721 /************/ \
duke@0 722 /* Monitors */ \
duke@0 723 /************/ \
duke@0 724 \
duke@0 725 volatile_nonstatic_field(ObjectMonitor, _header, markOop) \
duke@0 726 unchecked_nonstatic_field(ObjectMonitor, _object, sizeof(void *)) /* NOTE: no type */ \
duke@0 727 unchecked_nonstatic_field(ObjectMonitor, _owner, sizeof(void *)) /* NOTE: no type */ \
duke@0 728 volatile_nonstatic_field(ObjectMonitor, _count, intptr_t) \
duke@0 729 volatile_nonstatic_field(ObjectMonitor, _waiters, intptr_t) \
duke@0 730 volatile_nonstatic_field(ObjectMonitor, _recursions, intptr_t) \
duke@0 731 nonstatic_field(ObjectMonitor, FreeNext, ObjectMonitor*) \
duke@0 732 volatile_nonstatic_field(BasicLock, _displaced_header, markOop) \
duke@0 733 nonstatic_field(BasicObjectLock, _lock, BasicLock) \
duke@0 734 nonstatic_field(BasicObjectLock, _obj, oop) \
duke@0 735 static_field(ObjectSynchronizer, gBlockList, ObjectMonitor*) \
duke@0 736 \
duke@0 737 /*********************/ \
duke@0 738 /* Matcher (C2 only) */ \
duke@0 739 /*********************/ \
duke@0 740 \
duke@0 741 unchecked_c2_static_field(Matcher, _regEncode, sizeof(Matcher::_regEncode)) /* NOTE: no type */ \
duke@0 742 \
duke@0 743 /*********************/ \
duke@0 744 /* -XX flags */ \
duke@0 745 /*********************/ \
duke@0 746 \
duke@0 747 nonstatic_field(Flag, type, const char*) \
duke@0 748 nonstatic_field(Flag, name, const char*) \
duke@0 749 unchecked_nonstatic_field(Flag, addr, sizeof(void*)) /* NOTE: no type */ \
duke@0 750 nonstatic_field(Flag, kind, const char*) \
duke@0 751 static_field(Flag, flags, Flag*) \
duke@0 752 static_field(Flag, numFlags, size_t) \
duke@0 753 \
duke@0 754 /*************************/ \
duke@0 755 /* JDK / VM version info */ \
duke@0 756 /*************************/ \
duke@0 757 \
duke@0 758 static_field(Abstract_VM_Version, _s_vm_release, const char*) \
duke@0 759 static_field(Abstract_VM_Version, _s_internal_vm_info_string, const char*) \
duke@0 760 static_field(Abstract_VM_Version, _vm_major_version, int) \
duke@0 761 static_field(Abstract_VM_Version, _vm_minor_version, int) \
duke@0 762 static_field(Abstract_VM_Version, _vm_build_number, int) \
duke@0 763 \
duke@0 764 static_field(JDK_Version, _pre_jdk16_version, bool) \
duke@0 765 static_field(JDK_Version, _jdk_version, int) \
duke@0 766 \
duke@0 767 \
duke@0 768 \
duke@0 769 /*************/ \
duke@0 770 /* Arguments */ \
duke@0 771 /*************/ \
duke@0 772 \
duke@0 773 static_field(Arguments, _jvm_flags_array, char**) \
duke@0 774 static_field(Arguments, _num_jvm_flags, int) \
duke@0 775 static_field(Arguments, _jvm_args_array, char**) \
duke@0 776 static_field(Arguments, _num_jvm_args, int) \
duke@0 777 static_field(Arguments, _java_command, char*) \
duke@0 778 \
duke@0 779 \
duke@0 780 /************************/ \
duke@0 781 /* Miscellaneous fields */ \
duke@0 782 /************************/ \
duke@0 783 \
duke@0 784 nonstatic_field(AccessFlags, _flags, jint) \
duke@0 785 nonstatic_field(elapsedTimer, _counter, jlong) \
duke@0 786 nonstatic_field(elapsedTimer, _active, bool) \
duke@0 787 nonstatic_field(InvocationCounter, _counter, unsigned int)
duke@0 788
duke@0 789 /* NOTE that we do not use the last_entry() macro here; it is used */
duke@0 790 /* in vmStructs_<os>_<cpu>.hpp's VM_STRUCTS_OS_CPU macro (and must */
duke@0 791 /* be present there) */
duke@0 792
duke@0 793 //--------------------------------------------------------------------------------
duke@0 794 // VM_TYPES
duke@0 795 //
duke@0 796 // This list must enumerate at least all of the types in the above
duke@0 797 // list. For the types in the above list, the entry below must have
duke@0 798 // exactly the same spacing since string comparisons are done in the
duke@0 799 // code which verifies the consistency of these tables (in the debug
duke@0 800 // build).
duke@0 801 //
duke@0 802 // In addition to the above types, this list is required to enumerate
duke@0 803 // the JNI's java types, which are used to indicate the size of Java
duke@0 804 // fields in this VM to the SA. Further, oop types are currently
duke@0 805 // distinguished by name (i.e., ends with "oop") over in the SA.
duke@0 806 //
duke@0 807 // The declare_toplevel_type macro should be used to declare types
duke@0 808 // which do not have a superclass.
duke@0 809 //
duke@0 810 // The declare_integer_type and declare_unsigned_integer_type macros
duke@0 811 // are required in order to properly identify C integer types over in
duke@0 812 // the SA. They should be used for any type which is otherwise opaque
duke@0 813 // and which it is necessary to coerce into an integer value. This
duke@0 814 // includes, for example, the type uintptr_t. Note that while they
duke@0 815 // will properly identify the type's size regardless of the platform,
duke@0 816 // since it is does not seem possible to deduce or check signedness at
duke@0 817 // compile time using the pointer comparison tricks, it is currently
duke@0 818 // required that the given types have the same signedness across all
duke@0 819 // platforms.
duke@0 820 //
duke@0 821 // NOTE that there are platform-specific additions to this table in
duke@0 822 // vmStructs_<os>_<cpu>.hpp.
duke@0 823
duke@0 824 #define VM_TYPES(declare_type, \
duke@0 825 declare_toplevel_type, \
duke@0 826 declare_oop_type, \
duke@0 827 declare_integer_type, \
duke@0 828 declare_unsigned_integer_type, \
duke@0 829 declare_c1_toplevel_type, \
duke@0 830 declare_c2_type, \
duke@0 831 declare_c2_toplevel_type, \
duke@0 832 last_entry) \
duke@0 833 \
duke@0 834 /*************************************************************/ \
duke@0 835 /* Java primitive types -- required by the SA implementation */ \
duke@0 836 /* in order to determine the size of Java fields in this VM */ \
duke@0 837 /* (the implementation looks up these names specifically) */ \
duke@0 838 /* NOTE: since we fetch these sizes from the remote VM, we */ \
duke@0 839 /* have a bootstrapping sequence during which it is not */ \
duke@0 840 /* valid to fetch Java values from the remote process, only */ \
duke@0 841 /* C integer values (of known size). NOTE also that we do */ \
duke@0 842 /* NOT include "Java unsigned" types like juint here; since */ \
duke@0 843 /* Java does not have unsigned primitive types, those can */ \
duke@0 844 /* not be mapped directly and are considered to be C integer */ \
duke@0 845 /* types in this system (see the "other types" section, */ \
duke@0 846 /* below.) */ \
duke@0 847 /*************************************************************/ \
duke@0 848 \
duke@0 849 declare_toplevel_type(jboolean) \
duke@0 850 declare_toplevel_type(jbyte) \
duke@0 851 declare_toplevel_type(jchar) \
duke@0 852 declare_toplevel_type(jdouble) \
duke@0 853 declare_toplevel_type(jfloat) \
duke@0 854 declare_toplevel_type(jint) \
duke@0 855 declare_toplevel_type(jlong) \
duke@0 856 declare_toplevel_type(jshort) \
duke@0 857 \
duke@0 858 /*********************************************************************/ \
duke@0 859 /* C integer types. User-defined typedefs (like "size_t" or */ \
duke@0 860 /* "intptr_t") are guaranteed to be present with the same names over */ \
duke@0 861 /* in the SA's type database. Names like "unsigned short" are not */ \
duke@0 862 /* guaranteed to be visible through the SA's type database lookup */ \
duke@0 863 /* mechanism, though they will have a Type object created for them */ \
duke@0 864 /* and are valid types for Fields. */ \
duke@0 865 /*********************************************************************/ \
duke@0 866 declare_integer_type(bool) \
duke@0 867 declare_integer_type(int) \
duke@0 868 declare_integer_type(long) \
duke@0 869 declare_integer_type(char) \
duke@0 870 declare_unsigned_integer_type(unsigned char) \
duke@0 871 declare_unsigned_integer_type(unsigned int) \
duke@0 872 declare_unsigned_integer_type(unsigned short) \
duke@0 873 declare_unsigned_integer_type(unsigned long) \
duke@0 874 /* The compiler thinks this is a different type than */ \
duke@0 875 /* unsigned short on Win32 */ \
duke@0 876 declare_unsigned_integer_type(u2) \
duke@0 877 declare_unsigned_integer_type(unsigned) \
duke@0 878 \
duke@0 879 /*****************************/ \
duke@0 880 /* C primitive pointer types */ \
duke@0 881 /*****************************/ \
duke@0 882 \
duke@0 883 declare_toplevel_type(int*) \
duke@0 884 declare_toplevel_type(char*) \
duke@0 885 declare_toplevel_type(char**) \
duke@0 886 declare_toplevel_type(const char*) \
duke@0 887 declare_toplevel_type(u_char*) \
duke@0 888 declare_toplevel_type(unsigned char*) \
duke@0 889 \
duke@0 890 /*******************************************************************/ \
duke@0 891 /* Types which it will be handy to have available over in the SA */ \
duke@0 892 /* in order to do platform-independent address -> integer coercion */ \
duke@0 893 /* (note: these will be looked up by name) */ \
duke@0 894 /*******************************************************************/ \
duke@0 895 \
duke@0 896 declare_unsigned_integer_type(size_t) \
dcubed@152 897 declare_integer_type(ssize_t) \
duke@0 898 declare_unsigned_integer_type(const size_t) \
duke@0 899 declare_integer_type(intx) \
duke@0 900 declare_integer_type(intptr_t) \
duke@0 901 declare_unsigned_integer_type(uintx) \
duke@0 902 declare_unsigned_integer_type(uintptr_t) \
duke@0 903 declare_unsigned_integer_type(uint32_t) \
duke@0 904 declare_unsigned_integer_type(uint64_t) \
duke@0 905 declare_integer_type(const int) \
duke@0 906 \
duke@0 907 /*******************************************************************************/ \
duke@0 908 /* OopDesc and Klass hierarchies (NOTE: missing methodDataOop-related classes) */ \
duke@0 909 /*******************************************************************************/ \
duke@0 910 \
duke@0 911 declare_toplevel_type(oopDesc) \
duke@0 912 declare_toplevel_type(Klass_vtbl) \
duke@0 913 declare_type(Klass, Klass_vtbl) \
duke@0 914 declare_type(arrayKlass, Klass) \
duke@0 915 declare_type(arrayKlassKlass, klassKlass) \
duke@0 916 declare_type(arrayOopDesc, oopDesc) \
coleenp@113 917 declare_type(compiledICHolderKlass, Klass) \
coleenp@113 918 declare_type(compiledICHolderOopDesc, oopDesc) \
coleenp@113 919 declare_type(constantPoolKlass, Klass) \
coleenp@113 920 declare_type(constantPoolOopDesc, oopDesc) \
coleenp@113 921 declare_type(constantPoolCacheKlass, Klass) \
coleenp@113 922 declare_type(constantPoolCacheOopDesc, oopDesc) \
duke@0 923 declare_type(instanceKlass, Klass) \
duke@0 924 declare_type(instanceKlassKlass, klassKlass) \
duke@0 925 declare_type(instanceOopDesc, oopDesc) \
duke@0 926 declare_type(instanceRefKlass, instanceKlass) \
duke@0 927 declare_type(klassKlass, Klass) \
duke@0 928 declare_type(klassOopDesc, oopDesc) \
duke@0 929 declare_type(markOopDesc, oopDesc) \
duke@0 930 declare_type(methodDataKlass, Klass) \
duke@0 931 declare_type(methodDataOopDesc, oopDesc) \
duke@0 932 declare_type(methodKlass, Klass) \
duke@0 933 declare_type(constMethodKlass, Klass) \
duke@0 934 declare_type(methodOopDesc, oopDesc) \
duke@0 935 declare_type(objArrayKlass, arrayKlass) \
duke@0 936 declare_type(objArrayKlassKlass, arrayKlassKlass) \
duke@0 937 declare_type(objArrayOopDesc, arrayOopDesc) \
duke@0 938 declare_type(constMethodOopDesc, oopDesc) \
duke@0 939 declare_type(symbolKlass, Klass) \
duke@0 940 declare_type(symbolOopDesc, oopDesc) \
duke@0 941 declare_type(typeArrayKlass, arrayKlass) \
duke@0 942 declare_type(typeArrayKlassKlass, arrayKlassKlass) \
duke@0 943 declare_type(typeArrayOopDesc, arrayOopDesc) \
duke@0 944 \
duke@0 945 /********/ \
duke@0 946 /* Oops */ \
duke@0 947 /********/ \
duke@0 948 \
duke@0 949 declare_oop_type(constantPoolOop) \
duke@0 950 declare_oop_type(constantPoolCacheOop) \
duke@0 951 declare_oop_type(klassOop) \
duke@0 952 declare_oop_type(markOop) \
duke@0 953 declare_oop_type(methodOop) \
coleenp@113 954 declare_oop_type(methodDataOop) \
duke@0 955 declare_oop_type(objArrayOop) \
duke@0 956 declare_oop_type(oop) \
coleenp@113 957 declare_oop_type(narrowOop) \
coleenp@113 958 declare_oop_type(wideKlassOop) \
duke@0 959 declare_oop_type(constMethodOop) \
duke@0 960 declare_oop_type(symbolOop) \
duke@0 961 declare_oop_type(typeArrayOop) \
duke@0 962 \
duke@0 963 /*************************************/ \
duke@0 964 /* MethodOop-related data structures */ \
duke@0 965 /*************************************/ \
duke@0 966 \
duke@0 967 declare_toplevel_type(CheckedExceptionElement) \
duke@0 968 declare_toplevel_type(LocalVariableTableElement) \
duke@0 969 \
duke@0 970 /******************************************/ \
duke@0 971 /* Generation and space hierarchies */ \
duke@0 972 /* (needed for run-time type information) */ \
duke@0 973 /******************************************/ \
duke@0 974 \
duke@0 975 declare_toplevel_type(CollectedHeap) \
duke@0 976 declare_type(SharedHeap, CollectedHeap) \
duke@0 977 declare_type(GenCollectedHeap, SharedHeap) \
duke@0 978 declare_toplevel_type(Generation) \
duke@0 979 declare_type(DefNewGeneration, Generation) \
duke@0 980 declare_type(CardGeneration, Generation) \
duke@0 981 declare_type(OneContigSpaceCardGeneration, CardGeneration) \
duke@0 982 declare_type(TenuredGeneration, OneContigSpaceCardGeneration) \
duke@0 983 declare_type(CompactingPermGenGen, OneContigSpaceCardGeneration) \
duke@0 984 declare_toplevel_type(Space) \
duke@0 985 declare_toplevel_type(BitMap) \
duke@0 986 declare_type(CompactibleSpace, Space) \
duke@0 987 declare_type(ContiguousSpace, CompactibleSpace) \
duke@0 988 declare_type(EdenSpace, ContiguousSpace) \
duke@0 989 declare_type(OffsetTableContigSpace, ContiguousSpace) \
duke@0 990 declare_type(TenuredSpace, OffsetTableContigSpace) \
duke@0 991 declare_type(ContigPermSpace, OffsetTableContigSpace) \
duke@0 992 declare_toplevel_type(PermGen) \
duke@0 993 declare_type(CompactingPermGen, PermGen) \
duke@0 994 declare_toplevel_type(BarrierSet) \
duke@0 995 declare_type(ModRefBarrierSet, BarrierSet) \
duke@0 996 declare_type(CardTableModRefBS, ModRefBarrierSet) \
duke@0 997 declare_toplevel_type(GenRemSet) \
duke@0 998 declare_type(CardTableRS, GenRemSet) \
duke@0 999 declare_toplevel_type(BlockOffsetSharedArray) \
duke@0 1000 declare_toplevel_type(BlockOffsetTable) \
duke@0 1001 declare_type(BlockOffsetArray, BlockOffsetTable) \
duke@0 1002 declare_type(BlockOffsetArrayContigSpace, BlockOffsetArray) \
duke@0 1003 declare_type(BlockOffsetArrayNonContigSpace, BlockOffsetArray) \
duke@0 1004 \
duke@0 1005 /* Miscellaneous other GC types */ \
duke@0 1006 \
duke@0 1007 declare_toplevel_type(ageTable) \
duke@0 1008 declare_toplevel_type(Generation::StatRecord) \
duke@0 1009 declare_toplevel_type(GenerationSpec) \
duke@0 1010 declare_toplevel_type(HeapWord) \
duke@0 1011 declare_toplevel_type(MemRegion) \
duke@0 1012 declare_toplevel_type(const MemRegion) \
duke@0 1013 declare_toplevel_type(PermanentGenerationSpec) \
duke@0 1014 declare_toplevel_type(ThreadLocalAllocBuffer) \
duke@0 1015 declare_toplevel_type(VirtualSpace) \
duke@0 1016 declare_toplevel_type(WaterMark) \
duke@0 1017 \
duke@0 1018 /* Pointers to Garbage Collection types */ \
duke@0 1019 \
duke@0 1020 declare_toplevel_type(BarrierSet*) \
duke@0 1021 declare_toplevel_type(BlockOffsetSharedArray*) \
duke@0 1022 declare_toplevel_type(GenRemSet*) \
duke@0 1023 declare_toplevel_type(CardTableRS*) \
duke@0 1024 declare_toplevel_type(CollectedHeap*) \
duke@0 1025 declare_toplevel_type(ContiguousSpace*) \
duke@0 1026 declare_toplevel_type(DefNewGeneration*) \
duke@0 1027 declare_toplevel_type(EdenSpace*) \
duke@0 1028 declare_toplevel_type(GenCollectedHeap*) \
duke@0 1029 declare_toplevel_type(Generation*) \
duke@0 1030 declare_toplevel_type(GenerationSpec**) \
duke@0 1031 declare_toplevel_type(HeapWord*) \
duke@0 1032 declare_toplevel_type(MemRegion*) \
duke@0 1033 declare_toplevel_type(OffsetTableContigSpace*) \
duke@0 1034 declare_toplevel_type(OneContigSpaceCardGeneration*) \
duke@0 1035 declare_toplevel_type(PermGen*) \
duke@0 1036 declare_toplevel_type(Space*) \
duke@0 1037 declare_toplevel_type(ThreadLocalAllocBuffer*) \
duke@0 1038 \
duke@0 1039 /************************/ \
duke@0 1040 /* PerfMemory - jvmstat */ \
duke@0 1041 /************************/ \
duke@0 1042 \
duke@0 1043 declare_toplevel_type(PerfDataPrologue) \
duke@0 1044 declare_toplevel_type(PerfDataPrologue*) \
duke@0 1045 declare_toplevel_type(PerfDataEntry) \
duke@0 1046 declare_toplevel_type(PerfMemory) \
duke@0 1047 \
duke@0 1048 /*********************************/ \
duke@0 1049 /* SymbolTable, SystemDictionary */ \
duke@0 1050 /*********************************/ \
duke@0 1051 \
duke@0 1052 declare_toplevel_type(BasicHashtable) \
duke@0 1053 declare_type(Hashtable, BasicHashtable) \
duke@0 1054 declare_type(SymbolTable, Hashtable) \
duke@0 1055 declare_type(StringTable, Hashtable) \
duke@0 1056 declare_type(LoaderConstraintTable, Hashtable) \
duke@0 1057 declare_type(TwoOopHashtable, Hashtable) \
duke@0 1058 declare_type(Dictionary, TwoOopHashtable) \
duke@0 1059 declare_type(PlaceholderTable, TwoOopHashtable) \
duke@0 1060 declare_toplevel_type(Hashtable*) \
duke@0 1061 declare_toplevel_type(SymbolTable*) \
duke@0 1062 declare_toplevel_type(StringTable*) \
duke@0 1063 declare_toplevel_type(LoaderConstraintTable*) \
duke@0 1064 declare_toplevel_type(TwoOopHashtable*) \
duke@0 1065 declare_toplevel_type(Dictionary*) \
duke@0 1066 declare_toplevel_type(PlaceholderTable*) \
duke@0 1067 declare_toplevel_type(BasicHashtableEntry) \
duke@0 1068 declare_toplevel_type(BasicHashtableEntry*) \
duke@0 1069 declare_type(HashtableEntry, BasicHashtableEntry) \
duke@0 1070 declare_type(DictionaryEntry, HashtableEntry) \
duke@0 1071 declare_type(PlaceholderEntry, HashtableEntry) \
duke@0 1072 declare_type(LoaderConstraintEntry, HashtableEntry) \
duke@0 1073 declare_toplevel_type(HashtableEntry*) \
duke@0 1074 declare_toplevel_type(DictionaryEntry*) \
duke@0 1075 declare_toplevel_type(HashtableBucket) \
duke@0 1076 declare_toplevel_type(HashtableBucket*) \
duke@0 1077 declare_toplevel_type(SystemDictionary) \
duke@0 1078 declare_toplevel_type(ProtectionDomainEntry) \
duke@0 1079 declare_toplevel_type(ProtectionDomainEntry*) \
duke@0 1080 \
duke@0 1081 /***********************************************************/ \
duke@0 1082 /* Thread hierarchy (needed for run-time type information) */ \
duke@0 1083 /***********************************************************/ \
duke@0 1084 \
duke@0 1085 declare_toplevel_type(Threads) \
duke@0 1086 declare_toplevel_type(ThreadShadow) \
duke@0 1087 declare_type(Thread, ThreadShadow) \
duke@0 1088 declare_type(NamedThread, Thread) \
duke@0 1089 declare_type(WatcherThread, Thread) \
duke@0 1090 declare_type(JavaThread, Thread) \
duke@0 1091 declare_type(JvmtiAgentThread, JavaThread) \
duke@0 1092 declare_type(LowMemoryDetectorThread, JavaThread) \
duke@0 1093 declare_type(CompilerThread, JavaThread) \
duke@0 1094 declare_toplevel_type(OSThread) \
duke@0 1095 declare_toplevel_type(JavaFrameAnchor) \
duke@0 1096 \
duke@0 1097 /***************/ \
duke@0 1098 /* Interpreter */ \
duke@0 1099 /***************/ \
duke@0 1100 \
duke@0 1101 declare_toplevel_type(AbstractInterpreter) \
duke@0 1102 \
duke@0 1103 /*********/ \
duke@0 1104 /* Stubs */ \
duke@0 1105 /*********/ \
duke@0 1106 \
duke@0 1107 declare_toplevel_type(StubQueue) \
duke@0 1108 declare_toplevel_type(StubRoutines) \
duke@0 1109 IA32_ONLY(declare_toplevel_type(StubRoutines::i486)) \
duke@0 1110 declare_toplevel_type(Stub) \
duke@0 1111 declare_type(InterpreterCodelet, Stub) \
duke@0 1112 \
duke@0 1113 /*************/ \
duke@0 1114 /* JavaCalls */ \
duke@0 1115 /*************/ \
duke@0 1116 \
duke@0 1117 declare_toplevel_type(JavaCallWrapper) \
duke@0 1118 \
duke@0 1119 /*************/ \
duke@0 1120 /* CodeCache */ \
duke@0 1121 /*************/ \
duke@0 1122 \
duke@0 1123 declare_toplevel_type(CodeCache) \
duke@0 1124 \
duke@0 1125 /************/ \
duke@0 1126 /* CodeHeap */ \
duke@0 1127 /************/ \
duke@0 1128 \
duke@0 1129 declare_toplevel_type(CodeHeap) \
duke@0 1130 declare_toplevel_type(CodeHeap*) \
duke@0 1131 declare_toplevel_type(HeapBlock) \
duke@0 1132 declare_toplevel_type(HeapBlock::Header) \
duke@0 1133 declare_type(FreeBlock, HeapBlock) \
duke@0 1134 \
duke@0 1135 /*************************************************************/ \
duke@0 1136 /* CodeBlob hierarchy (needed for run-time type information) */ \
duke@0 1137 /*************************************************************/ \
duke@0 1138 \
duke@0 1139 declare_toplevel_type(CodeBlob) \
duke@0 1140 declare_type(BufferBlob, CodeBlob) \
duke@0 1141 declare_type(nmethod, CodeBlob) \
duke@0 1142 declare_type(RuntimeStub, CodeBlob) \
duke@0 1143 declare_type(SingletonBlob, CodeBlob) \
duke@0 1144 declare_type(SafepointBlob, SingletonBlob) \
duke@0 1145 declare_type(DeoptimizationBlob, SingletonBlob) \
duke@0 1146 declare_c2_type(ExceptionBlob, SingletonBlob) \
duke@0 1147 declare_c2_type(UncommonTrapBlob, CodeBlob) \
duke@0 1148 \
duke@0 1149 /***************************************/ \
duke@0 1150 /* PcDesc and other compiled code info */ \
duke@0 1151 /***************************************/ \
duke@0 1152 \
duke@0 1153 declare_toplevel_type(PcDesc) \
duke@0 1154 \
duke@0 1155 /************************/ \
duke@0 1156 /* OopMap and OopMapSet */ \
duke@0 1157 /************************/ \
duke@0 1158 \
duke@0 1159 declare_toplevel_type(OopMap) \
duke@0 1160 declare_toplevel_type(OopMapSet) \
duke@0 1161 \
duke@0 1162 /********************/ \
duke@0 1163 /* CompressedStream */ \
duke@0 1164 /********************/ \
duke@0 1165 \
duke@0 1166 declare_toplevel_type(CompressedStream) \
duke@0 1167 \
duke@0 1168 /**************/ \
duke@0 1169 /* VMRegImpl */ \
duke@0 1170 /**************/ \
duke@0 1171 \
duke@0 1172 declare_toplevel_type(VMRegImpl) \
duke@0 1173 \
duke@0 1174 /*********************************/ \
duke@0 1175 /* JNIHandles and JNIHandleBlock */ \
duke@0 1176 /*********************************/ \
duke@0 1177 \
duke@0 1178 declare_toplevel_type(JNIHandles) \
duke@0 1179 declare_toplevel_type(JNIHandleBlock) \
duke@0 1180 \
duke@0 1181 /**********************/ \
duke@0 1182 /* Runtime1 (C1 only) */ \
duke@0 1183 /**********************/ \
duke@0 1184 \
duke@0 1185 declare_c1_toplevel_type(Runtime1) \
duke@0 1186 \
duke@0 1187 /************/ \
duke@0 1188 /* Monitors */ \
duke@0 1189 /************/ \
duke@0 1190 \
duke@0 1191 declare_toplevel_type(ObjectMonitor) \
duke@0 1192 declare_toplevel_type(ObjectSynchronizer) \
duke@0 1193 declare_toplevel_type(BasicLock) \
duke@0 1194 declare_toplevel_type(BasicObjectLock) \
duke@0 1195 \
duke@0 1196 /*********************/ \
duke@0 1197 /* Matcher (C2 only) */ \
duke@0 1198 /*********************/ \
duke@0 1199 \
duke@0 1200 /* NOTE: this is not really a toplevel type, but we only need */ \
duke@0 1201 /* this one -- FIXME later if necessary */ \
duke@0 1202 declare_c2_toplevel_type(Matcher) \
duke@0 1203 \
duke@0 1204 /*********************/ \
duke@0 1205 /* Adapter Blob Entries */ \
duke@0 1206 /*********************/ \
duke@0 1207 declare_toplevel_type(AdapterHandlerEntry) \
duke@0 1208 declare_toplevel_type(AdapterHandlerEntry*) \
duke@0 1209 \
duke@0 1210 /********************/ \
duke@0 1211 /* -XX flags */ \
duke@0 1212 /********************/ \
duke@0 1213 \
duke@0 1214 declare_toplevel_type(Flag) \
duke@0 1215 declare_toplevel_type(Flag*) \
duke@0 1216 \
duke@0 1217 /********************/ \
duke@0 1218 /* JDK/VM version */ \
duke@0 1219 /********************/ \
duke@0 1220 \
duke@0 1221 declare_toplevel_type(Abstract_VM_Version) \
duke@0 1222 declare_toplevel_type(JDK_Version) \
duke@0 1223 \
duke@0 1224 /*************/ \
duke@0 1225 /* Arguments */ \
duke@0 1226 /*************/ \
duke@0 1227 \
duke@0 1228 declare_toplevel_type(Arguments) \
duke@0 1229 \
duke@0 1230 /***************/ \
duke@0 1231 /* Other types */ \
duke@0 1232 /***************/ \
duke@0 1233 \
duke@0 1234 /* all enum types */ \
duke@0 1235 \
duke@0 1236 declare_integer_type(Bytecodes::Code) \
duke@0 1237 declare_integer_type(Generation::Name) \
duke@0 1238 declare_integer_type(instanceKlass::ClassState) \
duke@0 1239 declare_integer_type(JavaThreadState) \
duke@0 1240 declare_integer_type(Location::Type) \
duke@0 1241 declare_integer_type(Location::Where) \
duke@0 1242 declare_integer_type(PermGen::Name) \
duke@0 1243 \
duke@0 1244 declare_integer_type(AccessFlags) /* FIXME: wrong type (not integer) */\
duke@0 1245 declare_toplevel_type(address) /* FIXME: should this be an integer type? */\
duke@0 1246 declare_toplevel_type(BreakpointInfo) \
duke@0 1247 declare_toplevel_type(BreakpointInfo*) \
duke@0 1248 declare_toplevel_type(CodeBlob*) \
duke@0 1249 declare_toplevel_type(CompressedWriteStream*) \
duke@0 1250 declare_toplevel_type(ConstantPoolCacheEntry) \
duke@0 1251 declare_toplevel_type(elapsedTimer) \
duke@0 1252 declare_toplevel_type(intptr_t*) \
duke@0 1253 declare_unsigned_integer_type(InvocationCounter) /* FIXME: wrong type (not integer) */ \
duke@0 1254 declare_toplevel_type(JavaThread*) \
duke@0 1255 declare_toplevel_type(jbyte*) \
duke@0 1256 declare_toplevel_type(jbyte**) \
duke@0 1257 declare_toplevel_type(jint*) \
duke@0 1258 declare_toplevel_type(jniIdMapBase*) \
duke@0 1259 declare_unsigned_integer_type(juint) \
duke@0 1260 declare_unsigned_integer_type(julong) \
duke@0 1261 declare_toplevel_type(JNIHandleBlock*) \
duke@0 1262 declare_toplevel_type(JNIid) \
duke@0 1263 declare_toplevel_type(JNIid*) \
duke@0 1264 declare_toplevel_type(jmethodID*) \
duke@0 1265 declare_toplevel_type(Mutex*) \
duke@0 1266 declare_toplevel_type(nmethod*) \
duke@0 1267 declare_toplevel_type(ObjectMonitor*) \
duke@0 1268 declare_toplevel_type(oop*) \
duke@0 1269 declare_toplevel_type(OopMap**) \
duke@0 1270 declare_toplevel_type(OopMapCache*) \
duke@0 1271 declare_toplevel_type(OopMapSet*) \
duke@0 1272 declare_toplevel_type(VMReg) \
duke@0 1273 declare_toplevel_type(OSThread*) \
duke@0 1274 declare_integer_type(ReferenceType) \
duke@0 1275 declare_toplevel_type(StubQueue*) \
duke@0 1276 declare_toplevel_type(Thread*) \
duke@0 1277 declare_toplevel_type(Universe)
duke@0 1278
duke@0 1279 /* NOTE that we do not use the last_entry() macro here; it is used */
duke@0 1280 /* in vmStructs_<os>_<cpu>.hpp's VM_TYPES_OS_CPU macro (and must be */
duke@0 1281 /* present there) */
duke@0 1282
duke@0 1283 //--------------------------------------------------------------------------------
duke@0 1284 // VM_INT_CONSTANTS
duke@0 1285 //
duke@0 1286 // This table contains integer constants required over in the
duke@0 1287 // serviceability agent. The "declare_constant" macro is used for all
duke@0 1288 // enums, etc., while "declare_preprocessor_constant" must be used for
duke@0 1289 // all #defined constants.
duke@0 1290
duke@0 1291 #define VM_INT_CONSTANTS(declare_constant, \
duke@0 1292 declare_preprocessor_constant, \
duke@0 1293 declare_c1_constant, \
duke@0 1294 declare_c2_constant, \
duke@0 1295 declare_c2_preprocessor_constant, \
duke@0 1296 last_entry) \
duke@0 1297 \
duke@0 1298 /******************/ \
duke@0 1299 /* Useful globals */ \
duke@0 1300 /******************/ \
duke@0 1301 \
duke@0 1302 declare_constant(UseTLAB) \
duke@0 1303 \
duke@0 1304 /**************/ \
duke@0 1305 /* Stack bias */ \
duke@0 1306 /**************/ \
duke@0 1307 \
duke@0 1308 declare_preprocessor_constant("STACK_BIAS", STACK_BIAS) \
duke@0 1309 \
duke@0 1310 /****************/ \
duke@0 1311 /* Object sizes */ \
duke@0 1312 /****************/ \
duke@0 1313 \
coleenp@113 1314 declare_constant(oopSize) \
duke@0 1315 declare_constant(LogBytesPerWord) \
duke@0 1316 declare_constant(BytesPerLong) \
duke@0 1317 \
duke@0 1318 /********************/ \
duke@0 1319 /* Object alignment */ \
duke@0 1320 /********************/ \
duke@0 1321 \
coleenp@113 1322 declare_constant(MinObjAlignment) \
duke@0 1323 declare_constant(MinObjAlignmentInBytes) \
coleenp@113 1324 declare_constant(LogMinObjAlignmentInBytes) \
duke@0 1325 \
duke@0 1326 /********************************************/ \
duke@0 1327 /* Generation and Space Hierarchy Constants */ \
duke@0 1328 /********************************************/ \
duke@0 1329 \
duke@0 1330 declare_constant(ageTable::table_size) \
duke@0 1331 \
duke@0 1332 declare_constant(BarrierSet::ModRef) \
duke@0 1333 declare_constant(BarrierSet::CardTableModRef) \
duke@0 1334 declare_constant(BarrierSet::Other) \
duke@0 1335 \
duke@0 1336 declare_constant(BlockOffsetSharedArray::LogN) \
duke@0 1337 declare_constant(BlockOffsetSharedArray::LogN_words) \
duke@0 1338 declare_constant(BlockOffsetSharedArray::N_bytes) \
duke@0 1339 declare_constant(BlockOffsetSharedArray::N_words) \
duke@0 1340 \
duke@0 1341 declare_constant(BlockOffsetArray::N_words) \
duke@0 1342 \
duke@0 1343 declare_constant(CardTableModRefBS::clean_card) \
duke@0 1344 declare_constant(CardTableModRefBS::last_card) \
duke@0 1345 declare_constant(CardTableModRefBS::dirty_card) \
duke@0 1346 declare_constant(CardTableModRefBS::Precise) \
duke@0 1347 declare_constant(CardTableModRefBS::ObjHeadPreciseArray) \
duke@0 1348 declare_constant(CardTableModRefBS::card_shift) \
duke@0 1349 declare_constant(CardTableModRefBS::card_size) \
duke@0 1350 declare_constant(CardTableModRefBS::card_size_in_words) \
duke@0 1351 \
duke@0 1352 declare_constant(CardTableRS::youngergen_card) \
duke@0 1353 \
duke@0 1354 declare_constant(CollectedHeap::Abstract) \
duke@0 1355 declare_constant(CollectedHeap::SharedHeap) \
duke@0 1356 declare_constant(CollectedHeap::GenCollectedHeap) \
duke@0 1357 \
duke@0 1358 declare_constant(GenCollectedHeap::max_gens) \
duke@0 1359 \
duke@0 1360 /* constants from Generation::Name enum */ \
duke@0 1361 \
duke@0 1362 declare_constant(Generation::DefNew) \
duke@0 1363 declare_constant(Generation::MarkSweepCompact) \
duke@0 1364 declare_constant(Generation::Other) \
duke@0 1365 \
duke@0 1366 declare_constant(Generation::LogOfGenGrain) \
duke@0 1367 declare_constant(Generation::GenGrain) \
duke@0 1368 \
duke@0 1369 declare_constant(HeapWordSize) \
duke@0 1370 declare_constant(LogHeapWordSize) \
duke@0 1371 \
duke@0 1372 /* constants from PermGen::Name enum */ \
duke@0 1373 \
duke@0 1374 declare_constant(PermGen::MarkSweepCompact) \
duke@0 1375 declare_constant(PermGen::MarkSweep) \
duke@0 1376 \
duke@0 1377 /************************/ \
duke@0 1378 /* PerfMemory - jvmstat */ \
duke@0 1379 /************************/ \
duke@0 1380 \
duke@0 1381 declare_preprocessor_constant("PERFDATA_MAJOR_VERSION", PERFDATA_MAJOR_VERSION) \
duke@0 1382 declare_preprocessor_constant("PERFDATA_MINOR_VERSION", PERFDATA_MINOR_VERSION) \
duke@0 1383 declare_preprocessor_constant("PERFDATA_BIG_ENDIAN", PERFDATA_BIG_ENDIAN) \
duke@0 1384 declare_preprocessor_constant("PERFDATA_LITTLE_ENDIAN", PERFDATA_LITTLE_ENDIAN) \
duke@0 1385 \
duke@0 1386 /***************/ \
duke@0 1387 /* SymbolTable */ \
duke@0 1388 /***************/ \
duke@0 1389 \
duke@0 1390 declare_constant(SymbolTable::symbol_table_size) \
duke@0 1391 \
duke@0 1392 /***************/ \
duke@0 1393 /* StringTable */ \
duke@0 1394 /***************/ \
duke@0 1395 \
duke@0 1396 declare_constant(StringTable::string_table_size) \
duke@0 1397 \
duke@0 1398 /********************/ \
duke@0 1399 /* SystemDictionary */ \
duke@0 1400 /********************/ \
duke@0 1401 \
duke@0 1402 declare_constant(SystemDictionary::_loader_constraint_size) \
duke@0 1403 declare_constant(SystemDictionary::_nof_buckets) \
duke@0 1404 \
duke@0 1405 /***********************************/ \
duke@0 1406 /* LoaderConstraintTable constants */ \
duke@0 1407 /***********************************/ \
duke@0 1408 \
duke@0 1409 declare_constant(LoaderConstraintTable::_loader_constraint_size) \
duke@0 1410 declare_constant(LoaderConstraintTable::_nof_buckets) \
duke@0 1411 \
duke@0 1412 /************************************************************/ \
duke@0 1413 /* HotSpot specific JVM_ACC constants from global anon enum */ \
duke@0 1414 /************************************************************/ \
duke@0 1415 \
duke@0 1416 declare_constant(JVM_ACC_WRITTEN_FLAGS) \
duke@0 1417 declare_constant(JVM_ACC_MONITOR_MATCH) \
duke@0 1418 declare_constant(JVM_ACC_HAS_MONITOR_BYTECODES) \
duke@0 1419 declare_constant(JVM_ACC_HAS_LOOPS) \
duke@0 1420 declare_constant(JVM_ACC_LOOPS_FLAG_INIT) \
duke@0 1421 declare_constant(JVM_ACC_QUEUED) \
duke@0 1422 declare_constant(JVM_ACC_NOT_OSR_COMPILABLE) \
duke@0 1423 declare_constant(JVM_ACC_HAS_LINE_NUMBER_TABLE) \
duke@0 1424 declare_constant(JVM_ACC_HAS_CHECKED_EXCEPTIONS) \
duke@0 1425 declare_constant(JVM_ACC_HAS_JSRS) \
duke@0 1426 declare_constant(JVM_ACC_IS_OLD) \
duke@0 1427 declare_constant(JVM_ACC_IS_OBSOLETE) \
duke@0 1428 declare_constant(JVM_ACC_IS_PREFIXED_NATIVE) \
duke@0 1429 declare_constant(JVM_ACC_HAS_MIRANDA_METHODS) \
duke@0 1430 declare_constant(JVM_ACC_HAS_VANILLA_CONSTRUCTOR) \
duke@0 1431 declare_constant(JVM_ACC_HAS_FINALIZER) \
duke@0 1432 declare_constant(JVM_ACC_IS_CLONEABLE) \
duke@0 1433 declare_constant(JVM_ACC_HAS_LOCAL_VARIABLE_TABLE) \
duke@0 1434 declare_constant(JVM_ACC_PROMOTED_FLAGS) \
duke@0 1435 declare_constant(JVM_ACC_FIELD_ACCESS_WATCHED) \
duke@0 1436 declare_constant(JVM_ACC_FIELD_MODIFICATION_WATCHED) \
duke@0 1437 \
duke@0 1438 /*****************************/ \
duke@0 1439 /* Thread::SuspendFlags enum */ \
duke@0 1440 /*****************************/ \
duke@0 1441 \
duke@0 1442 declare_constant(Thread::_external_suspend) \
duke@0 1443 declare_constant(Thread::_ext_suspended) \
duke@0 1444 declare_constant(Thread::_has_async_exception) \
duke@0 1445 \
duke@0 1446 /*******************/ \
duke@0 1447 /* JavaThreadState */ \
duke@0 1448 /*******************/ \
duke@0 1449 \
duke@0 1450 declare_constant(_thread_uninitialized) \
duke@0 1451 declare_constant(_thread_new) \
duke@0 1452 declare_constant(_thread_new_trans) \
duke@0 1453 declare_constant(_thread_in_native) \
duke@0 1454 declare_constant(_thread_in_native_trans) \
duke@0 1455 declare_constant(_thread_in_vm) \
duke@0 1456 declare_constant(_thread_in_vm_trans) \
duke@0 1457 declare_constant(_thread_in_Java) \
duke@0 1458 declare_constant(_thread_in_Java_trans) \
duke@0 1459 declare_constant(_thread_blocked) \
duke@0 1460 declare_constant(_thread_blocked_trans) \
duke@0 1461 \
duke@0 1462 /******************************/ \
duke@0 1463 /* Klass misc. enum constants */ \
duke@0 1464 /******************************/ \
duke@0 1465 \
duke@0 1466 declare_constant(Klass::_primary_super_limit) \
duke@0 1467 declare_constant(Klass::_lh_instance_slow_path_bit) \
duke@0 1468 declare_constant(Klass::_lh_log2_element_size_shift) \
duke@0 1469 declare_constant(Klass::_lh_element_type_shift) \
duke@0 1470 declare_constant(Klass::_lh_header_size_shift) \
duke@0 1471 declare_constant(Klass::_lh_array_tag_shift) \
duke@0 1472 declare_constant(Klass::_lh_array_tag_type_value) \
duke@0 1473 declare_constant(Klass::_lh_array_tag_obj_value) \
duke@0 1474 \
duke@0 1475 /********************************/ \
duke@0 1476 /* constMethodOopDesc anon-enum */ \
duke@0 1477 /********************************/ \
duke@0 1478 \
duke@0 1479 declare_constant(constMethodOopDesc::_has_linenumber_table) \
duke@0 1480 declare_constant(constMethodOopDesc::_has_checked_exceptions) \
duke@0 1481 declare_constant(constMethodOopDesc::_has_localvariable_table) \
duke@0 1482 \
duke@0 1483 /*************************************/ \
duke@0 1484 /* instanceKlass FieldOffset enum */ \
duke@0 1485 /*************************************/ \
duke@0 1486 \
duke@0 1487 declare_constant(instanceKlass::access_flags_offset) \
duke@0 1488 declare_constant(instanceKlass::name_index_offset) \
duke@0 1489 declare_constant(instanceKlass::signature_index_offset) \
duke@0 1490 declare_constant(instanceKlass::initval_index_offset) \
duke@0 1491 declare_constant(instanceKlass::low_offset) \
duke@0 1492 declare_constant(instanceKlass::high_offset) \
duke@0 1493 declare_constant(instanceKlass::generic_signature_offset) \
duke@0 1494 declare_constant(instanceKlass::next_offset) \
duke@0 1495 declare_constant(instanceKlass::implementors_limit) \
duke@0 1496 \
duke@0 1497 /************************************************/ \
duke@0 1498 /* instanceKlass InnerClassAttributeOffset enum */ \
duke@0 1499 /************************************************/ \
duke@0 1500 \
duke@0 1501 declare_constant(instanceKlass::inner_class_inner_class_info_offset) \
duke@0 1502 declare_constant(instanceKlass::inner_class_outer_class_info_offset) \
duke@0 1503 declare_constant(instanceKlass::inner_class_inner_name_offset) \
duke@0 1504 declare_constant(instanceKlass::inner_class_access_flags_offset) \
duke@0 1505 declare_constant(instanceKlass::inner_class_next_offset) \
duke@0 1506 \
duke@0 1507 /*********************************/ \
duke@0 1508 /* instanceKlass ClassState enum */ \
duke@0 1509 /*********************************/ \
duke@0 1510 \
duke@0 1511 declare_constant(instanceKlass::unparsable_by_gc) \
duke@0 1512 declare_constant(instanceKlass::allocated) \
duke@0 1513 declare_constant(instanceKlass::loaded) \
duke@0 1514 declare_constant(instanceKlass::linked) \
duke@0 1515 declare_constant(instanceKlass::being_initialized) \
duke@0 1516 declare_constant(instanceKlass::fully_initialized) \
duke@0 1517 declare_constant(instanceKlass::initialization_error) \
duke@0 1518 \
duke@0 1519 /*********************************/ \
duke@0 1520 /* symbolOop - symbol max length */ \
duke@0 1521 /*********************************/ \
duke@0 1522 \
duke@0 1523 declare_constant(symbolOopDesc::max_symbol_length) \
duke@0 1524 \
duke@0 1525 /*********************************************/ \
duke@0 1526 /* ConstantPoolCacheEntry FlagBitValues enum */ \
duke@0 1527 /*********************************************/ \
duke@0 1528 \
duke@0 1529 declare_constant(ConstantPoolCacheEntry::hotSwapBit) \
duke@0 1530 declare_constant(ConstantPoolCacheEntry::methodInterface) \
duke@0 1531 declare_constant(ConstantPoolCacheEntry::volatileField) \
duke@0 1532 declare_constant(ConstantPoolCacheEntry::vfinalMethod) \
duke@0 1533 declare_constant(ConstantPoolCacheEntry::finalField) \
duke@0 1534 \
duke@0 1535 /******************************************/ \
duke@0 1536 /* ConstantPoolCacheEntry FlagValues enum */ \
duke@0 1537 /******************************************/ \
duke@0 1538 \
duke@0 1539 declare_constant(ConstantPoolCacheEntry::tosBits) \
duke@0 1540 \
duke@0 1541 /*********************************/ \
duke@0 1542 /* java_lang_Class field offsets */ \
duke@0 1543 /*********************************/ \
duke@0 1544 \
duke@0 1545 declare_constant(java_lang_Class::hc_klass_offset) \
duke@0 1546 declare_constant(java_lang_Class::hc_array_klass_offset) \
duke@0 1547 declare_constant(java_lang_Class::hc_resolved_constructor_offset) \
duke@0 1548 declare_constant(java_lang_Class::hc_number_of_fake_oop_fields) \
duke@0 1549 \
duke@0 1550 /***************************************/ \
duke@0 1551 /* java_lang_Thread::ThreadStatus enum */ \
duke@0 1552 /***************************************/ \
duke@0 1553 \
duke@0 1554 declare_constant(java_lang_Thread::NEW) \
duke@0 1555 declare_constant(java_lang_Thread::RUNNABLE) \
duke@0 1556 declare_constant(java_lang_Thread::SLEEPING) \
duke@0 1557 declare_constant(java_lang_Thread::IN_OBJECT_WAIT) \
duke@0 1558 declare_constant(java_lang_Thread::IN_OBJECT_WAIT_TIMED) \
duke@0 1559 declare_constant(java_lang_Thread::PARKED) \
duke@0 1560 declare_constant(java_lang_Thread::PARKED_TIMED) \
duke@0 1561 declare_constant(java_lang_Thread::BLOCKED_ON_MONITOR_ENTER) \
duke@0 1562 declare_constant(java_lang_Thread::TERMINATED) \
duke@0 1563 \
duke@0 1564 /******************************/ \
duke@0 1565 /* Debug info */ \
duke@0 1566 /******************************/ \
duke@0 1567 \
duke@0 1568 declare_constant(Location::OFFSET_MASK) \
duke@0 1569 declare_constant(Location::OFFSET_SHIFT) \
duke@0 1570 declare_constant(Location::TYPE_MASK) \
duke@0 1571 declare_constant(Location::TYPE_SHIFT) \
duke@0 1572 declare_constant(Location::WHERE_MASK) \
duke@0 1573 declare_constant(Location::WHERE_SHIFT) \
duke@0 1574 \
duke@0 1575 /* constants from Location::Type enum */ \
duke@0 1576 \
duke@0 1577 declare_constant(Location::normal) \
duke@0 1578 declare_constant(Location::oop) \
duke@0 1579 declare_constant(Location::int_in_long) \
duke@0 1580 declare_constant(Location::lng) \
duke@0 1581 declare_constant(Location::float_in_dbl) \
duke@0 1582 declare_constant(Location::dbl) \
duke@0 1583 declare_constant(Location::addr) \
duke@0 1584 declare_constant(Location::invalid) \
duke@0 1585 \
duke@0 1586 /* constants from Location::Where enum */ \
duke@0 1587 \
duke@0 1588 declare_constant(Location::on_stack) \
duke@0 1589 declare_constant(Location::in_register) \
duke@0 1590 \
duke@0 1591 /*********************/ \
duke@0 1592 /* Matcher (C2 only) */ \
duke@0 1593 /*********************/ \
duke@0 1594 \
duke@0 1595 declare_c2_preprocessor_constant("Matcher::interpreter_frame_pointer_reg", Matcher::interpreter_frame_pointer_reg()) \
duke@0 1596 \
duke@0 1597 /*********************************************/ \
duke@0 1598 /* MethodCompilation (globalDefinitions.hpp) */ \
duke@0 1599 /*********************************************/ \
duke@0 1600 \
duke@0 1601 declare_constant(InvocationEntryBci) \
duke@0 1602 declare_constant(InvalidOSREntryBci) \
duke@0 1603 \
duke@0 1604 /***************/ \
duke@0 1605 /* OopMapValue */ \
duke@0 1606 /***************/ \
duke@0 1607 \
duke@0 1608 declare_constant(OopMapValue::type_bits) \
duke@0 1609 declare_constant(OopMapValue::register_bits) \
duke@0 1610 declare_constant(OopMapValue::type_shift) \
duke@0 1611 declare_constant(OopMapValue::register_shift) \
duke@0 1612 declare_constant(OopMapValue::type_mask) \
duke@0 1613 declare_constant(OopMapValue::type_mask_in_place) \
duke@0 1614 declare_constant(OopMapValue::register_mask) \
duke@0 1615 declare_constant(OopMapValue::register_mask_in_place) \
duke@0 1616 declare_constant(OopMapValue::unused_value) \
duke@0 1617 declare_constant(OopMapValue::oop_value) \
duke@0 1618 declare_constant(OopMapValue::value_value) \
coleenp@113 1619 declare_constant(OopMapValue::narrowoop_value) \
duke@0 1620 declare_constant(OopMapValue::callee_saved_value) \
duke@0 1621 declare_constant(OopMapValue::derived_oop_value) \
duke@0 1622 \
duke@0 1623 /******************/ \
duke@0 1624 /* JNIHandleBlock */ \
duke@0 1625 /******************/ \
duke@0 1626 \
duke@0 1627 declare_constant(JNIHandleBlock::block_size_in_oops) \
duke@0 1628 \
duke@0 1629 /**********************/ \
duke@0 1630 /* ObjectSynchronizer */ \
duke@0 1631 /**********************/ \
duke@0 1632 \
duke@0 1633 declare_constant(ObjectSynchronizer::_BLOCKSIZE) \
duke@0 1634 \
duke@0 1635 /********************************/ \
duke@0 1636 /* Calling convention constants */ \
duke@0 1637 /********************************/ \
duke@0 1638 \
duke@0 1639 declare_constant(RegisterImpl::number_of_registers) \
duke@0 1640 declare_constant(ConcreteRegisterImpl::number_of_registers) \
duke@0 1641 declare_preprocessor_constant("REG_COUNT", REG_COUNT) \
duke@0 1642 declare_c2_preprocessor_constant("SAVED_ON_ENTRY_REG_COUNT", SAVED_ON_ENTRY_REG_COUNT) \
duke@0 1643 declare_c2_preprocessor_constant("C_SAVED_ON_ENTRY_REG_COUNT", C_SAVED_ON_ENTRY_REG_COUNT)
duke@0 1644
duke@0 1645 /* NOTE that we do not use the last_entry() macro here; it is used */
duke@0 1646 /* in vmStructs_<os>_<cpu>.hpp's VM_INT_CONSTANTS_OS_CPU macro (and */
duke@0 1647 /* must be present there) */
duke@0 1648
duke@0 1649 //--------------------------------------------------------------------------------
duke@0 1650 // VM_LONG_CONSTANTS
duke@0 1651 //
duke@0 1652 // This table contains long constants required over in the
duke@0 1653 // serviceability agent. The "declare_constant" macro is used for all
duke@0 1654 // enums, etc., while "declare_preprocessor_constant" must be used for
duke@0 1655 // all #defined constants.
duke@0 1656
duke@0 1657 #define VM_LONG_CONSTANTS(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \
duke@0 1658 \
duke@0 1659 /*********************/ \
duke@0 1660 /* MarkOop constants */ \
duke@0 1661 /*********************/ \
duke@0 1662 \
duke@0 1663 /* Note: some of these are declared as long constants just for */ \
duke@0 1664 /* consistency. The mask constants are the only ones requiring */ \
duke@0 1665 /* 64 bits (on 64-bit platforms). */ \
duke@0 1666 \
duke@0 1667 declare_constant(markOopDesc::age_bits) \
duke@0 1668 declare_constant(markOopDesc::lock_bits) \
duke@0 1669 declare_constant(markOopDesc::biased_lock_bits) \
duke@0 1670 declare_constant(markOopDesc::max_hash_bits) \
duke@0 1671 declare_constant(markOopDesc::hash_bits) \
duke@0 1672 \
duke@0 1673 declare_constant(markOopDesc::lock_shift) \
duke@0 1674 declare_constant(markOopDesc::biased_lock_shift) \
duke@0 1675 declare_constant(markOopDesc::age_shift) \
duke@0 1676 declare_constant(markOopDesc::hash_shift) \
duke@0 1677 \
duke@0 1678 declare_constant(markOopDesc::lock_mask) \
duke@0 1679 declare_constant(markOopDesc::lock_mask_in_place) \
duke@0 1680 declare_constant(markOopDesc::biased_lock_mask) \
duke@0 1681 declare_constant(markOopDesc::biased_lock_mask_in_place) \
duke@0 1682 declare_constant(markOopDesc::biased_lock_bit_in_place) \
duke@0 1683 declare_constant(markOopDesc::age_mask) \
duke@0 1684 declare_constant(markOopDesc::age_mask_in_place) \
duke@0 1685 declare_constant(markOopDesc::hash_mask) \
duke@0 1686 declare_constant(markOopDesc::hash_mask_in_place) \
duke@0 1687 declare_constant(markOopDesc::biased_lock_alignment) \
duke@0 1688 \
duke@0 1689 declare_constant(markOopDesc::locked_value) \
duke@0 1690 declare_constant(markOopDesc::unlocked_value) \
duke@0 1691 declare_constant(markOopDesc::monitor_value) \
duke@0 1692 declare_constant(markOopDesc::marked_value) \
duke@0 1693 declare_constant(markOopDesc::biased_lock_pattern) \
duke@0 1694 \
duke@0 1695 declare_constant(markOopDesc::no_hash) \
duke@0 1696 declare_constant(markOopDesc::no_hash_in_place) \
duke@0 1697 declare_constant(markOopDesc::no_lock_in_place) \
coleenp@187 1698 declare_constant(markOopDesc::max_age) \
coleenp@187 1699 \
coleenp@187 1700 /* Constants in markOop used by CMS. */ \
coleenp@187 1701 declare_constant(markOopDesc::cms_shift) \
coleenp@187 1702 declare_constant(markOopDesc::cms_mask) \
coleenp@187 1703 declare_constant(markOopDesc::size_shift) \
duke@0 1704
duke@0 1705 /* NOTE that we do not use the last_entry() macro here; it is used */
duke@0 1706 /* in vmStructs_<os>_<cpu>.hpp's VM_LONG_CONSTANTS_OS_CPU macro (and */
duke@0 1707 /* must be present there) */
duke@0 1708
duke@0 1709
duke@0 1710 //--------------------------------------------------------------------------------
duke@0 1711 // Macros operating on the above lists
duke@0 1712 //--------------------------------------------------------------------------------
duke@0 1713
duke@0 1714 // This utility macro quotes the passed string
duke@0 1715 #define QUOTE(x) #x
duke@0 1716
duke@0 1717 //--------------------------------------------------------------------------------
duke@0 1718 // VMStructEntry macros
duke@0 1719 //
duke@0 1720
duke@0 1721 // This macro generates a VMStructEntry line for a nonstatic field
duke@0 1722 #define GENERATE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \
duke@0 1723 { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 0, cast_uint64_t(offset_of(typeName, fieldName)), NULL },
duke@0 1724
duke@0 1725 // This macro generates a VMStructEntry line for a static field
duke@0 1726 #define GENERATE_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \
duke@0 1727 { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 1, 0, &typeName::fieldName },
duke@0 1728
duke@0 1729 // This macro generates a VMStructEntry line for an unchecked
duke@0 1730 // nonstatic field, in which the size of the type is also specified.
duke@0 1731 // The type string is given as NULL, indicating an "opaque" type.
duke@0 1732 #define GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, size) \
duke@0 1733 { QUOTE(typeName), QUOTE(fieldName), NULL, 0, cast_uint64_t(offset_of(typeName, fieldName)), NULL },
duke@0 1734
duke@0 1735 // This macro generates a VMStructEntry line for an unchecked
duke@0 1736 // static field, in which the size of the type is also specified.
duke@0 1737 // The type string is given as NULL, indicating an "opaque" type.
duke@0 1738 #define GENERATE_UNCHECKED_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, size) \
duke@0 1739 { QUOTE(typeName), QUOTE(fieldName), NULL, 1, 0, (void*) &typeName::fieldName },
duke@0 1740
duke@0 1741 // This macro generates the sentinel value indicating the end of the list
duke@0 1742 #define GENERATE_VM_STRUCT_LAST_ENTRY() \
duke@0 1743 { NULL, NULL, NULL, 0, 0, NULL }
duke@0 1744
duke@0 1745 // This macro checks the type of a VMStructEntry by comparing pointer types
duke@0 1746 #define CHECK_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \
duke@0 1747 {typeName *dummyObj = NULL; type* dummy = &dummyObj->fieldName; }
duke@0 1748
duke@0 1749 // This macro checks the type of a volatile VMStructEntry by comparing pointer types
duke@0 1750 #define CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \
duke@0 1751 {typedef type dummyvtype; typeName *dummyObj = NULL; volatile dummyvtype* dummy = &dummyObj->fieldName; }
duke@0 1752
duke@0 1753 // This macro checks the type of a VMStructEntry by comparing pointer types
duke@0 1754 #define CHECK_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \
duke@0 1755 {type* dummy = &typeName::fieldName; }
duke@0 1756
duke@0 1757 // This macro ensures the type of a field and its containing type are
duke@0 1758 // present in the type table. The assertion string is shorter than
duke@0 1759 // preferable because (incredibly) of a bug in Solstice NFS client
duke@0 1760 // which seems to prevent very long lines from compiling. This assertion
duke@0 1761 // means that an entry in VMStructs::localHotSpotVMStructs[] was not
duke@0 1762 // found in VMStructs::localHotSpotVMTypes[].
duke@0 1763 #define ENSURE_FIELD_TYPE_PRESENT(typeName, fieldName, type) \
duke@0 1764 { assert(findType(QUOTE(typeName)) != 0, "type \"" QUOTE(typeName) "\" not found in type table"); \
duke@0 1765 assert(findType(QUOTE(type)) != 0, "type \"" QUOTE(type) "\" not found in type table"); }
duke@0 1766
duke@0 1767 // This is a no-op macro for unchecked fields
duke@0 1768 #define CHECK_NO_OP(a, b, c)
duke@0 1769
duke@0 1770 // This is a no-op macro for the sentinel value
duke@0 1771 #define CHECK_SENTINEL()
duke@0 1772
duke@0 1773 //
duke@0 1774 // Build-specific macros:
duke@0 1775 //
duke@0 1776
duke@0 1777 // Generate and check a nonstatic field in non-product builds
duke@0 1778 #ifndef PRODUCT
duke@0 1779 # define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1780 # define CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1781 # define ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT(a, b, c) ENSURE_FIELD_TYPE_PRESENT(a, b, c)
duke@0 1782 # define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1783 # define CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1784 # define ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT(a, b, c) ENSURE_FIELD_TYPE_PRESENT(a, b, c)
duke@0 1785 #else
duke@0 1786 # define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1787 # define CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1788 # define ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT(a, b, c)
duke@0 1789 # define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1790 # define CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1791 # define ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT(a, b, c)
duke@0 1792 #endif /* PRODUCT */
duke@0 1793
duke@0 1794 // Generate and check a nonstatic field in C1 builds
duke@0 1795 #ifdef COMPILER1
duke@0 1796 # define GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1797 # define CHECK_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1798 # define ENSURE_C1_FIELD_TYPE_PRESENT(a, b, c) ENSURE_FIELD_TYPE_PRESENT(a, b, c)
duke@0 1799 #else
duke@0 1800 # define GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1801 # define CHECK_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1802 # define ENSURE_C1_FIELD_TYPE_PRESENT(a, b, c)
duke@0 1803 #endif /* COMPILER1 */
duke@0 1804 // Generate and check a nonstatic field in C2 builds
duke@0 1805 #ifdef COMPILER2
duke@0 1806 # define GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1807 # define CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1808 # define ENSURE_C2_FIELD_TYPE_PRESENT(a, b, c) ENSURE_FIELD_TYPE_PRESENT(a, b, c)
duke@0 1809 #else
duke@0 1810 # define GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1811 # define CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1812 # define ENSURE_C2_FIELD_TYPE_PRESENT(a, b, c)
duke@0 1813 #endif /* COMPILER2 */
duke@0 1814
duke@0 1815 // Generate but do not check a static field in C1 builds
duke@0 1816 #ifdef COMPILER1
duke@0 1817 # define GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1818 #else
duke@0 1819 # define GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1820 #endif /* COMPILER1 */
duke@0 1821
duke@0 1822 // Generate but do not check a static field in C2 builds
duke@0 1823 #ifdef COMPILER2
duke@0 1824 # define GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1825 #else
duke@0 1826 # define GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c)
duke@0 1827 #endif /* COMPILER2 */
duke@0 1828
duke@0 1829 //--------------------------------------------------------------------------------
duke@0 1830 // VMTypeEntry macros
duke@0 1831 //
duke@0 1832
duke@0 1833 #define GENERATE_VM_TYPE_ENTRY(type, superclass) \
duke@0 1834 { QUOTE(type), QUOTE(superclass), 0, 0, 0, sizeof(type) },
duke@0 1835
duke@0 1836 #define GENERATE_TOPLEVEL_VM_TYPE_ENTRY(type) \
duke@0 1837 { QUOTE(type), NULL, 0, 0, 0, sizeof(type) },
duke@0 1838
duke@0 1839 #define GENERATE_OOP_VM_TYPE_ENTRY(type) \
duke@0 1840 { QUOTE(type), NULL, 1, 0, 0, sizeof(type) },
duke@0 1841
duke@0 1842 #define GENERATE_INTEGER_VM_TYPE_ENTRY(type) \
duke@0 1843 { QUOTE(type), NULL, 0, 1, 0, sizeof(type) },
duke@0 1844
duke@0 1845 #define GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY(type) \
duke@0 1846 { QUOTE(type), NULL, 0, 1, 1, sizeof(type) },
duke@0 1847
duke@0 1848 #define GENERATE_VM_TYPE_LAST_ENTRY() \
duke@0 1849 { NULL, NULL, 0, 0, 0, 0 }
duke@0 1850
duke@0 1851 #define CHECK_VM_TYPE_ENTRY(type, superclass) \
duke@0 1852 { type* dummyObj = NULL; superclass* dummySuperObj = dummyObj; }
duke@0 1853
duke@0 1854 #define CHECK_VM_TYPE_NO_OP(a)
duke@0 1855 #define CHECK_SINGLE_ARG_VM_TYPE_NO_OP(a)
duke@0 1856
duke@0 1857 //
duke@0 1858 // Build-specific macros:
duke@0 1859 //
duke@0 1860
duke@0 1861 #ifdef COMPILER1
duke@0 1862 # define GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY(a) GENERATE_TOPLEVEL_VM_TYPE_ENTRY(a)
duke@0 1863 # define CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY(a)
duke@0 1864 #else
duke@0 1865 # define GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY(a)
duke@0 1866 # define CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY(a)
duke@0 1867 #endif /* COMPILER1 */
duke@0 1868
duke@0 1869 #ifdef COMPILER2
duke@0 1870 # define GENERATE_C2_VM_TYPE_ENTRY(a, b) GENERATE_VM_TYPE_ENTRY(a, b)
duke@0 1871 # define CHECK_C2_VM_TYPE_ENTRY(a, b) CHECK_VM_TYPE_ENTRY(a, b)
duke@0 1872 # define GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY(a) GENERATE_TOPLEVEL_VM_TYPE_ENTRY(a)
duke@0 1873 # define CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY(a)
duke@0 1874 #else
duke@0 1875 # define GENERATE_C2_VM_TYPE_ENTRY(a, b)
duke@0 1876 # define CHECK_C2_VM_TYPE_ENTRY(a, b)
duke@0 1877 # define GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY(a)
duke@0 1878 # define CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY(a)
duke@0 1879 #endif /* COMPILER2 */
duke@0 1880
duke@0 1881
duke@0 1882 //--------------------------------------------------------------------------------
duke@0 1883 // VMIntConstantEntry macros
duke@0 1884 //
duke@0 1885
duke@0 1886 #define GENERATE_VM_INT_CONSTANT_ENTRY(name) \
duke@0 1887 { QUOTE(name), (int32_t) name },
duke@0 1888
duke@0 1889 #define GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value) \
duke@0 1890 { name, (int32_t) value },
duke@0 1891
duke@0 1892 // This macro generates the sentinel value indicating the end of the list
duke@0 1893 #define GENERATE_VM_INT_CONSTANT_LAST_ENTRY() \
duke@0 1894 { NULL, 0 }
duke@0 1895
duke@0 1896
duke@0 1897 // Generate an int constant for a C1 build
duke@0 1898 #ifdef COMPILER1
duke@0 1899 # define GENERATE_C1_VM_INT_CONSTANT_ENTRY(name) GENERATE_VM_INT_CONSTANT_ENTRY(name)
duke@0 1900 #else
duke@0 1901 # define GENERATE_C1_VM_INT_CONSTANT_ENTRY(name)
duke@0 1902 #endif /* COMPILER1 */
duke@0 1903
duke@0 1904 // Generate an int constant for a C2 build
duke@0 1905 #ifdef COMPILER2
duke@0 1906 # define GENERATE_C2_VM_INT_CONSTANT_ENTRY(name) GENERATE_VM_INT_CONSTANT_ENTRY(name)
duke@0 1907 # define GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value) GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value)
duke@0 1908 #else
duke@0 1909 # define GENERATE_C2_VM_INT_CONSTANT_ENTRY(name)
duke@0 1910 # define GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value)
duke@0 1911 #endif /* COMPILER1 */
duke@0 1912
duke@0 1913 //--------------------------------------------------------------------------------
duke@0 1914 // VMLongConstantEntry macros
duke@0 1915 //
duke@0 1916
duke@0 1917 #define GENERATE_VM_LONG_CONSTANT_ENTRY(name) \
duke@0 1918 { QUOTE(name), cast_uint64_t(name) },
duke@0 1919
duke@0 1920 #define GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) \
duke@0 1921 { name, cast_uint64_t(value) },
duke@0 1922
duke@0 1923 // This macro generates the sentinel value indicating the end of the list
duke@0 1924 #define GENERATE_VM_LONG_CONSTANT_LAST_ENTRY() \
duke@0 1925 { NULL, 0 }
duke@0 1926
duke@0 1927 // Generate a long constant for a C1 build
duke@0 1928 #ifdef COMPILER1
duke@0 1929 # define GENERATE_C1_VM_LONG_CONSTANT_ENTRY(name) GENERATE_VM_LONG_CONSTANT_ENTRY(name)
duke@0 1930 #else
duke@0 1931 # define GENERATE_C1_VM_LONG_CONSTANT_ENTRY(name)
duke@0 1932 #endif /* COMPILER1 */
duke@0 1933
duke@0 1934 // Generate a long constant for a C2 build
duke@0 1935 #ifdef COMPILER2
duke@0 1936 # define GENERATE_C2_VM_LONG_CONSTANT_ENTRY(name) GENERATE_VM_LONG_CONSTANT_ENTRY(name)
duke@0 1937 # define GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value)
duke@0 1938 #else
duke@0 1939 # define GENERATE_C2_VM_LONG_CONSTANT_ENTRY(name)
duke@0 1940 # define GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value)
duke@0 1941 #endif /* COMPILER1 */
duke@0 1942
duke@0 1943 //
duke@0 1944 // Instantiation of VMStructEntries, VMTypeEntries and VMIntConstantEntries
duke@0 1945 //
duke@0 1946
duke@0 1947 // These initializers are allowed to access private fields in classes
duke@0 1948 // as long as class VMStructs is a friend
duke@0 1949 VMStructEntry VMStructs::localHotSpotVMStructs[] = {
duke@0 1950
duke@0 1951 VM_STRUCTS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1952 GENERATE_STATIC_VM_STRUCT_ENTRY, \
duke@0 1953 GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1954 GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1955 GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1956 GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1957 GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1958 GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY, \
duke@0 1959 GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY, \
duke@0 1960 GENERATE_VM_STRUCT_LAST_ENTRY)
duke@0 1961
duke@0 1962 #ifndef SERIALGC
duke@0 1963 VM_STRUCTS_PARALLELGC(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1964 GENERATE_STATIC_VM_STRUCT_ENTRY)
duke@0 1965
duke@0 1966 VM_STRUCTS_CMS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \
coleenp@187 1967 GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1968 GENERATE_STATIC_VM_STRUCT_ENTRY)
duke@0 1969 #endif // SERIALGC
duke@0 1970
duke@0 1971 VM_STRUCTS_CPU(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1972 GENERATE_STATIC_VM_STRUCT_ENTRY, \
duke@0 1973 GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1974 GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1975 GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1976 GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1977 GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY, \
duke@0 1978 GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY, \
duke@0 1979 GENERATE_VM_STRUCT_LAST_ENTRY)
duke@0 1980
duke@0 1981 VM_STRUCTS_OS_CPU(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1982 GENERATE_STATIC_VM_STRUCT_ENTRY, \
duke@0 1983 GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1984 GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1985 GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1986 GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY, \
duke@0 1987 GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY, \
duke@0 1988 GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY, \
duke@0 1989 GENERATE_VM_STRUCT_LAST_ENTRY)
duke@0 1990 };
duke@0 1991
duke@0 1992 VMTypeEntry VMStructs::localHotSpotVMTypes[] = {
duke@0 1993
duke@0 1994 VM_TYPES(GENERATE_VM_TYPE_ENTRY,
duke@0 1995 GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
duke@0 1996 GENERATE_OOP_VM_TYPE_ENTRY,
duke@0 1997 GENERATE_INTEGER_VM_TYPE_ENTRY,
duke@0 1998 GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
duke@0 1999 GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
duke@0 2000 GENERATE_C2_VM_TYPE_ENTRY,
duke@0 2001 GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY,
duke@0 2002 GENERATE_VM_TYPE_LAST_ENTRY)
duke@0 2003
duke@0 2004 #ifndef SERIALGC
duke@0 2005 VM_TYPES_PARALLELGC(GENERATE_VM_TYPE_ENTRY,
duke@0 2006 GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
duke@0 2007
duke@0 2008 VM_TYPES_CMS(GENERATE_VM_TYPE_ENTRY,
duke@0 2009 GENERATE_TOPLEVEL_VM_TYPE_ENTRY)
duke@0 2010
duke@0 2011 VM_TYPES_PARNEW(GENERATE_VM_TYPE_ENTRY)
duke@0 2012 #endif // SERIALGC
duke@0 2013
duke@0 2014 VM_TYPES_CPU(GENERATE_VM_TYPE_ENTRY,
duke@0 2015 GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
duke@0 2016 GENERATE_OOP_VM_TYPE_ENTRY,
duke@0 2017 GENERATE_INTEGER_VM_TYPE_ENTRY,
duke@0 2018 GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
duke@0 2019 GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
duke@0 2020 GENERATE_C2_VM_TYPE_ENTRY,
duke@0 2021 GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY,
duke@0 2022 GENERATE_VM_TYPE_LAST_ENTRY)
duke@0 2023
duke@0 2024 VM_TYPES_OS_CPU(GENERATE_VM_TYPE_ENTRY,
duke@0 2025 GENERATE_TOPLEVEL_VM_TYPE_ENTRY,
duke@0 2026 GENERATE_OOP_VM_TYPE_ENTRY,
duke@0 2027 GENERATE_INTEGER_VM_TYPE_ENTRY,
duke@0 2028 GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY,
duke@0 2029 GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY,
duke@0 2030 GENERATE_C2_VM_TYPE_ENTRY,
duke@0 2031 GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY,
duke@0 2032 GENERATE_VM_TYPE_LAST_ENTRY)
duke@0 2033 };
duke@0 2034
duke@0 2035 VMIntConstantEntry VMStructs::localHotSpotVMIntConstants[] = {
duke@0 2036
duke@0 2037 VM_INT_CONSTANTS(GENERATE_VM_INT_CONSTANT_ENTRY,
duke@0 2038 GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
duke@0 2039 GENERATE_C1_VM_INT_CONSTANT_ENTRY,
duke@0 2040 GENERATE_C2_VM_INT_CONSTANT_ENTRY,
duke@0 2041 GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
duke@0 2042 GENERATE_VM_INT_CONSTANT_LAST_ENTRY)
duke@0 2043
duke@0 2044 #ifndef SERIALGC
duke@0 2045 VM_INT_CONSTANTS_CMS(GENERATE_VM_INT_CONSTANT_ENTRY)
duke@0 2046
duke@0 2047 VM_INT_CONSTANTS_PARNEW(GENERATE_VM_INT_CONSTANT_ENTRY)
duke@0 2048 #endif // SERIALGC
duke@0 2049
duke@0 2050 VM_INT_CONSTANTS_CPU(GENERATE_VM_INT_CONSTANT_ENTRY,
duke@0 2051 GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
duke@0 2052 GENERATE_C1_VM_INT_CONSTANT_ENTRY,
duke@0 2053 GENERATE_C2_VM_INT_CONSTANT_ENTRY,
duke@0 2054 GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
duke@0 2055 GENERATE_VM_INT_CONSTANT_LAST_ENTRY)
duke@0 2056
duke@0 2057 VM_INT_CONSTANTS_OS_CPU(GENERATE_VM_INT_CONSTANT_ENTRY,
duke@0 2058 GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
duke@0 2059 GENERATE_C1_VM_INT_CONSTANT_ENTRY,
duke@0 2060 GENERATE_C2_VM_INT_CONSTANT_ENTRY,
duke@0 2061 GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,
duke@0 2062 GENERATE_VM_INT_CONSTANT_LAST_ENTRY)
duke@0 2063 };
duke@0 2064
duke@0 2065 VMLongConstantEntry VMStructs::localHotSpotVMLongConstants[] = {
duke@0 2066
duke@0 2067 VM_LONG_CONSTANTS(GENERATE_VM_LONG_CONSTANT_ENTRY,
duke@0 2068 GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
duke@0 2069 GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
duke@0 2070 GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
duke@0 2071 GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
duke@0 2072 GENERATE_VM_LONG_CONSTANT_LAST_ENTRY)
duke@0 2073
duke@0 2074 VM_LONG_CONSTANTS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY,
duke@0 2075 GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
duke@0 2076 GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
duke@0 2077 GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
duke@0 2078 GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
duke@0 2079 GENERATE_VM_LONG_CONSTANT_LAST_ENTRY)
duke@0 2080
duke@0 2081 VM_LONG_CONSTANTS_OS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY,
duke@0 2082 GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
duke@0 2083 GENERATE_C1_VM_LONG_CONSTANT_ENTRY,
duke@0 2084 GENERATE_C2_VM_LONG_CONSTANT_ENTRY,
duke@0 2085 GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,
duke@0 2086 GENERATE_VM_LONG_CONSTANT_LAST_ENTRY)
duke@0 2087 };
duke@0 2088
duke@0 2089 // This is used both to check the types of referenced fields and, in
duke@0 2090 // debug builds, to ensure that all of the field types are present.
duke@0 2091 void
duke@0 2092 VMStructs::init() {
duke@0 2093 VM_STRUCTS(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
duke@0 2094 CHECK_STATIC_VM_STRUCT_ENTRY,
duke@0 2095 CHECK_NO_OP,
duke@0 2096 CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY,
duke@0 2097 CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
duke@0 2098 CHECK_C1_NONSTATIC_VM_STRUCT_ENTRY,
duke@0 2099 CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY,
duke@0 2100 CHECK_NO_OP,
duke@0 2101 CHECK_NO_OP,
duke@0 2102 CHECK_SENTINEL);
duke@0 2103
duke@0 2104 #ifndef SERIALGC
duke@0 2105 VM_STRUCTS_PARALLELGC(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
duke@0 2106 CHECK_STATIC_VM_STRUCT_ENTRY);
duke@0 2107
duke@0 2108 VM_STRUCTS_CMS(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
coleenp@187 2109 CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY,
duke@0 2110 CHECK_STATIC_VM_STRUCT_ENTRY);
duke@0 2111 #endif // SERIALGC
duke@0 2112
duke@0 2113 VM_STRUCTS_CPU(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
duke@0 2114 CHECK_STATIC_VM_STRUCT_ENTRY,
duke@0 2115 CHECK_NO_OP,
duke@0 2116 CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY,
duke@0 2117 CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
duke@0 2118 CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY,
duke@0 2119 CHECK_NO_OP,
duke@0 2120 CHECK_NO_OP,
duke@0 2121 CHECK_SENTINEL);
duke@0 2122
duke@0 2123 VM_STRUCTS_OS_CPU(CHECK_NONSTATIC_VM_STRUCT_ENTRY,
duke@0 2124 CHECK_STATIC_VM_STRUCT_ENTRY,
duke@0 2125 CHECK_NO_OP,
duke@0 2126 CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY,
duke@0 2127 CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,
duke@0 2128 CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY,
duke@0 2129 CHECK_NO_OP,
duke@0 2130 CHECK_NO_OP,
duke@0 2131 CHECK_SENTINEL);
duke@0 2132
duke@0 2133 VM_TYPES(CHECK_VM_TYPE_ENTRY,
duke@0 2134 CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
duke@0 2135 CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
duke@0 2136 CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
duke@0 2137 CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
duke@0 2138 CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY,
duke@0 2139 CHECK_C2_VM_TYPE_ENTRY,
duke@0 2140 CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY,
duke@0 2141 CHECK_SENTINEL);
duke@0 2142
duke@0 2143 #ifndef SERIALGC
duke@0 2144 VM_TYPES_PARALLELGC(CHECK_VM_TYPE_ENTRY,
duke@0 2145 CHECK_SINGLE_ARG_VM_TYPE_NO_OP);
duke@0 2146
duke@0 2147 VM_TYPES_CMS(CHECK_VM_TYPE_ENTRY,
duke@0 2148 CHECK_SINGLE_ARG_VM_TYPE_NO_OP);
duke@0 2149
duke@0 2150 VM_TYPES_PARNEW(CHECK_VM_TYPE_ENTRY)
duke@0 2151 #endif // SERIALGC
duke@0 2152
duke@0 2153 VM_TYPES_CPU(CHECK_VM_TYPE_ENTRY,
duke@0 2154 CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
duke@0 2155 CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
duke@0 2156 CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
duke@0 2157 CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
duke@0 2158 CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY,
duke@0 2159 CHECK_C2_VM_TYPE_ENTRY,
duke@0 2160 CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY,
duke@0 2161 CHECK_SENTINEL);
duke@0 2162
duke@0 2163 VM_TYPES_OS_CPU(CHECK_VM_TYPE_ENTRY,
duke@0 2164 CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
duke@0 2165 CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
duke@0 2166 CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
duke@0 2167 CHECK_SINGLE_ARG_VM_TYPE_NO_OP,
duke@0 2168 CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY,
duke@0 2169 CHECK_C2_VM_TYPE_ENTRY,
duke@0 2170 CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY,
duke@0 2171 CHECK_SENTINEL);
duke@0 2172
duke@0 2173 //
duke@0 2174 // Split VM_STRUCTS() invocation into two parts to allow MS VC++ 6.0
duke@0 2175 // to build with the source mounted over SNC3.2. Symptom was that
duke@0 2176 // debug build failed with an internal compiler error. Has been seen
duke@0 2177 // mounting sources from Solaris 2.6 and 2.7 hosts, but so far not
duke@0 2178 // 2.8 hosts. Appears to occur because line is too long.
duke@0 2179 //
duke@0 2180 // If an assertion failure is triggered here it means that an entry
duke@0 2181 // in VMStructs::localHotSpotVMStructs[] was not found in
duke@0 2182 // VMStructs::localHotSpotVMTypes[]. (The assertion itself had to be
duke@0 2183 // made less descriptive because of this above bug -- see the
duke@0 2184 // definition of ENSURE_FIELD_TYPE_PRESENT.)
duke@0 2185 //
duke@0 2186 // NOTE: taken out because this was just not working on everyone's
duke@0 2187 // Solstice NFS setup. If everyone switches to local workspaces on
duke@0 2188 // Win32, we can put this back in.
duke@0 2189 #ifndef _WINDOWS
duke@0 2190 debug_only(VM_STRUCTS(ENSURE_FIELD_TYPE_PRESENT, \
duke@0 2191 CHECK_NO_OP, \
duke@0 2192 CHECK_NO_OP, \
duke@0 2193 CHECK_NO_OP, \
duke@0 2194 CHECK_NO_OP, \
duke@0 2195 CHECK_NO_OP, \
duke@0 2196 CHECK_NO_OP, \
duke@0 2197 CHECK_NO_OP, \
duke@0 2198 CHECK_NO_OP, \
duke@0 2199 CHECK_SENTINEL));
duke@0 2200 debug_only(VM_STRUCTS(CHECK_NO_OP, \
duke@0 2201 ENSURE_FIELD_TYPE_PRESENT, \
duke@0 2202 CHECK_NO_OP, \
duke@0 2203 ENSURE_FIELD_TYPE_PRESENT, \
duke@0 2204 ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT, \
duke@0 2205 ENSURE_C1_FIELD_TYPE_PRESENT, \
duke@0 2206 ENSURE_C2_FIELD_TYPE_PRESENT, \
duke@0 2207 CHECK_NO_OP, \
duke@0 2208 CHECK_NO_OP, \
duke@0 2209 CHECK_SENTINEL));
duke@0 2210 #ifndef SERIALGC
duke@0 2211 debug_only(VM_STRUCTS_PARALLELGC(ENSURE_FIELD_TYPE_PRESENT, \
duke@0 2212 ENSURE_FIELD_TYPE_PRESENT));
duke@0 2213 debug_only(VM_STRUCTS_CMS(ENSURE_FIELD_TYPE_PRESENT, \
coleenp@187 2214 ENSURE_FIELD_TYPE_PRESENT, \
duke@0 2215 ENSURE_FIELD_TYPE_PRESENT));
duke@0 2216 #endif // SERIALGC
duke@0 2217 debug_only(VM_STRUCTS_CPU(ENSURE_FIELD_TYPE_PRESENT, \
duke@0 2218 ENSURE_FIELD_TYPE_PRESENT, \
duke@0 2219 CHECK_NO_OP, \
duke@0 2220 ENSURE_FIELD_TYPE_PRESENT, \
duke@0 2221 ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT, \
duke@0 2222 ENSURE_C2_FIELD_TYPE_PRESENT, \
duke@0 2223 CHECK_NO_OP, \
duke@0 2224 CHECK_NO_OP, \
duke@0 2225 CHECK_SENTINEL));
duke@0 2226 debug_only(VM_STRUCTS_OS_CPU(ENSURE_FIELD_TYPE_PRESENT, \
duke@0 2227 ENSURE_FIELD_TYPE_PRESENT, \
duke@0 2228 CHECK_NO_OP, \
duke@0 2229 ENSURE_FIELD_TYPE_PRESENT, \
duke@0 2230 ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT, \
duke@0 2231 ENSURE_C2_FIELD_TYPE_PRESENT, \
duke@0 2232 CHECK_NO_OP, \
duke@0 2233 CHECK_NO_OP, \
duke@0 2234 CHECK_SENTINEL));
duke@0 2235 #endif
duke@0 2236 }
duke@0 2237
duke@0 2238 extern "C" {
duke@0 2239
duke@0 2240 // see comments on cast_uint64_t at the top of this file
duke@0 2241 #define ASSIGN_CONST_TO_64BIT_VAR(var, expr) \
duke@0 2242 JNIEXPORT uint64_t var = cast_uint64_t(expr);
duke@0 2243 #define ASSIGN_OFFSET_TO_64BIT_VAR(var, type, field) \
duke@0 2244 ASSIGN_CONST_TO_64BIT_VAR(var, offset_of(type, field))
duke@0 2245 #define ASSIGN_STRIDE_TO_64BIT_VAR(var, array) \
duke@0 2246 ASSIGN_CONST_TO_64BIT_VAR(var, (char*)&array[1] - (char*)&array[0])
duke@0 2247
duke@0 2248 JNIEXPORT VMStructEntry* gHotSpotVMStructs = VMStructs::localHotSpotVMStructs;
duke@0 2249 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryTypeNameOffset, VMStructEntry, typeName);
duke@0 2250 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryFieldNameOffset, VMStructEntry, fieldName);
duke@0 2251 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryTypeStringOffset, VMStructEntry, typeString);
duke@0 2252 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryIsStaticOffset, VMStructEntry, isStatic);
duke@0 2253 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryOffsetOffset, VMStructEntry, offset);
duke@0 2254 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryAddressOffset, VMStructEntry, address);
duke@0 2255 ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMStructEntryArrayStride, gHotSpotVMStructs);
duke@0 2256 JNIEXPORT VMTypeEntry* gHotSpotVMTypes = VMStructs::localHotSpotVMTypes;
duke@0 2257 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryTypeNameOffset, VMTypeEntry, typeName);
duke@0 2258 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntrySuperclassNameOffset, VMTypeEntry, superclassName);
duke@0 2259 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsOopTypeOffset, VMTypeEntry, isOopType);
duke@0 2260 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsIntegerTypeOffset, VMTypeEntry, isIntegerType);
duke@0 2261 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsUnsignedOffset, VMTypeEntry, isUnsigned);
duke@0 2262 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntrySizeOffset, VMTypeEntry, size);
duke@0 2263 ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMTypeEntryArrayStride,gHotSpotVMTypes);
duke@0 2264 JNIEXPORT VMIntConstantEntry* gHotSpotVMIntConstants = VMStructs::localHotSpotVMIntConstants;
duke@0 2265 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMIntConstantEntryNameOffset, VMIntConstantEntry, name);
duke@0 2266 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMIntConstantEntryValueOffset, VMIntConstantEntry, value);
duke@0 2267 ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMIntConstantEntryArrayStride, gHotSpotVMIntConstants);
duke@0 2268 JNIEXPORT VMLongConstantEntry* gHotSpotVMLongConstants = VMStructs::localHotSpotVMLongConstants;
duke@0 2269 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMLongConstantEntryNameOffset, VMLongConstantEntry, name);
duke@0 2270 ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMLongConstantEntryValueOffset, VMLongConstantEntry, value);
duke@0 2271 ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMLongConstantEntryArrayStride, gHotSpotVMLongConstants);
duke@0 2272 }
duke@0 2273
duke@0 2274 #ifdef ASSERT
duke@0 2275 int
duke@0 2276 VMStructs::findType(const char* typeName) {
duke@0 2277 VMTypeEntry* types = gHotSpotVMTypes;
duke@0 2278
duke@0 2279 while (types->typeName != NULL) {
duke@0 2280 if (!strcmp(typeName, types->typeName)) {
duke@0 2281 return 1;
duke@0 2282 }
duke@0 2283 ++types;
duke@0 2284 }
duke@0 2285 return 0;
duke@0 2286 }
duke@0 2287 #endif
duke@0 2288
duke@0 2289 void vmStructs_init() {
duke@0 2290 debug_only(VMStructs::init());
duke@0 2291 }