duke@435: /* kvn@2439: * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. duke@435: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. duke@435: * duke@435: * This code is free software; you can redistribute it and/or modify it duke@435: * under the terms of the GNU General Public License version 2 only, as duke@435: * published by the Free Software Foundation. duke@435: * duke@435: * This code is distributed in the hope that it will be useful, but WITHOUT duke@435: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or duke@435: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License duke@435: * version 2 for more details (a copy is included in the LICENSE file that duke@435: * accompanied this code). duke@435: * duke@435: * You should have received a copy of the GNU General Public License version duke@435: * 2 along with this work; if not, write to the Free Software Foundation, duke@435: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. duke@435: * trims@1907: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA trims@1907: * or visit www.oracle.com if you need additional information or have any trims@1907: * questions. duke@435: * duke@435: */ duke@435: stefank@2314: #include "precompiled.hpp" stefank@2314: #include "classfile/dictionary.hpp" stefank@2314: #include "classfile/javaClasses.hpp" stefank@2314: #include "classfile/loaderConstraints.hpp" stefank@2314: #include "classfile/placeholders.hpp" stefank@2314: #include "classfile/symbolTable.hpp" stefank@2314: #include "classfile/systemDictionary.hpp" stefank@2314: #include "code/codeBlob.hpp" stefank@2314: #include "code/codeCache.hpp" stefank@2314: #include "code/compressedStream.hpp" stefank@2314: #include "code/location.hpp" stefank@2314: #include "code/nmethod.hpp" stefank@2314: #include "code/pcDesc.hpp" stefank@2314: #include "code/stubs.hpp" stefank@2314: #include "code/vmreg.hpp" stefank@2314: #include "compiler/oopMap.hpp" stefank@2314: #include "gc_implementation/concurrentMarkSweep/freeBlockDictionary.hpp" stefank@2314: #include "gc_implementation/shared/immutableSpace.hpp" stefank@2314: #include "gc_implementation/shared/markSweep.hpp" stefank@2314: #include "gc_implementation/shared/mutableSpace.hpp" stefank@2314: #include "gc_interface/collectedHeap.hpp" stefank@2314: #include "interpreter/bytecodeInterpreter.hpp" stefank@2314: #include "interpreter/bytecodes.hpp" stefank@2314: #include "interpreter/interpreter.hpp" stefank@2314: #include "memory/cardTableRS.hpp" stefank@2314: #include "memory/compactPermGen.hpp" stefank@2314: #include "memory/defNewGeneration.hpp" stefank@2314: #include "memory/genCollectedHeap.hpp" stefank@2314: #include "memory/generation.hpp" stefank@2314: #include "memory/generationSpec.hpp" stefank@2314: #include "memory/heap.hpp" stefank@2314: #include "memory/permGen.hpp" stefank@2314: #include "memory/space.hpp" stefank@2314: #include "memory/tenuredGeneration.hpp" stefank@2314: #include "memory/universe.hpp" stefank@2314: #include "memory/watermark.hpp" stefank@2314: #include "oops/arrayKlass.hpp" stefank@2314: #include "oops/arrayKlassKlass.hpp" stefank@2314: #include "oops/arrayOop.hpp" stefank@2314: #include "oops/compiledICHolderKlass.hpp" stefank@2314: #include "oops/compiledICHolderOop.hpp" stefank@2314: #include "oops/constMethodKlass.hpp" stefank@2314: #include "oops/constMethodOop.hpp" stefank@2314: #include "oops/constantPoolKlass.hpp" stefank@2314: #include "oops/constantPoolOop.hpp" stefank@2314: #include "oops/cpCacheKlass.hpp" stefank@2314: #include "oops/cpCacheOop.hpp" stefank@2314: #include "oops/instanceKlass.hpp" never@2693: #include "oops/instanceMirrorKlass.hpp" stefank@2314: #include "oops/instanceKlassKlass.hpp" stefank@2314: #include "oops/instanceOop.hpp" stefank@2314: #include "oops/klass.hpp" stefank@2314: #include "oops/klassOop.hpp" stefank@2314: #include "oops/markOop.hpp" stefank@2314: #include "oops/methodDataKlass.hpp" stefank@2314: #include "oops/methodDataOop.hpp" stefank@2314: #include "oops/methodKlass.hpp" stefank@2314: #include "oops/methodOop.hpp" stefank@2314: #include "oops/objArrayKlass.hpp" stefank@2314: #include "oops/objArrayKlassKlass.hpp" stefank@2314: #include "oops/objArrayOop.hpp" stefank@2314: #include "oops/oop.inline.hpp" coleenp@2497: #include "oops/symbol.hpp" stefank@2314: #include "oops/typeArrayKlass.hpp" stefank@2314: #include "oops/typeArrayKlassKlass.hpp" stefank@2314: #include "oops/typeArrayOop.hpp" stefank@2314: #include "prims/jvmtiAgentThread.hpp" stefank@2314: #include "runtime/arguments.hpp" stefank@2314: #include "runtime/globals.hpp" stefank@2314: #include "runtime/java.hpp" stefank@2314: #include "runtime/javaCalls.hpp" stefank@2314: #include "runtime/perfMemory.hpp" kamg@2511: #include "runtime/serviceThread.hpp" stefank@2314: #include "runtime/sharedRuntime.hpp" stefank@2314: #include "runtime/stubRoutines.hpp" stefank@2314: #include "runtime/virtualspace.hpp" stefank@2314: #include "runtime/vmStructs.hpp" stefank@2314: #include "utilities/globalDefinitions.hpp" stefank@2314: #include "utilities/hashtable.hpp" stefank@2314: #ifdef TARGET_ARCH_x86 stefank@2314: # include "vmStructs_x86.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_ARCH_sparc stefank@2314: # include "vmStructs_sparc.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_ARCH_zero stefank@2314: # include "vmStructs_zero.hpp" stefank@2314: #endif bobv@2508: #ifdef TARGET_ARCH_arm bobv@2508: # include "vmStructs_arm.hpp" bobv@2508: #endif bobv@2508: #ifdef TARGET_ARCH_ppc bobv@2508: # include "vmStructs_ppc.hpp" bobv@2508: #endif stefank@2314: #ifdef TARGET_OS_FAMILY_linux stefank@2314: # include "thread_linux.inline.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_OS_FAMILY_solaris stefank@2314: # include "thread_solaris.inline.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_OS_FAMILY_windows stefank@2314: # include "thread_windows.inline.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_OS_ARCH_linux_x86 stefank@2314: # include "vmStructs_linux_x86.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_OS_ARCH_linux_sparc stefank@2314: # include "vmStructs_linux_sparc.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_OS_ARCH_linux_zero stefank@2314: # include "vmStructs_linux_zero.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_OS_ARCH_solaris_x86 stefank@2314: # include "vmStructs_solaris_x86.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_OS_ARCH_solaris_sparc stefank@2314: # include "vmStructs_solaris_sparc.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_OS_ARCH_windows_x86 stefank@2314: # include "vmStructs_windows_x86.hpp" stefank@2314: #endif bobv@2508: #ifdef TARGET_OS_ARCH_linux_arm bobv@2508: # include "vmStructs_linux_arm.hpp" bobv@2508: #endif bobv@2508: #ifdef TARGET_OS_ARCH_linux_ppc bobv@2508: # include "vmStructs_linux_ppc.hpp" bobv@2508: #endif stefank@2314: #ifndef SERIALGC stefank@2314: #include "gc_implementation/concurrentMarkSweep/cmsPermGen.hpp" stefank@2314: #include "gc_implementation/concurrentMarkSweep/compactibleFreeListSpace.hpp" stefank@2314: #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.hpp" stefank@2314: #include "gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp" stefank@2314: #include "gc_implementation/concurrentMarkSweep/vmStructs_cms.hpp" stefank@2314: #include "gc_implementation/parNew/parNewGeneration.hpp" stefank@2314: #include "gc_implementation/parNew/vmStructs_parNew.hpp" stefank@2314: #include "gc_implementation/parallelScavenge/asPSOldGen.hpp" stefank@2314: #include "gc_implementation/parallelScavenge/asPSYoungGen.hpp" stefank@2314: #include "gc_implementation/parallelScavenge/parallelScavengeHeap.hpp" stefank@2314: #include "gc_implementation/parallelScavenge/psOldGen.hpp" stefank@2314: #include "gc_implementation/parallelScavenge/psPermGen.hpp" stefank@2314: #include "gc_implementation/parallelScavenge/psVirtualspace.hpp" stefank@2314: #include "gc_implementation/parallelScavenge/psYoungGen.hpp" stefank@2314: #include "gc_implementation/parallelScavenge/vmStructs_parallelgc.hpp" stefank@2314: #endif stefank@2314: #ifdef COMPILER2 stefank@2314: #include "opto/matcher.hpp" stefank@2314: #ifdef TARGET_ARCH_MODEL_x86_32 stefank@2314: # include "adfiles/adGlobals_x86_32.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_ARCH_MODEL_x86_64 stefank@2314: # include "adfiles/adGlobals_x86_64.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_ARCH_MODEL_sparc stefank@2314: # include "adfiles/adGlobals_sparc.hpp" stefank@2314: #endif stefank@2314: #ifdef TARGET_ARCH_MODEL_zero stefank@2314: # include "adfiles/adGlobals_zero.hpp" stefank@2314: #endif bobv@2508: #ifdef TARGET_ARCH_MODEL_arm bobv@2508: # include "adfiles/adGlobals_arm.hpp" bobv@2508: #endif bobv@2508: #ifdef TARGET_ARCH_MODEL_ppc bobv@2508: # include "adfiles/adGlobals_ppc.hpp" bobv@2508: #endif stefank@2314: #endif duke@435: duke@435: // Note: the cross-product of (c1, c2, product, nonproduct, ...), duke@435: // (nonstatic, static), and (unchecked, checked) has not been taken. duke@435: // Only the macros currently needed have been defined. duke@435: duke@435: // A field whose type is not checked is given a null string as the duke@435: // type name, indicating an "opaque" type to the serviceability agent. duke@435: duke@435: // NOTE: there is an interdependency between this file and duke@435: // HotSpotTypeDataBase.java, which parses the type strings. duke@435: duke@435: #ifndef REG_COUNT duke@435: #define REG_COUNT 0 duke@435: #endif duke@435: duke@435: // whole purpose of this function is to work around bug c++/27724 in gcc 4.1.1 duke@435: // with optimization turned on it doesn't affect produced code duke@435: static inline uint64_t cast_uint64_t(size_t x) duke@435: { duke@435: return x; duke@435: } duke@435: duke@435: duke@435: //-------------------------------------------------------------------------------- duke@435: // VM_STRUCTS duke@435: // duke@435: // This list enumerates all of the fields the serviceability agent duke@435: // needs to know about. Be sure to see also the type table below this one. duke@435: // NOTE that there are platform-specific additions to this table in duke@435: // vmStructs__.hpp. duke@435: duke@435: #define VM_STRUCTS(nonstatic_field, \ duke@435: static_field, \ duke@435: unchecked_nonstatic_field, \ duke@435: volatile_nonstatic_field, \ duke@435: nonproduct_nonstatic_field, \ duke@435: c1_nonstatic_field, \ duke@435: c2_nonstatic_field, \ duke@435: unchecked_c1_static_field, \ duke@435: unchecked_c2_static_field, \ duke@435: last_entry) \ duke@435: \ duke@435: /******************************************************************/ \ duke@435: /* OopDesc and Klass hierarchies (NOTE: methodDataOop incomplete) */ \ duke@435: /******************************************************************/ \ duke@435: \ duke@435: volatile_nonstatic_field(oopDesc, _mark, markOop) \ coleenp@548: volatile_nonstatic_field(oopDesc, _metadata._klass, wideKlassOop) \ coleenp@548: volatile_nonstatic_field(oopDesc, _metadata._compressed_klass, narrowOop) \ duke@435: static_field(oopDesc, _bs, BarrierSet*) \ duke@435: nonstatic_field(arrayKlass, _dimension, int) \ kvn@2439: volatile_nonstatic_field(arrayKlass, _higher_dimension, klassOop) \ kvn@2439: volatile_nonstatic_field(arrayKlass, _lower_dimension, klassOop) \ duke@435: nonstatic_field(arrayKlass, _vtable_len, int) \ duke@435: nonstatic_field(arrayKlass, _alloc_size, juint) \ duke@435: nonstatic_field(arrayKlass, _component_mirror, oop) \ duke@435: nonstatic_field(compiledICHolderKlass, _alloc_size, juint) \ duke@435: nonstatic_field(compiledICHolderOopDesc, _holder_method, methodOop) \ duke@435: nonstatic_field(compiledICHolderOopDesc, _holder_klass, klassOop) \ duke@435: nonstatic_field(constantPoolOopDesc, _tags, typeArrayOop) \ duke@435: nonstatic_field(constantPoolOopDesc, _cache, constantPoolCacheOop) \ duke@435: nonstatic_field(constantPoolOopDesc, _pool_holder, klassOop) \ jrose@2272: nonstatic_field(constantPoolOopDesc, _operands, typeArrayOop) \ coleenp@548: nonstatic_field(constantPoolOopDesc, _length, int) \ coleenp@548: nonstatic_field(constantPoolCacheOopDesc, _length, int) \ duke@435: nonstatic_field(constantPoolCacheOopDesc, _constant_pool, constantPoolOop) \ duke@435: nonstatic_field(instanceKlass, _array_klasses, klassOop) \ duke@435: nonstatic_field(instanceKlass, _methods, objArrayOop) \ duke@435: nonstatic_field(instanceKlass, _method_ordering, typeArrayOop) \ duke@435: nonstatic_field(instanceKlass, _local_interfaces, objArrayOop) \ duke@435: nonstatic_field(instanceKlass, _transitive_interfaces, objArrayOop) \ duke@435: nonstatic_field(instanceKlass, _nof_implementors, int) \ duke@435: nonstatic_field(instanceKlass, _implementors[0], klassOop) \ duke@435: nonstatic_field(instanceKlass, _fields, typeArrayOop) \ never@3137: nonstatic_field(instanceKlass, _java_fields_count, int) \ duke@435: nonstatic_field(instanceKlass, _constants, constantPoolOop) \ duke@435: nonstatic_field(instanceKlass, _class_loader, oop) \ duke@435: nonstatic_field(instanceKlass, _protection_domain, oop) \ duke@435: nonstatic_field(instanceKlass, _signers, objArrayOop) \ coleenp@2497: nonstatic_field(instanceKlass, _source_file_name, Symbol*) \ coleenp@2497: nonstatic_field(instanceKlass, _source_debug_extension, Symbol*) \ duke@435: nonstatic_field(instanceKlass, _inner_classes, typeArrayOop) \ duke@435: nonstatic_field(instanceKlass, _nonstatic_field_size, int) \ duke@435: nonstatic_field(instanceKlass, _static_field_size, int) \ never@2658: nonstatic_field(instanceKlass, _static_oop_field_count, int) \ duke@435: nonstatic_field(instanceKlass, _nonstatic_oop_map_size, int) \ acorn@1410: nonstatic_field(instanceKlass, _is_marked_dependent, bool) \ duke@435: nonstatic_field(instanceKlass, _minor_version, u2) \ duke@435: nonstatic_field(instanceKlass, _major_version, u2) \ duke@435: nonstatic_field(instanceKlass, _init_state, instanceKlass::ClassState) \ duke@435: nonstatic_field(instanceKlass, _init_thread, Thread*) \ duke@435: nonstatic_field(instanceKlass, _vtable_len, int) \ duke@435: nonstatic_field(instanceKlass, _itable_len, int) \ duke@435: nonstatic_field(instanceKlass, _reference_type, ReferenceType) \ duke@435: volatile_nonstatic_field(instanceKlass, _oop_map_cache, OopMapCache*) \ duke@435: nonstatic_field(instanceKlass, _jni_ids, JNIid*) \ duke@435: nonstatic_field(instanceKlass, _osr_nmethods_head, nmethod*) \ duke@435: nonstatic_field(instanceKlass, _breakpoints, BreakpointInfo*) \ coleenp@2497: nonstatic_field(instanceKlass, _generic_signature, Symbol*) \ duke@435: nonstatic_field(instanceKlass, _methods_jmethod_ids, jmethodID*) \ duke@435: nonstatic_field(instanceKlass, _methods_cached_itable_indices, int*) \ duke@435: volatile_nonstatic_field(instanceKlass, _idnum_allocated_count, u2) \ duke@435: nonstatic_field(instanceKlass, _class_annotations, typeArrayOop) \ duke@435: nonstatic_field(instanceKlass, _fields_annotations, objArrayOop) \ duke@435: nonstatic_field(instanceKlass, _methods_annotations, objArrayOop) \ duke@435: nonstatic_field(instanceKlass, _methods_parameter_annotations, objArrayOop) \ duke@435: nonstatic_field(instanceKlass, _methods_default_annotations, objArrayOop) \ duke@435: nonstatic_field(Klass, _super_check_offset, juint) \ duke@435: nonstatic_field(Klass, _secondary_super_cache, klassOop) \ duke@435: nonstatic_field(Klass, _secondary_supers, objArrayOop) \ duke@435: nonstatic_field(Klass, _primary_supers[0], klassOop) \ duke@435: nonstatic_field(Klass, _java_mirror, oop) \ duke@435: nonstatic_field(Klass, _modifier_flags, jint) \ duke@435: nonstatic_field(Klass, _super, klassOop) \ duke@435: nonstatic_field(Klass, _layout_helper, jint) \ coleenp@2497: nonstatic_field(Klass, _name, Symbol*) \ duke@435: nonstatic_field(Klass, _access_flags, AccessFlags) \ duke@435: nonstatic_field(Klass, _subklass, klassOop) \ duke@435: nonstatic_field(Klass, _next_sibling, klassOop) \ duke@435: nonproduct_nonstatic_field(Klass, _verify_count, int) \ duke@435: nonstatic_field(Klass, _alloc_count, juint) \ duke@435: nonstatic_field(klassKlass, _alloc_size, juint) \ duke@435: nonstatic_field(methodKlass, _alloc_size, juint) \ duke@435: nonstatic_field(methodDataOopDesc, _size, int) \ duke@435: nonstatic_field(methodDataOopDesc, _method, methodOop) \ duke@435: nonstatic_field(methodOopDesc, _constMethod, constMethodOop) \ duke@435: nonstatic_field(methodOopDesc, _constants, constantPoolOop) \ duke@435: c2_nonstatic_field(methodOopDesc, _method_data, methodDataOop) \ duke@435: c2_nonstatic_field(methodOopDesc, _interpreter_invocation_count, int) \ duke@435: nonstatic_field(methodOopDesc, _access_flags, AccessFlags) \ duke@435: nonstatic_field(methodOopDesc, _vtable_index, int) \ duke@435: nonstatic_field(methodOopDesc, _method_size, u2) \ duke@435: nonstatic_field(methodOopDesc, _max_stack, u2) \ duke@435: nonstatic_field(methodOopDesc, _max_locals, u2) \ duke@435: nonstatic_field(methodOopDesc, _size_of_parameters, u2) \ duke@435: c2_nonstatic_field(methodOopDesc, _interpreter_throwout_count, u2) \ duke@435: nonstatic_field(methodOopDesc, _number_of_breakpoints, u2) \ duke@435: nonstatic_field(methodOopDesc, _invocation_counter, InvocationCounter) \ duke@435: nonstatic_field(methodOopDesc, _backedge_counter, InvocationCounter) \ duke@435: nonproduct_nonstatic_field(methodOopDesc, _compiled_invocation_count, int) \ duke@435: volatile_nonstatic_field(methodOopDesc, _code, nmethod*) \ duke@435: nonstatic_field(methodOopDesc, _i2i_entry, address) \ duke@435: nonstatic_field(methodOopDesc, _adapter, AdapterHandlerEntry*) \ duke@435: volatile_nonstatic_field(methodOopDesc, _from_compiled_entry, address) \ duke@435: volatile_nonstatic_field(methodOopDesc, _from_interpreted_entry, address) \ duke@435: volatile_nonstatic_field(constMethodOopDesc, _fingerprint, uint64_t) \ duke@435: nonstatic_field(constMethodOopDesc, _method, methodOop) \ duke@435: nonstatic_field(constMethodOopDesc, _stackmap_data, typeArrayOop) \ duke@435: nonstatic_field(constMethodOopDesc, _exception_table, typeArrayOop) \ duke@435: nonstatic_field(constMethodOopDesc, _constMethod_size, int) \ duke@435: nonstatic_field(constMethodOopDesc, _interpreter_kind, jbyte) \ duke@435: nonstatic_field(constMethodOopDesc, _flags, jbyte) \ duke@435: nonstatic_field(constMethodOopDesc, _code_size, u2) \ duke@435: nonstatic_field(constMethodOopDesc, _name_index, u2) \ duke@435: nonstatic_field(constMethodOopDesc, _signature_index, u2) \ duke@435: nonstatic_field(constMethodOopDesc, _method_idnum, u2) \ duke@435: nonstatic_field(constMethodOopDesc, _generic_signature_index, u2) \ duke@435: nonstatic_field(objArrayKlass, _element_klass, klassOop) \ duke@435: nonstatic_field(objArrayKlass, _bottom_klass, klassOop) \ coleenp@2497: volatile_nonstatic_field(Symbol, _refcount, int) \ coleenp@2497: nonstatic_field(Symbol, _identity_hash, int) \ coleenp@2497: nonstatic_field(Symbol, _length, unsigned short) \ coleenp@2497: unchecked_nonstatic_field(Symbol, _body, sizeof(jbyte)) /* NOTE: no type */ \ duke@435: nonstatic_field(typeArrayKlass, _max_length, int) \ duke@435: \ duke@435: /***********************/ \ duke@435: /* Constant Pool Cache */ \ duke@435: /***********************/ \ duke@435: \ duke@435: volatile_nonstatic_field(ConstantPoolCacheEntry, _indices, intx) \ duke@435: volatile_nonstatic_field(ConstantPoolCacheEntry, _f1, oop) \ duke@435: volatile_nonstatic_field(ConstantPoolCacheEntry, _f2, intx) \ duke@435: volatile_nonstatic_field(ConstantPoolCacheEntry, _flags, intx) \ duke@435: \ duke@435: /********************************/ \ duke@435: /* MethodOop-related structures */ \ duke@435: /********************************/ \ duke@435: \ duke@435: nonstatic_field(CheckedExceptionElement, class_cp_index, u2) \ duke@435: nonstatic_field(LocalVariableTableElement, start_bci, u2) \ duke@435: nonstatic_field(LocalVariableTableElement, length, u2) \ duke@435: nonstatic_field(LocalVariableTableElement, name_cp_index, u2) \ duke@435: nonstatic_field(LocalVariableTableElement, descriptor_cp_index, u2) \ duke@435: nonstatic_field(LocalVariableTableElement, signature_cp_index, u2) \ duke@435: nonstatic_field(LocalVariableTableElement, slot, u2) \ duke@435: nonstatic_field(BreakpointInfo, _orig_bytecode, Bytecodes::Code) \ duke@435: nonstatic_field(BreakpointInfo, _bci, int) \ duke@435: nonstatic_field(BreakpointInfo, _name_index, u2) \ duke@435: nonstatic_field(BreakpointInfo, _signature_index, u2) \ duke@435: nonstatic_field(BreakpointInfo, _next, BreakpointInfo*) \ duke@435: /***********/ \ duke@435: /* JNI IDs */ \ duke@435: /***********/ \ duke@435: \ duke@435: nonstatic_field(JNIid, _holder, klassOop) \ duke@435: nonstatic_field(JNIid, _next, JNIid*) \ duke@435: nonstatic_field(JNIid, _offset, int) \ duke@435: /************/ \ duke@435: /* Universe */ \ duke@435: /************/ \ duke@435: \ duke@435: static_field(Universe, _boolArrayKlassObj, klassOop) \ duke@435: static_field(Universe, _byteArrayKlassObj, klassOop) \ duke@435: static_field(Universe, _charArrayKlassObj, klassOop) \ duke@435: static_field(Universe, _intArrayKlassObj, klassOop) \ duke@435: static_field(Universe, _shortArrayKlassObj, klassOop) \ duke@435: static_field(Universe, _longArrayKlassObj, klassOop) \ duke@435: static_field(Universe, _singleArrayKlassObj, klassOop) \ duke@435: static_field(Universe, _doubleArrayKlassObj, klassOop) \ duke@435: static_field(Universe, _methodKlassObj, klassOop) \ duke@435: static_field(Universe, _constMethodKlassObj, klassOop) \ duke@435: static_field(Universe, _methodDataKlassObj, klassOop) \ duke@435: static_field(Universe, _klassKlassObj, klassOop) \ duke@435: static_field(Universe, _arrayKlassKlassObj, klassOop) \ duke@435: static_field(Universe, _objArrayKlassKlassObj, klassOop) \ duke@435: static_field(Universe, _typeArrayKlassKlassObj, klassOop) \ duke@435: static_field(Universe, _instanceKlassKlassObj, klassOop) \ duke@435: static_field(Universe, _constantPoolKlassObj, klassOop) \ duke@435: static_field(Universe, _constantPoolCacheKlassObj, klassOop) \ duke@435: static_field(Universe, _compiledICHolderKlassObj, klassOop) \ duke@435: static_field(Universe, _systemObjArrayKlassObj, klassOop) \ duke@435: static_field(Universe, _mirrors[0], oop) \ duke@435: static_field(Universe, _main_thread_group, oop) \ duke@435: static_field(Universe, _system_thread_group, oop) \ duke@435: static_field(Universe, _the_empty_byte_array, typeArrayOop) \ duke@435: static_field(Universe, _the_empty_short_array, typeArrayOop) \ duke@435: static_field(Universe, _the_empty_int_array, typeArrayOop) \ duke@435: static_field(Universe, _the_empty_system_obj_array, objArrayOop) \ duke@435: static_field(Universe, _the_empty_class_klass_array, objArrayOop) \ duke@435: static_field(Universe, _out_of_memory_error_java_heap, oop) \ duke@435: static_field(Universe, _out_of_memory_error_perm_gen, oop) \ duke@435: static_field(Universe, _out_of_memory_error_array_size, oop) \ duke@435: static_field(Universe, _out_of_memory_error_gc_overhead_limit, oop) \ duke@435: static_field(Universe, _null_ptr_exception_instance, oop) \ duke@435: static_field(Universe, _arithmetic_exception_instance, oop) \ duke@435: static_field(Universe, _vm_exception, oop) \ duke@435: static_field(Universe, _collectedHeap, CollectedHeap*) \ duke@435: static_field(Universe, _base_vtable_size, int) \ duke@435: static_field(Universe, _bootstrapping, bool) \ duke@435: static_field(Universe, _fully_initialized, bool) \ duke@435: static_field(Universe, _verify_count, int) \ kvn@1077: static_field(Universe, _narrow_oop._base, address) \ kvn@1077: static_field(Universe, _narrow_oop._shift, int) \ kvn@1077: static_field(Universe, _narrow_oop._use_implicit_null_checks, bool) \ duke@435: \ duke@435: /**********************************************************************************/ \ duke@435: /* Generation and Space hierarchies */ \ duke@435: /**********************************************************************************/ \ duke@435: \ duke@435: unchecked_nonstatic_field(ageTable, sizes, sizeof(ageTable::sizes)) \ duke@435: \ duke@435: nonstatic_field(BarrierSet, _max_covered_regions, int) \ duke@435: nonstatic_field(BlockOffsetTable, _bottom, HeapWord*) \ duke@435: nonstatic_field(BlockOffsetTable, _end, HeapWord*) \ duke@435: \ duke@435: nonstatic_field(BlockOffsetSharedArray, _reserved, MemRegion) \ duke@435: nonstatic_field(BlockOffsetSharedArray, _end, HeapWord*) \ duke@435: nonstatic_field(BlockOffsetSharedArray, _vs, VirtualSpace) \ duke@435: nonstatic_field(BlockOffsetSharedArray, _offset_array, u_char*) \ duke@435: \ duke@435: nonstatic_field(BlockOffsetArray, _array, BlockOffsetSharedArray*) \ duke@435: nonstatic_field(BlockOffsetArray, _sp, Space*) \ duke@435: nonstatic_field(BlockOffsetArrayContigSpace, _next_offset_threshold, HeapWord*) \ duke@435: nonstatic_field(BlockOffsetArrayContigSpace, _next_offset_index, size_t) \ duke@435: \ duke@435: nonstatic_field(BlockOffsetArrayNonContigSpace, _unallocated_block, HeapWord*) \ duke@435: \ duke@435: nonstatic_field(CardGeneration, _rs, GenRemSet*) \ duke@435: nonstatic_field(CardGeneration, _bts, BlockOffsetSharedArray*) \ duke@435: \ duke@435: nonstatic_field(CardTableModRefBS, _whole_heap, const MemRegion) \ duke@435: nonstatic_field(CardTableModRefBS, _guard_index, const size_t) \ duke@435: nonstatic_field(CardTableModRefBS, _last_valid_index, const size_t) \ duke@435: nonstatic_field(CardTableModRefBS, _page_size, const size_t) \ duke@435: nonstatic_field(CardTableModRefBS, _byte_map_size, const size_t) \ duke@435: nonstatic_field(CardTableModRefBS, _byte_map, jbyte*) \ duke@435: nonstatic_field(CardTableModRefBS, _cur_covered_regions, int) \ duke@435: nonstatic_field(CardTableModRefBS, _covered, MemRegion*) \ duke@435: nonstatic_field(CardTableModRefBS, _committed, MemRegion*) \ duke@435: nonstatic_field(CardTableModRefBS, _guard_region, MemRegion) \ duke@435: nonstatic_field(CardTableModRefBS, byte_map_base, jbyte*) \ duke@435: \ ysr@777: nonstatic_field(CardTableRS, _ct_bs, CardTableModRefBSForCTRS*) \ duke@435: \ duke@435: nonstatic_field(CollectedHeap, _reserved, MemRegion) \ duke@435: nonstatic_field(SharedHeap, _perm_gen, PermGen*) \ duke@435: nonstatic_field(CollectedHeap, _barrier_set, BarrierSet*) \ ysr@1601: nonstatic_field(CollectedHeap, _defer_initial_card_mark, bool) \ duke@435: nonstatic_field(CollectedHeap, _is_gc_active, bool) \ duke@435: nonstatic_field(CompactibleSpace, _compaction_top, HeapWord*) \ duke@435: nonstatic_field(CompactibleSpace, _first_dead, HeapWord*) \ duke@435: nonstatic_field(CompactibleSpace, _end_of_live, HeapWord*) \ duke@435: \ duke@435: nonstatic_field(CompactingPermGen, _gen, OneContigSpaceCardGeneration*) \ duke@435: \ duke@435: nonstatic_field(ContiguousSpace, _top, HeapWord*) \ duke@435: nonstatic_field(ContiguousSpace, _concurrent_iteration_safe_limit, HeapWord*) \ duke@435: nonstatic_field(ContiguousSpace, _saved_mark_word, HeapWord*) \ duke@435: \ duke@435: nonstatic_field(DefNewGeneration, _next_gen, Generation*) \ duke@435: nonstatic_field(DefNewGeneration, _tenuring_threshold, int) \ duke@435: nonstatic_field(DefNewGeneration, _age_table, ageTable) \ duke@435: nonstatic_field(DefNewGeneration, _eden_space, EdenSpace*) \ duke@435: nonstatic_field(DefNewGeneration, _from_space, ContiguousSpace*) \ duke@435: nonstatic_field(DefNewGeneration, _to_space, ContiguousSpace*) \ duke@435: \ duke@435: nonstatic_field(EdenSpace, _gen, DefNewGeneration*) \ duke@435: \ duke@435: nonstatic_field(Generation, _reserved, MemRegion) \ duke@435: nonstatic_field(Generation, _virtual_space, VirtualSpace) \ duke@435: nonstatic_field(Generation, _level, int) \ duke@435: nonstatic_field(Generation, _stat_record, Generation::StatRecord) \ duke@435: \ duke@435: nonstatic_field(Generation::StatRecord, invocations, int) \ duke@435: nonstatic_field(Generation::StatRecord, accumulated_time, elapsedTimer) \ duke@435: \ duke@435: nonstatic_field(GenerationSpec, _name, Generation::Name) \ duke@435: nonstatic_field(GenerationSpec, _init_size, size_t) \ duke@435: nonstatic_field(GenerationSpec, _max_size, size_t) \ duke@435: \ duke@435: static_field(GenCollectedHeap, _gch, GenCollectedHeap*) \ duke@435: nonstatic_field(GenCollectedHeap, _n_gens, int) \ duke@435: unchecked_nonstatic_field(GenCollectedHeap, _gens, sizeof(GenCollectedHeap::_gens)) /* NOTE: no type */ \ duke@435: nonstatic_field(GenCollectedHeap, _gen_specs, GenerationSpec**) \ duke@435: \ duke@435: nonstatic_field(HeapWord, i, char*) \ duke@435: \ duke@435: nonstatic_field(MemRegion, _start, HeapWord*) \ duke@435: nonstatic_field(MemRegion, _word_size, size_t) \ duke@435: \ duke@435: nonstatic_field(OffsetTableContigSpace, _offsets, BlockOffsetArray) \ duke@435: \ duke@435: nonstatic_field(OneContigSpaceCardGeneration, _min_heap_delta_bytes, size_t) \ duke@435: nonstatic_field(OneContigSpaceCardGeneration, _the_space, ContiguousSpace*) \ duke@435: nonstatic_field(OneContigSpaceCardGeneration, _last_gc, WaterMark) \ duke@435: \ duke@435: nonstatic_field(CompactingPermGenGen, _ro_vs, VirtualSpace) \ duke@435: nonstatic_field(CompactingPermGenGen, _rw_vs, VirtualSpace) \ duke@435: nonstatic_field(CompactingPermGenGen, _md_vs, VirtualSpace) \ duke@435: nonstatic_field(CompactingPermGenGen, _mc_vs, VirtualSpace) \ duke@435: nonstatic_field(CompactingPermGenGen, _ro_space, OffsetTableContigSpace*) \ duke@435: nonstatic_field(CompactingPermGenGen, _rw_space, OffsetTableContigSpace*) \ duke@435: static_field(CompactingPermGenGen, unshared_bottom, HeapWord*) \ duke@435: static_field(CompactingPermGenGen, unshared_end, HeapWord*) \ duke@435: static_field(CompactingPermGenGen, shared_bottom, HeapWord*) \ duke@435: static_field(CompactingPermGenGen, readonly_bottom, HeapWord*) \ duke@435: static_field(CompactingPermGenGen, readonly_end, HeapWord*) \ duke@435: static_field(CompactingPermGenGen, readwrite_bottom, HeapWord*) \ duke@435: static_field(CompactingPermGenGen, readwrite_end, HeapWord*) \ duke@435: static_field(CompactingPermGenGen, miscdata_bottom, HeapWord*) \ duke@435: static_field(CompactingPermGenGen, miscdata_end, HeapWord*) \ duke@435: static_field(CompactingPermGenGen, misccode_bottom, HeapWord*) \ duke@435: static_field(CompactingPermGenGen, misccode_end, HeapWord*) \ duke@435: static_field(CompactingPermGenGen, shared_end, HeapWord*) \ duke@435: \ duke@435: nonstatic_field(PermGen, _capacity_expansion_limit, size_t) \ duke@435: \ duke@435: nonstatic_field(PermanentGenerationSpec, _name, PermGen::Name) \ duke@435: nonstatic_field(PermanentGenerationSpec, _init_size, size_t) \ duke@435: nonstatic_field(PermanentGenerationSpec, _max_size, size_t) \ duke@435: \ duke@435: nonstatic_field(Space, _bottom, HeapWord*) \ duke@435: nonstatic_field(Space, _end, HeapWord*) \ duke@435: \ duke@435: nonstatic_field(TenuredGeneration, _shrink_factor, size_t) \ duke@435: nonstatic_field(TenuredGeneration, _capacity_at_prologue, size_t) \ duke@435: nonstatic_field(ThreadLocalAllocBuffer, _start, HeapWord*) \ duke@435: nonstatic_field(ThreadLocalAllocBuffer, _top, HeapWord*) \ duke@435: nonstatic_field(ThreadLocalAllocBuffer, _end, HeapWord*) \ duke@435: nonstatic_field(ThreadLocalAllocBuffer, _desired_size, size_t) \ duke@435: nonstatic_field(ThreadLocalAllocBuffer, _refill_waste_limit, size_t) \ duke@435: static_field(ThreadLocalAllocBuffer, _target_refills, unsigned) \ duke@435: nonstatic_field(VirtualSpace, _low_boundary, char*) \ duke@435: nonstatic_field(VirtualSpace, _high_boundary, char*) \ duke@435: nonstatic_field(VirtualSpace, _low, char*) \ duke@435: nonstatic_field(VirtualSpace, _high, char*) \ duke@435: nonstatic_field(VirtualSpace, _lower_high, char*) \ duke@435: nonstatic_field(VirtualSpace, _middle_high, char*) \ duke@435: nonstatic_field(VirtualSpace, _upper_high, char*) \ duke@435: nonstatic_field(WaterMark, _point, HeapWord*) \ duke@435: nonstatic_field(WaterMark, _space, Space*) \ duke@435: \ duke@435: /************************/ \ duke@435: /* PerfMemory - jvmstat */ \ duke@435: /************************/ \ duke@435: \ duke@435: nonstatic_field(PerfDataPrologue, magic, jint) \ duke@435: nonstatic_field(PerfDataPrologue, byte_order, jbyte) \ duke@435: nonstatic_field(PerfDataPrologue, major_version, jbyte) \ duke@435: nonstatic_field(PerfDataPrologue, minor_version, jbyte) \ duke@435: nonstatic_field(PerfDataPrologue, accessible, jbyte) \ duke@435: nonstatic_field(PerfDataPrologue, used, jint) \ duke@435: nonstatic_field(PerfDataPrologue, overflow, jint) \ duke@435: nonstatic_field(PerfDataPrologue, mod_time_stamp, jlong) \ duke@435: nonstatic_field(PerfDataPrologue, entry_offset, jint) \ duke@435: nonstatic_field(PerfDataPrologue, num_entries, jint) \ duke@435: \ duke@435: nonstatic_field(PerfDataEntry, entry_length, jint) \ duke@435: nonstatic_field(PerfDataEntry, name_offset, jint) \ duke@435: nonstatic_field(PerfDataEntry, vector_length, jint) \ duke@435: nonstatic_field(PerfDataEntry, data_type, jbyte) \ duke@435: nonstatic_field(PerfDataEntry, flags, jbyte) \ duke@435: nonstatic_field(PerfDataEntry, data_units, jbyte) \ duke@435: nonstatic_field(PerfDataEntry, data_variability, jbyte) \ duke@435: nonstatic_field(PerfDataEntry, data_offset, jint) \ duke@435: \ duke@435: static_field(PerfMemory, _start, char*) \ duke@435: static_field(PerfMemory, _end, char*) \ duke@435: static_field(PerfMemory, _top, char*) \ duke@435: static_field(PerfMemory, _capacity, size_t) \ duke@435: static_field(PerfMemory, _prologue, PerfDataPrologue*) \ duke@435: static_field(PerfMemory, _initialized, jint) \ duke@435: \ duke@435: /***************/ \ duke@435: /* SymbolTable */ \ duke@435: /***************/ \ duke@435: \ duke@435: static_field(SymbolTable, _the_table, SymbolTable*) \ duke@435: \ duke@435: /***************/ \ duke@435: /* StringTable */ \ duke@435: /***************/ \ duke@435: \ duke@435: static_field(StringTable, _the_table, StringTable*) \ duke@435: \ duke@435: /********************/ \ duke@435: /* SystemDictionary */ \ duke@435: /********************/ \ duke@435: \ duke@435: static_field(SystemDictionary, _dictionary, Dictionary*) \ duke@435: static_field(SystemDictionary, _placeholders, PlaceholderTable*) \ duke@435: static_field(SystemDictionary, _shared_dictionary, Dictionary*) \ duke@435: static_field(SystemDictionary, _system_loader_lock_obj, oop) \ duke@435: static_field(SystemDictionary, _loader_constraints, LoaderConstraintTable*) \ never@1577: static_field(SystemDictionary, WK_KLASS(Object_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(String_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(Class_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(Cloneable_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(ClassLoader_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(Serializable_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(System_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(Throwable_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(ThreadDeath_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(Error_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(Exception_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(RuntimeException_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(ClassNotFoundException_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(NoClassDefFoundError_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(LinkageError_klass), klassOop) \ jrose@582: static_field(SystemDictionary, WK_KLASS(ClassCastException_klass), klassOop) \ jrose@582: static_field(SystemDictionary, WK_KLASS(ArrayStoreException_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(VirtualMachineError_klass), klassOop) \ jrose@582: static_field(SystemDictionary, WK_KLASS(OutOfMemoryError_klass), klassOop) \ jrose@582: static_field(SystemDictionary, WK_KLASS(StackOverflowError_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(ProtectionDomain_klass), klassOop) \ jrose@582: static_field(SystemDictionary, WK_KLASS(AccessControlContext_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(Reference_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(SoftReference_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(WeakReference_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(FinalReference_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(PhantomReference_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(Finalizer_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(Thread_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(ThreadGroup_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(Properties_klass), klassOop) \ never@1577: static_field(SystemDictionary, WK_KLASS(StringBuffer_klass), klassOop) \ never@3108: static_field(SystemDictionary, WK_KLASS(MethodHandle_klass), klassOop) \ duke@435: static_field(SystemDictionary, _box_klasses[0], klassOop) \ duke@435: static_field(SystemDictionary, _java_system_loader, oop) \ duke@435: \ duke@435: /*******************/ \ duke@435: /* HashtableBucket */ \ duke@435: /*******************/ \ duke@435: \ duke@435: nonstatic_field(HashtableBucket, _entry, BasicHashtableEntry*) \ duke@435: \ duke@435: /******************/ \ duke@435: /* HashtableEntry */ \ duke@435: /******************/ \ duke@435: \ duke@435: nonstatic_field(BasicHashtableEntry, _next, BasicHashtableEntry*) \ duke@435: nonstatic_field(BasicHashtableEntry, _hash, unsigned int) \ coleenp@2497: nonstatic_field(HashtableEntry, _literal, intptr_t) \ duke@435: \ duke@435: /*************/ \ duke@435: /* Hashtable */ \ duke@435: /*************/ \ duke@435: \ duke@435: nonstatic_field(BasicHashtable, _table_size, int) \ duke@435: nonstatic_field(BasicHashtable, _buckets, HashtableBucket*) \ duke@435: nonstatic_field(BasicHashtable, _free_list, BasicHashtableEntry*) \ duke@435: nonstatic_field(BasicHashtable, _first_free_entry, char*) \ duke@435: nonstatic_field(BasicHashtable, _end_block, char*) \ duke@435: nonstatic_field(BasicHashtable, _entry_size, int) \ duke@435: \ duke@435: /*******************/ \ duke@435: /* DictionaryEntry */ \ duke@435: /*******************/ \ duke@435: \ duke@435: nonstatic_field(DictionaryEntry, _loader, oop) \ duke@435: nonstatic_field(DictionaryEntry, _pd_set, ProtectionDomainEntry*) \ duke@435: \ duke@435: /********************/ \ duke@435: \ duke@435: nonstatic_field(PlaceholderEntry, _loader, oop) \ duke@435: \ duke@435: /**************************/ \ duke@435: /* ProctectionDomainEntry */ \ duke@435: /**************************/ \ duke@435: \ duke@435: nonstatic_field(ProtectionDomainEntry, _next, ProtectionDomainEntry*) \ duke@435: nonstatic_field(ProtectionDomainEntry, _protection_domain, oop) \ duke@435: \ duke@435: /*************************/ \ duke@435: /* LoaderConstraintEntry */ \ duke@435: /*************************/ \ duke@435: \ coleenp@2497: nonstatic_field(LoaderConstraintEntry, _name, Symbol*) \ duke@435: nonstatic_field(LoaderConstraintEntry, _num_loaders, int) \ duke@435: nonstatic_field(LoaderConstraintEntry, _max_loaders, int) \ duke@435: nonstatic_field(LoaderConstraintEntry, _loaders, oop*) \ duke@435: \ duke@435: /********************************/ \ duke@435: /* CodeCache (NOTE: incomplete) */ \ duke@435: /********************************/ \ duke@435: \ duke@435: static_field(CodeCache, _heap, CodeHeap*) \ jrose@1424: static_field(CodeCache, _scavenge_root_nmethods, nmethod*) \ duke@435: \ duke@435: /*******************************/ \ duke@435: /* CodeHeap (NOTE: incomplete) */ \ duke@435: /*******************************/ \ duke@435: \ duke@435: nonstatic_field(CodeHeap, _memory, VirtualSpace) \ duke@435: nonstatic_field(CodeHeap, _segmap, VirtualSpace) \ duke@435: nonstatic_field(CodeHeap, _log2_segment_size, int) \ duke@435: nonstatic_field(HeapBlock, _header, HeapBlock::Header) \ duke@435: nonstatic_field(HeapBlock::Header, _length, size_t) \ duke@435: nonstatic_field(HeapBlock::Header, _used, bool) \ duke@435: \ duke@435: /**********************************/ \ duke@435: /* Interpreter (NOTE: incomplete) */ \ duke@435: /**********************************/ \ duke@435: \ duke@435: static_field(AbstractInterpreter, _code, StubQueue*) \ duke@435: \ duke@435: /****************************/ \ duke@435: /* Stubs (NOTE: incomplete) */ \ duke@435: /****************************/ \ duke@435: \ duke@435: nonstatic_field(StubQueue, _stub_buffer, address) \ duke@435: nonstatic_field(StubQueue, _buffer_limit, int) \ duke@435: nonstatic_field(StubQueue, _queue_begin, int) \ duke@435: nonstatic_field(StubQueue, _queue_end, int) \ duke@435: nonstatic_field(StubQueue, _number_of_stubs, int) \ duke@435: nonstatic_field(InterpreterCodelet, _size, int) \ duke@435: nonstatic_field(InterpreterCodelet, _description, const char*) \ duke@435: nonstatic_field(InterpreterCodelet, _bytecode, Bytecodes::Code) \ duke@435: \ duke@435: /***********************************/ \ duke@435: /* StubRoutines (NOTE: incomplete) */ \ duke@435: /***********************************/ \ duke@435: \ duke@435: static_field(StubRoutines, _call_stub_return_address, address) \ duke@435: \ duke@435: /***************************************/ \ duke@435: /* PcDesc and other compiled code info */ \ duke@435: /***************************************/ \ duke@435: \ duke@435: nonstatic_field(PcDesc, _pc_offset, int) \ duke@435: nonstatic_field(PcDesc, _scope_decode_offset, int) \ kvn@1475: nonstatic_field(PcDesc, _obj_decode_offset, int) \ never@3108: nonstatic_field(PcDesc, _flags, int) \ duke@435: \ duke@435: /***************************************************/ \ duke@435: /* CodeBlobs (NOTE: incomplete, but only a little) */ \ duke@435: /***************************************************/ \ duke@435: \ never@3108: X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _sender_pc, address)) \ never@3108: X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _exact_sender_sp, intptr_t*)) \ never@3108: X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _sender_link, intptr_t*)) \ never@3108: X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _saved_args_base, intptr_t*)) \ never@3108: \ never@3108: static_field(SharedRuntime, _ricochet_blob, RicochetBlob*) \ never@3108: \ duke@435: nonstatic_field(CodeBlob, _name, const char*) \ duke@435: nonstatic_field(CodeBlob, _size, int) \ duke@435: nonstatic_field(CodeBlob, _header_size, int) \ duke@435: nonstatic_field(CodeBlob, _relocation_size, int) \ twisti@2103: nonstatic_field(CodeBlob, _content_offset, int) \ twisti@2103: nonstatic_field(CodeBlob, _code_offset, int) \ duke@435: nonstatic_field(CodeBlob, _frame_complete_offset, int) \ duke@435: nonstatic_field(CodeBlob, _data_offset, int) \ duke@435: nonstatic_field(CodeBlob, _frame_size, int) \ duke@435: nonstatic_field(CodeBlob, _oop_maps, OopMapSet*) \ duke@435: \ never@3108: nonstatic_field(RuntimeStub, _caller_must_gc_arguments, bool) \ never@3108: \ duke@435: /**************************************************/ \ duke@435: /* NMethods (NOTE: incomplete, but only a little) */ \ duke@435: /**************************************************/ \ duke@435: \ duke@435: nonstatic_field(nmethod, _method, methodOop) \ duke@435: nonstatic_field(nmethod, _entry_bci, int) \ jrose@1424: nonstatic_field(nmethod, _osr_link, nmethod*) \ jrose@1424: nonstatic_field(nmethod, _scavenge_root_link, nmethod*) \ jrose@1424: nonstatic_field(nmethod, _scavenge_root_state, jbyte) \ never@2920: nonstatic_field(nmethod, _state, unsigned char) \ duke@435: nonstatic_field(nmethod, _exception_offset, int) \ duke@435: nonstatic_field(nmethod, _deoptimize_offset, int) \ never@3108: nonstatic_field(nmethod, _deoptimize_mh_offset, int) \ duke@435: nonstatic_field(nmethod, _orig_pc_offset, int) \ duke@435: nonstatic_field(nmethod, _stub_offset, int) \ twisti@1918: nonstatic_field(nmethod, _consts_offset, int) \ twisti@1918: nonstatic_field(nmethod, _oops_offset, int) \ duke@435: nonstatic_field(nmethod, _scopes_data_offset, int) \ duke@435: nonstatic_field(nmethod, _scopes_pcs_offset, int) \ duke@435: nonstatic_field(nmethod, _dependencies_offset, int) \ duke@435: nonstatic_field(nmethod, _handler_table_offset, int) \ duke@435: nonstatic_field(nmethod, _nul_chk_table_offset, int) \ duke@435: nonstatic_field(nmethod, _nmethod_end_offset, int) \ duke@435: nonstatic_field(nmethod, _entry_point, address) \ duke@435: nonstatic_field(nmethod, _verified_entry_point, address) \ duke@435: nonstatic_field(nmethod, _osr_entry_point, address) \ duke@435: nonstatic_field(nmethod, _lock_count, jint) \ duke@435: nonstatic_field(nmethod, _stack_traversal_mark, long) \ never@2920: nonstatic_field(nmethod, _compile_id, int) \ never@2920: nonstatic_field(nmethod, _marked_for_deoptimization, bool) \ duke@435: \ never@3108: nonstatic_field(RicochetBlob, _bounce_offset, int) \ never@3108: nonstatic_field(RicochetBlob, _exception_offset, int) \ never@3108: \ duke@435: /********************************/ \ duke@435: /* JavaCalls (NOTE: incomplete) */ \ duke@435: /********************************/ \ duke@435: \ duke@435: nonstatic_field(JavaCallWrapper, _anchor, JavaFrameAnchor) \ duke@435: /********************************/ \ duke@435: /* JavaFrameAnchor (NOTE: incomplete) */ \ duke@435: /********************************/ \ duke@435: volatile_nonstatic_field(JavaFrameAnchor, _last_Java_sp, intptr_t*) \ duke@435: volatile_nonstatic_field(JavaFrameAnchor, _last_Java_pc, address) \ duke@435: \ duke@435: /******************************/ \ duke@435: /* Threads (NOTE: incomplete) */ \ duke@435: /******************************/ \ duke@435: \ duke@435: static_field(Threads, _thread_list, JavaThread*) \ duke@435: static_field(Threads, _number_of_threads, int) \ duke@435: static_field(Threads, _number_of_non_daemon_threads, int) \ duke@435: static_field(Threads, _return_code, int) \ duke@435: \ duke@435: volatile_nonstatic_field(Thread, _suspend_flags, uint32_t) \ duke@435: nonstatic_field(Thread, _active_handles, JNIHandleBlock*) \ duke@435: nonstatic_field(Thread, _tlab, ThreadLocalAllocBuffer) \ duke@435: nonstatic_field(Thread, _current_pending_monitor, ObjectMonitor*) \ duke@435: nonstatic_field(Thread, _current_pending_monitor_is_from_java, bool) \ duke@435: nonstatic_field(Thread, _current_waiting_monitor, ObjectMonitor*) \ duke@435: nonstatic_field(NamedThread, _name, char*) \ minqi@1554: nonstatic_field(NamedThread, _processed_thread, JavaThread*) \ duke@435: nonstatic_field(JavaThread, _next, JavaThread*) \ duke@435: nonstatic_field(JavaThread, _threadObj, oop) \ duke@435: nonstatic_field(JavaThread, _anchor, JavaFrameAnchor) \ duke@435: volatile_nonstatic_field(JavaThread, _thread_state, JavaThreadState) \ duke@435: nonstatic_field(JavaThread, _osthread, OSThread*) \ duke@435: nonstatic_field(JavaThread, _stack_base, address) \ duke@435: nonstatic_field(JavaThread, _stack_size, size_t) \ duke@435: \ duke@435: /************/ \ duke@435: /* OSThread */ \ duke@435: /************/ \ duke@435: \ dholmes@2668: volatile_nonstatic_field(OSThread, _interrupted, jint) \ duke@435: \ duke@435: /************************/ \ duke@435: /* OopMap and OopMapSet */ \ duke@435: /************************/ \ duke@435: \ duke@435: nonstatic_field(OopMap, _pc_offset, int) \ duke@435: nonstatic_field(OopMap, _omv_count, int) \ duke@435: nonstatic_field(OopMap, _omv_data_size, int) \ duke@435: nonstatic_field(OopMap, _omv_data, unsigned char*) \ duke@435: nonstatic_field(OopMap, _write_stream, CompressedWriteStream*) \ duke@435: nonstatic_field(OopMapSet, _om_count, int) \ duke@435: nonstatic_field(OopMapSet, _om_size, int) \ duke@435: nonstatic_field(OopMapSet, _om_data, OopMap**) \ duke@435: \ duke@435: /*********************************/ \ duke@435: /* JNIHandles and JNIHandleBlock */ \ duke@435: /*********************************/ \ duke@435: static_field(JNIHandles, _global_handles, JNIHandleBlock*) \ duke@435: static_field(JNIHandles, _weak_global_handles, JNIHandleBlock*) \ duke@435: static_field(JNIHandles, _deleted_handle, oop) \ duke@435: \ duke@435: unchecked_nonstatic_field(JNIHandleBlock, _handles, JNIHandleBlock::block_size_in_oops * sizeof(Oop)) /* Note: no type */ \ duke@435: nonstatic_field(JNIHandleBlock, _top, int) \ duke@435: nonstatic_field(JNIHandleBlock, _next, JNIHandleBlock*) \ duke@435: \ duke@435: /********************/ \ duke@435: /* CompressedStream */ \ duke@435: /********************/ \ duke@435: \ duke@435: nonstatic_field(CompressedStream, _buffer, u_char*) \ duke@435: nonstatic_field(CompressedStream, _position, int) \ duke@435: \ duke@435: /*********************************/ \ duke@435: /* VMRegImpl (NOTE: incomplete) */ \ duke@435: /*********************************/ \ duke@435: \ duke@435: static_field(VMRegImpl, regName[0], const char*) \ duke@435: static_field(VMRegImpl, stack0, VMReg) \ duke@435: \ duke@435: /*******************************/ \ duke@435: /* Runtime1 (NOTE: incomplete) */ \ duke@435: /*******************************/ \ duke@435: \ duke@435: unchecked_c1_static_field(Runtime1, _blobs, sizeof(Runtime1::_blobs)) /* NOTE: no type */ \ duke@435: \ duke@435: /************/ \ duke@435: /* Monitors */ \ duke@435: /************/ \ duke@435: \ duke@435: volatile_nonstatic_field(ObjectMonitor, _header, markOop) \ duke@435: unchecked_nonstatic_field(ObjectMonitor, _object, sizeof(void *)) /* NOTE: no type */ \ duke@435: unchecked_nonstatic_field(ObjectMonitor, _owner, sizeof(void *)) /* NOTE: no type */ \ duke@435: volatile_nonstatic_field(ObjectMonitor, _count, intptr_t) \ duke@435: volatile_nonstatic_field(ObjectMonitor, _waiters, intptr_t) \ duke@435: volatile_nonstatic_field(ObjectMonitor, _recursions, intptr_t) \ duke@435: nonstatic_field(ObjectMonitor, FreeNext, ObjectMonitor*) \ duke@435: volatile_nonstatic_field(BasicLock, _displaced_header, markOop) \ duke@435: nonstatic_field(BasicObjectLock, _lock, BasicLock) \ duke@435: nonstatic_field(BasicObjectLock, _obj, oop) \ duke@435: static_field(ObjectSynchronizer, gBlockList, ObjectMonitor*) \ duke@435: \ duke@435: /*********************/ \ duke@435: /* Matcher (C2 only) */ \ duke@435: /*********************/ \ duke@435: \ duke@435: unchecked_c2_static_field(Matcher, _regEncode, sizeof(Matcher::_regEncode)) /* NOTE: no type */ \ duke@435: \ duke@435: /*********************/ \ duke@435: /* -XX flags */ \ duke@435: /*********************/ \ duke@435: \ duke@435: nonstatic_field(Flag, type, const char*) \ duke@435: nonstatic_field(Flag, name, const char*) \ duke@435: unchecked_nonstatic_field(Flag, addr, sizeof(void*)) /* NOTE: no type */ \ duke@435: nonstatic_field(Flag, kind, const char*) \ duke@435: static_field(Flag, flags, Flag*) \ duke@435: static_field(Flag, numFlags, size_t) \ duke@435: \ duke@435: /*************************/ \ duke@435: /* JDK / VM version info */ \ duke@435: /*************************/ \ duke@435: \ duke@435: static_field(Abstract_VM_Version, _s_vm_release, const char*) \ duke@435: static_field(Abstract_VM_Version, _s_internal_vm_info_string, const char*) \ duke@435: static_field(Abstract_VM_Version, _vm_major_version, int) \ duke@435: static_field(Abstract_VM_Version, _vm_minor_version, int) \ duke@435: static_field(Abstract_VM_Version, _vm_build_number, int) \ duke@435: \ kamg@677: static_field(JDK_Version, _current, JDK_Version) \ kamg@677: nonstatic_field(JDK_Version, _partially_initialized, bool) \ kamg@677: nonstatic_field(JDK_Version, _major, unsigned char) \ duke@435: \ duke@435: \ duke@435: \ duke@435: /*************/ \ duke@435: /* Arguments */ \ duke@435: /*************/ \ duke@435: \ duke@435: static_field(Arguments, _jvm_flags_array, char**) \ duke@435: static_field(Arguments, _num_jvm_flags, int) \ duke@435: static_field(Arguments, _jvm_args_array, char**) \ duke@435: static_field(Arguments, _num_jvm_args, int) \ duke@435: static_field(Arguments, _java_command, char*) \ duke@435: \ never@2658: /*********************************/ \ never@2658: /* java_lang_Class fields */ \ never@2658: /*********************************/ \ never@2658: \ never@3137: static_field(java_lang_Class, _klass_offset, int) \ never@3137: static_field(java_lang_Class, _resolved_constructor_offset, int) \ never@3137: static_field(java_lang_Class, _array_klass_offset, int) \ never@3137: static_field(java_lang_Class, _oop_size_offset, int) \ never@3137: static_field(java_lang_Class, _static_oop_field_count_offset, int) \ duke@435: \ duke@435: /************************/ \ duke@435: /* Miscellaneous fields */ \ duke@435: /************************/ \ duke@435: \ duke@435: nonstatic_field(AccessFlags, _flags, jint) \ duke@435: nonstatic_field(elapsedTimer, _counter, jlong) \ duke@435: nonstatic_field(elapsedTimer, _active, bool) \ duke@435: nonstatic_field(InvocationCounter, _counter, unsigned int) duke@435: duke@435: /* NOTE that we do not use the last_entry() macro here; it is used */ duke@435: /* in vmStructs__.hpp's VM_STRUCTS_OS_CPU macro (and must */ duke@435: /* be present there) */ duke@435: duke@435: //-------------------------------------------------------------------------------- duke@435: // VM_TYPES duke@435: // duke@435: // This list must enumerate at least all of the types in the above duke@435: // list. For the types in the above list, the entry below must have duke@435: // exactly the same spacing since string comparisons are done in the duke@435: // code which verifies the consistency of these tables (in the debug duke@435: // build). duke@435: // duke@435: // In addition to the above types, this list is required to enumerate duke@435: // the JNI's java types, which are used to indicate the size of Java duke@435: // fields in this VM to the SA. Further, oop types are currently duke@435: // distinguished by name (i.e., ends with "oop") over in the SA. duke@435: // duke@435: // The declare_toplevel_type macro should be used to declare types duke@435: // which do not have a superclass. duke@435: // duke@435: // The declare_integer_type and declare_unsigned_integer_type macros duke@435: // are required in order to properly identify C integer types over in duke@435: // the SA. They should be used for any type which is otherwise opaque duke@435: // and which it is necessary to coerce into an integer value. This duke@435: // includes, for example, the type uintptr_t. Note that while they duke@435: // will properly identify the type's size regardless of the platform, duke@435: // since it is does not seem possible to deduce or check signedness at duke@435: // compile time using the pointer comparison tricks, it is currently duke@435: // required that the given types have the same signedness across all duke@435: // platforms. duke@435: // duke@435: // NOTE that there are platform-specific additions to this table in duke@435: // vmStructs__.hpp. duke@435: duke@435: #define VM_TYPES(declare_type, \ duke@435: declare_toplevel_type, \ duke@435: declare_oop_type, \ duke@435: declare_integer_type, \ duke@435: declare_unsigned_integer_type, \ duke@435: declare_c1_toplevel_type, \ duke@435: declare_c2_type, \ duke@435: declare_c2_toplevel_type, \ duke@435: last_entry) \ duke@435: \ duke@435: /*************************************************************/ \ duke@435: /* Java primitive types -- required by the SA implementation */ \ duke@435: /* in order to determine the size of Java fields in this VM */ \ duke@435: /* (the implementation looks up these names specifically) */ \ duke@435: /* NOTE: since we fetch these sizes from the remote VM, we */ \ duke@435: /* have a bootstrapping sequence during which it is not */ \ duke@435: /* valid to fetch Java values from the remote process, only */ \ duke@435: /* C integer values (of known size). NOTE also that we do */ \ duke@435: /* NOT include "Java unsigned" types like juint here; since */ \ duke@435: /* Java does not have unsigned primitive types, those can */ \ duke@435: /* not be mapped directly and are considered to be C integer */ \ duke@435: /* types in this system (see the "other types" section, */ \ duke@435: /* below.) */ \ duke@435: /*************************************************************/ \ duke@435: \ duke@435: declare_toplevel_type(jboolean) \ duke@435: declare_toplevel_type(jbyte) \ duke@435: declare_toplevel_type(jchar) \ duke@435: declare_toplevel_type(jdouble) \ duke@435: declare_toplevel_type(jfloat) \ duke@435: declare_toplevel_type(jint) \ duke@435: declare_toplevel_type(jlong) \ duke@435: declare_toplevel_type(jshort) \ duke@435: \ duke@435: /*********************************************************************/ \ duke@435: /* C integer types. User-defined typedefs (like "size_t" or */ \ duke@435: /* "intptr_t") are guaranteed to be present with the same names over */ \ duke@435: /* in the SA's type database. Names like "unsigned short" are not */ \ duke@435: /* guaranteed to be visible through the SA's type database lookup */ \ duke@435: /* mechanism, though they will have a Type object created for them */ \ duke@435: /* and are valid types for Fields. */ \ duke@435: /*********************************************************************/ \ duke@435: declare_integer_type(bool) \ duke@435: declare_integer_type(int) \ duke@435: declare_integer_type(long) \ duke@435: declare_integer_type(char) \ duke@435: declare_unsigned_integer_type(unsigned char) \ duke@435: declare_unsigned_integer_type(unsigned int) \ duke@435: declare_unsigned_integer_type(unsigned short) \ duke@435: declare_unsigned_integer_type(unsigned long) \ duke@435: /* The compiler thinks this is a different type than */ \ duke@435: /* unsigned short on Win32 */ \ duke@435: declare_unsigned_integer_type(u2) \ duke@435: declare_unsigned_integer_type(unsigned) \ duke@435: \ duke@435: /*****************************/ \ duke@435: /* C primitive pointer types */ \ duke@435: /*****************************/ \ duke@435: \ duke@435: declare_toplevel_type(int*) \ duke@435: declare_toplevel_type(char*) \ duke@435: declare_toplevel_type(char**) \ duke@435: declare_toplevel_type(const char*) \ duke@435: declare_toplevel_type(u_char*) \ duke@435: declare_toplevel_type(unsigned char*) \ duke@435: \ duke@435: /*******************************************************************/ \ duke@435: /* Types which it will be handy to have available over in the SA */ \ duke@435: /* in order to do platform-independent address -> integer coercion */ \ duke@435: /* (note: these will be looked up by name) */ \ duke@435: /*******************************************************************/ \ duke@435: \ duke@435: declare_unsigned_integer_type(size_t) \ dcubed@587: declare_integer_type(ssize_t) \ duke@435: declare_unsigned_integer_type(const size_t) \ duke@435: declare_integer_type(intx) \ duke@435: declare_integer_type(intptr_t) \ duke@435: declare_unsigned_integer_type(uintx) \ duke@435: declare_unsigned_integer_type(uintptr_t) \ duke@435: declare_unsigned_integer_type(uint32_t) \ duke@435: declare_unsigned_integer_type(uint64_t) \ duke@435: declare_integer_type(const int) \ duke@435: \ duke@435: /*******************************************************************************/ \ duke@435: /* OopDesc and Klass hierarchies (NOTE: missing methodDataOop-related classes) */ \ duke@435: /*******************************************************************************/ \ duke@435: \ duke@435: declare_toplevel_type(oopDesc) \ duke@435: declare_toplevel_type(Klass_vtbl) \ duke@435: declare_type(Klass, Klass_vtbl) \ duke@435: declare_type(arrayKlass, Klass) \ duke@435: declare_type(arrayKlassKlass, klassKlass) \ duke@435: declare_type(arrayOopDesc, oopDesc) \ coleenp@548: declare_type(compiledICHolderKlass, Klass) \ coleenp@548: declare_type(compiledICHolderOopDesc, oopDesc) \ coleenp@548: declare_type(constantPoolKlass, Klass) \ coleenp@548: declare_type(constantPoolOopDesc, oopDesc) \ coleenp@548: declare_type(constantPoolCacheKlass, Klass) \ coleenp@548: declare_type(constantPoolCacheOopDesc, oopDesc) \ duke@435: declare_type(instanceKlass, Klass) \ duke@435: declare_type(instanceKlassKlass, klassKlass) \ duke@435: declare_type(instanceOopDesc, oopDesc) \ never@2693: declare_type(instanceMirrorKlass, instanceKlass) \ duke@435: declare_type(instanceRefKlass, instanceKlass) \ duke@435: declare_type(klassKlass, Klass) \ duke@435: declare_type(klassOopDesc, oopDesc) \ duke@435: declare_type(markOopDesc, oopDesc) \ duke@435: declare_type(methodDataKlass, Klass) \ duke@435: declare_type(methodDataOopDesc, oopDesc) \ duke@435: declare_type(methodKlass, Klass) \ duke@435: declare_type(constMethodKlass, Klass) \ duke@435: declare_type(methodOopDesc, oopDesc) \ duke@435: declare_type(objArrayKlass, arrayKlass) \ duke@435: declare_type(objArrayKlassKlass, arrayKlassKlass) \ duke@435: declare_type(objArrayOopDesc, arrayOopDesc) \ duke@435: declare_type(constMethodOopDesc, oopDesc) \ duke@435: declare_type(typeArrayKlass, arrayKlass) \ duke@435: declare_type(typeArrayKlassKlass, arrayKlassKlass) \ duke@435: declare_type(typeArrayOopDesc, arrayOopDesc) \ coleenp@2497: declare_toplevel_type(Symbol) \ coleenp@2497: declare_toplevel_type(Symbol*) \ duke@435: \ duke@435: /********/ \ duke@435: /* Oops */ \ duke@435: /********/ \ duke@435: \ duke@435: declare_oop_type(constantPoolOop) \ duke@435: declare_oop_type(constantPoolCacheOop) \ duke@435: declare_oop_type(klassOop) \ duke@435: declare_oop_type(markOop) \ duke@435: declare_oop_type(methodOop) \ coleenp@548: declare_oop_type(methodDataOop) \ duke@435: declare_oop_type(objArrayOop) \ duke@435: declare_oop_type(oop) \ coleenp@548: declare_oop_type(narrowOop) \ coleenp@548: declare_oop_type(wideKlassOop) \ duke@435: declare_oop_type(constMethodOop) \ duke@435: declare_oop_type(typeArrayOop) \ duke@435: \ duke@435: /*************************************/ \ duke@435: /* MethodOop-related data structures */ \ duke@435: /*************************************/ \ duke@435: \ duke@435: declare_toplevel_type(CheckedExceptionElement) \ duke@435: declare_toplevel_type(LocalVariableTableElement) \ duke@435: \ duke@435: /******************************************/ \ duke@435: /* Generation and space hierarchies */ \ duke@435: /* (needed for run-time type information) */ \ duke@435: /******************************************/ \ duke@435: \ duke@435: declare_toplevel_type(CollectedHeap) \ duke@435: declare_type(SharedHeap, CollectedHeap) \ duke@435: declare_type(GenCollectedHeap, SharedHeap) \ duke@435: declare_toplevel_type(Generation) \ duke@435: declare_type(DefNewGeneration, Generation) \ duke@435: declare_type(CardGeneration, Generation) \ duke@435: declare_type(OneContigSpaceCardGeneration, CardGeneration) \ duke@435: declare_type(TenuredGeneration, OneContigSpaceCardGeneration) \ duke@435: declare_type(CompactingPermGenGen, OneContigSpaceCardGeneration) \ duke@435: declare_toplevel_type(Space) \ duke@435: declare_toplevel_type(BitMap) \ duke@435: declare_type(CompactibleSpace, Space) \ duke@435: declare_type(ContiguousSpace, CompactibleSpace) \ duke@435: declare_type(EdenSpace, ContiguousSpace) \ duke@435: declare_type(OffsetTableContigSpace, ContiguousSpace) \ duke@435: declare_type(TenuredSpace, OffsetTableContigSpace) \ duke@435: declare_type(ContigPermSpace, OffsetTableContigSpace) \ duke@435: declare_toplevel_type(PermGen) \ duke@435: declare_type(CompactingPermGen, PermGen) \ duke@435: declare_toplevel_type(BarrierSet) \ duke@435: declare_type(ModRefBarrierSet, BarrierSet) \ duke@435: declare_type(CardTableModRefBS, ModRefBarrierSet) \ ysr@777: declare_type(CardTableModRefBSForCTRS, CardTableModRefBS) \ duke@435: declare_toplevel_type(GenRemSet) \ duke@435: declare_type(CardTableRS, GenRemSet) \ duke@435: declare_toplevel_type(BlockOffsetSharedArray) \ duke@435: declare_toplevel_type(BlockOffsetTable) \ duke@435: declare_type(BlockOffsetArray, BlockOffsetTable) \ duke@435: declare_type(BlockOffsetArrayContigSpace, BlockOffsetArray) \ duke@435: declare_type(BlockOffsetArrayNonContigSpace, BlockOffsetArray) \ duke@435: \ duke@435: /* Miscellaneous other GC types */ \ duke@435: \ duke@435: declare_toplevel_type(ageTable) \ duke@435: declare_toplevel_type(Generation::StatRecord) \ duke@435: declare_toplevel_type(GenerationSpec) \ duke@435: declare_toplevel_type(HeapWord) \ duke@435: declare_toplevel_type(MemRegion) \ duke@435: declare_toplevel_type(const MemRegion) \ duke@435: declare_toplevel_type(PermanentGenerationSpec) \ duke@435: declare_toplevel_type(ThreadLocalAllocBuffer) \ duke@435: declare_toplevel_type(VirtualSpace) \ duke@435: declare_toplevel_type(WaterMark) \ duke@435: \ duke@435: /* Pointers to Garbage Collection types */ \ duke@435: \ duke@435: declare_toplevel_type(BarrierSet*) \ duke@435: declare_toplevel_type(BlockOffsetSharedArray*) \ duke@435: declare_toplevel_type(GenRemSet*) \ duke@435: declare_toplevel_type(CardTableRS*) \ ysr@777: declare_toplevel_type(CardTableModRefBS*) \ ysr@777: declare_toplevel_type(CardTableModRefBS**) \ ysr@777: declare_toplevel_type(CardTableModRefBSForCTRS*) \ ysr@777: declare_toplevel_type(CardTableModRefBSForCTRS**) \ duke@435: declare_toplevel_type(CollectedHeap*) \ duke@435: declare_toplevel_type(ContiguousSpace*) \ duke@435: declare_toplevel_type(DefNewGeneration*) \ duke@435: declare_toplevel_type(EdenSpace*) \ duke@435: declare_toplevel_type(GenCollectedHeap*) \ duke@435: declare_toplevel_type(Generation*) \ duke@435: declare_toplevel_type(GenerationSpec**) \ duke@435: declare_toplevel_type(HeapWord*) \ duke@435: declare_toplevel_type(MemRegion*) \ duke@435: declare_toplevel_type(OffsetTableContigSpace*) \ duke@435: declare_toplevel_type(OneContigSpaceCardGeneration*) \ duke@435: declare_toplevel_type(PermGen*) \ duke@435: declare_toplevel_type(Space*) \ duke@435: declare_toplevel_type(ThreadLocalAllocBuffer*) \ duke@435: \ duke@435: /************************/ \ duke@435: /* PerfMemory - jvmstat */ \ duke@435: /************************/ \ duke@435: \ duke@435: declare_toplevel_type(PerfDataPrologue) \ duke@435: declare_toplevel_type(PerfDataPrologue*) \ duke@435: declare_toplevel_type(PerfDataEntry) \ duke@435: declare_toplevel_type(PerfMemory) \ duke@435: \ duke@435: /*********************************/ \ duke@435: /* SymbolTable, SystemDictionary */ \ duke@435: /*********************************/ \ duke@435: \ duke@435: declare_toplevel_type(BasicHashtable) \ coleenp@2497: declare_type(Hashtable, BasicHashtable) \ coleenp@2497: declare_type(SymbolTable, Hashtable) \ coleenp@2497: declare_type(StringTable, Hashtable) \ coleenp@2497: declare_type(LoaderConstraintTable, Hashtable) \ coleenp@2497: declare_type(TwoOopHashtable, Hashtable) \ coleenp@2497: declare_type(Dictionary, TwoOopHashtable) \ coleenp@2497: declare_type(PlaceholderTable, TwoOopHashtable) \ duke@435: declare_toplevel_type(BasicHashtableEntry) \ coleenp@2497: declare_type(HashtableEntry, BasicHashtableEntry) \ coleenp@2497: declare_type(DictionaryEntry, HashtableEntry) \ coleenp@2497: declare_type(PlaceholderEntry, HashtableEntry) \ coleenp@2497: declare_type(LoaderConstraintEntry, HashtableEntry) \ duke@435: declare_toplevel_type(HashtableBucket) \ duke@435: declare_toplevel_type(SystemDictionary) \ duke@435: declare_toplevel_type(ProtectionDomainEntry) \ duke@435: \ duke@435: /***********************************************************/ \ duke@435: /* Thread hierarchy (needed for run-time type information) */ \ duke@435: /***********************************************************/ \ duke@435: \ duke@435: declare_toplevel_type(Threads) \ duke@435: declare_toplevel_type(ThreadShadow) \ duke@435: declare_type(Thread, ThreadShadow) \ duke@435: declare_type(NamedThread, Thread) \ duke@435: declare_type(WatcherThread, Thread) \ duke@435: declare_type(JavaThread, Thread) \ duke@435: declare_type(JvmtiAgentThread, JavaThread) \ kamg@2511: declare_type(ServiceThread, JavaThread) \ duke@435: declare_type(CompilerThread, JavaThread) \ duke@435: declare_toplevel_type(OSThread) \ duke@435: declare_toplevel_type(JavaFrameAnchor) \ duke@435: \ duke@435: /***************/ \ duke@435: /* Interpreter */ \ duke@435: /***************/ \ duke@435: \ duke@435: declare_toplevel_type(AbstractInterpreter) \ duke@435: \ duke@435: /*********/ \ duke@435: /* Stubs */ \ duke@435: /*********/ \ duke@435: \ duke@435: declare_toplevel_type(StubQueue) \ duke@435: declare_toplevel_type(StubRoutines) \ duke@435: declare_toplevel_type(Stub) \ duke@435: declare_type(InterpreterCodelet, Stub) \ duke@435: \ duke@435: /*************/ \ duke@435: /* JavaCalls */ \ duke@435: /*************/ \ duke@435: \ duke@435: declare_toplevel_type(JavaCallWrapper) \ duke@435: \ duke@435: /*************/ \ duke@435: /* CodeCache */ \ duke@435: /*************/ \ duke@435: \ duke@435: declare_toplevel_type(CodeCache) \ duke@435: \ duke@435: /************/ \ duke@435: /* CodeHeap */ \ duke@435: /************/ \ duke@435: \ duke@435: declare_toplevel_type(CodeHeap) \ duke@435: declare_toplevel_type(CodeHeap*) \ duke@435: declare_toplevel_type(HeapBlock) \ duke@435: declare_toplevel_type(HeapBlock::Header) \ duke@435: declare_type(FreeBlock, HeapBlock) \ duke@435: \ duke@435: /*************************************************************/ \ duke@435: /* CodeBlob hierarchy (needed for run-time type information) */ \ duke@435: /*************************************************************/ \ duke@435: \ never@3108: declare_toplevel_type(SharedRuntime) \ never@3108: X86_ONLY(declare_toplevel_type(MethodHandles::RicochetFrame)) \ never@3108: \ duke@435: declare_toplevel_type(CodeBlob) \ never@3108: declare_type(BufferBlob, CodeBlob) \ never@3108: declare_type(AdapterBlob, BufferBlob) \ never@3108: declare_type(MethodHandlesAdapterBlob, BufferBlob) \ never@3108: declare_type(nmethod, CodeBlob) \ never@3108: declare_type(RuntimeStub, CodeBlob) \ never@3108: declare_type(SingletonBlob, CodeBlob) \ never@3108: declare_type(SafepointBlob, SingletonBlob) \ never@3108: declare_type(DeoptimizationBlob, SingletonBlob) \ never@3108: declare_type(RicochetBlob, SingletonBlob) \ never@3108: declare_c2_type(ExceptionBlob, SingletonBlob) \ never@3108: declare_c2_type(UncommonTrapBlob, CodeBlob) \ duke@435: \ duke@435: /***************************************/ \ duke@435: /* PcDesc and other compiled code info */ \ duke@435: /***************************************/ \ duke@435: \ duke@435: declare_toplevel_type(PcDesc) \ duke@435: \ duke@435: /************************/ \ duke@435: /* OopMap and OopMapSet */ \ duke@435: /************************/ \ duke@435: \ duke@435: declare_toplevel_type(OopMap) \ duke@435: declare_toplevel_type(OopMapSet) \ duke@435: \ duke@435: /********************/ \ duke@435: /* CompressedStream */ \ duke@435: /********************/ \ duke@435: \ duke@435: declare_toplevel_type(CompressedStream) \ duke@435: \ duke@435: /**************/ \ duke@435: /* VMRegImpl */ \ duke@435: /**************/ \ duke@435: \ duke@435: declare_toplevel_type(VMRegImpl) \ duke@435: \ duke@435: /*********************************/ \ duke@435: /* JNIHandles and JNIHandleBlock */ \ duke@435: /*********************************/ \ duke@435: \ duke@435: declare_toplevel_type(JNIHandles) \ duke@435: declare_toplevel_type(JNIHandleBlock) \ duke@435: \ duke@435: /**********************/ \ duke@435: /* Runtime1 (C1 only) */ \ duke@435: /**********************/ \ duke@435: \ duke@435: declare_c1_toplevel_type(Runtime1) \ duke@435: \ duke@435: /************/ \ duke@435: /* Monitors */ \ duke@435: /************/ \ duke@435: \ duke@435: declare_toplevel_type(ObjectMonitor) \ duke@435: declare_toplevel_type(ObjectSynchronizer) \ duke@435: declare_toplevel_type(BasicLock) \ duke@435: declare_toplevel_type(BasicObjectLock) \ duke@435: \ duke@435: /*********************/ \ duke@435: /* Matcher (C2 only) */ \ duke@435: /*********************/ \ duke@435: \ duke@435: /* NOTE: this is not really a toplevel type, but we only need */ \ duke@435: /* this one -- FIXME later if necessary */ \ duke@435: declare_c2_toplevel_type(Matcher) \ duke@435: \ duke@435: /*********************/ \ duke@435: /* Adapter Blob Entries */ \ duke@435: /*********************/ \ duke@435: declare_toplevel_type(AdapterHandlerEntry) \ duke@435: declare_toplevel_type(AdapterHandlerEntry*) \ duke@435: \ duke@435: /********************/ \ duke@435: /* -XX flags */ \ duke@435: /********************/ \ duke@435: \ duke@435: declare_toplevel_type(Flag) \ duke@435: declare_toplevel_type(Flag*) \ duke@435: \ duke@435: /********************/ \ duke@435: /* JDK/VM version */ \ duke@435: /********************/ \ duke@435: \ duke@435: declare_toplevel_type(Abstract_VM_Version) \ duke@435: declare_toplevel_type(JDK_Version) \ duke@435: \ duke@435: /*************/ \ duke@435: /* Arguments */ \ duke@435: /*************/ \ duke@435: \ duke@435: declare_toplevel_type(Arguments) \ duke@435: \ duke@435: /***************/ \ duke@435: /* Other types */ \ duke@435: /***************/ \ duke@435: \ duke@435: /* all enum types */ \ duke@435: \ duke@435: declare_integer_type(Bytecodes::Code) \ duke@435: declare_integer_type(Generation::Name) \ duke@435: declare_integer_type(instanceKlass::ClassState) \ duke@435: declare_integer_type(JavaThreadState) \ duke@435: declare_integer_type(Location::Type) \ duke@435: declare_integer_type(Location::Where) \ duke@435: declare_integer_type(PermGen::Name) \ duke@435: \ duke@435: declare_integer_type(AccessFlags) /* FIXME: wrong type (not integer) */\ duke@435: declare_toplevel_type(address) /* FIXME: should this be an integer type? */\ duke@435: declare_toplevel_type(BreakpointInfo) \ duke@435: declare_toplevel_type(BreakpointInfo*) \ duke@435: declare_toplevel_type(CodeBlob*) \ duke@435: declare_toplevel_type(CompressedWriteStream*) \ duke@435: declare_toplevel_type(ConstantPoolCacheEntry) \ duke@435: declare_toplevel_type(elapsedTimer) \ duke@435: declare_toplevel_type(intptr_t*) \ duke@435: declare_unsigned_integer_type(InvocationCounter) /* FIXME: wrong type (not integer) */ \ duke@435: declare_toplevel_type(JavaThread*) \ never@2658: declare_toplevel_type(java_lang_Class) \ duke@435: declare_toplevel_type(jbyte*) \ duke@435: declare_toplevel_type(jbyte**) \ duke@435: declare_toplevel_type(jint*) \ duke@435: declare_toplevel_type(jniIdMapBase*) \ duke@435: declare_unsigned_integer_type(juint) \ duke@435: declare_unsigned_integer_type(julong) \ duke@435: declare_toplevel_type(JNIHandleBlock*) \ duke@435: declare_toplevel_type(JNIid) \ duke@435: declare_toplevel_type(JNIid*) \ duke@435: declare_toplevel_type(jmethodID*) \ duke@435: declare_toplevel_type(Mutex*) \ duke@435: declare_toplevel_type(nmethod*) \ duke@435: declare_toplevel_type(ObjectMonitor*) \ duke@435: declare_toplevel_type(oop*) \ duke@435: declare_toplevel_type(OopMap**) \ duke@435: declare_toplevel_type(OopMapCache*) \ duke@435: declare_toplevel_type(OopMapSet*) \ duke@435: declare_toplevel_type(VMReg) \ duke@435: declare_toplevel_type(OSThread*) \ duke@435: declare_integer_type(ReferenceType) \ duke@435: declare_toplevel_type(StubQueue*) \ duke@435: declare_toplevel_type(Thread*) \ duke@435: declare_toplevel_type(Universe) duke@435: duke@435: /* NOTE that we do not use the last_entry() macro here; it is used */ duke@435: /* in vmStructs__.hpp's VM_TYPES_OS_CPU macro (and must be */ duke@435: /* present there) */ duke@435: duke@435: //-------------------------------------------------------------------------------- duke@435: // VM_INT_CONSTANTS duke@435: // duke@435: // This table contains integer constants required over in the duke@435: // serviceability agent. The "declare_constant" macro is used for all duke@435: // enums, etc., while "declare_preprocessor_constant" must be used for duke@435: // all #defined constants. duke@435: duke@435: #define VM_INT_CONSTANTS(declare_constant, \ duke@435: declare_preprocessor_constant, \ duke@435: declare_c1_constant, \ duke@435: declare_c2_constant, \ duke@435: declare_c2_preprocessor_constant, \ duke@435: last_entry) \ duke@435: \ duke@435: /******************/ \ duke@435: /* Useful globals */ \ duke@435: /******************/ \ duke@435: \ duke@435: declare_constant(UseTLAB) \ duke@435: \ duke@435: /**************/ \ duke@435: /* Stack bias */ \ duke@435: /**************/ \ duke@435: \ duke@435: declare_preprocessor_constant("STACK_BIAS", STACK_BIAS) \ duke@435: \ duke@435: /****************/ \ duke@435: /* Object sizes */ \ duke@435: /****************/ \ duke@435: \ coleenp@548: declare_constant(oopSize) \ duke@435: declare_constant(LogBytesPerWord) \ duke@435: declare_constant(BytesPerLong) \ duke@435: \ duke@435: /********************************************/ \ duke@435: /* Generation and Space Hierarchy Constants */ \ duke@435: /********************************************/ \ duke@435: \ duke@435: declare_constant(ageTable::table_size) \ duke@435: \ duke@435: declare_constant(BarrierSet::ModRef) \ duke@435: declare_constant(BarrierSet::CardTableModRef) \ duke@435: declare_constant(BarrierSet::Other) \ duke@435: \ duke@435: declare_constant(BlockOffsetSharedArray::LogN) \ duke@435: declare_constant(BlockOffsetSharedArray::LogN_words) \ duke@435: declare_constant(BlockOffsetSharedArray::N_bytes) \ duke@435: declare_constant(BlockOffsetSharedArray::N_words) \ duke@435: \ duke@435: declare_constant(BlockOffsetArray::N_words) \ duke@435: \ duke@435: declare_constant(CardTableModRefBS::clean_card) \ duke@435: declare_constant(CardTableModRefBS::last_card) \ duke@435: declare_constant(CardTableModRefBS::dirty_card) \ duke@435: declare_constant(CardTableModRefBS::Precise) \ duke@435: declare_constant(CardTableModRefBS::ObjHeadPreciseArray) \ duke@435: declare_constant(CardTableModRefBS::card_shift) \ duke@435: declare_constant(CardTableModRefBS::card_size) \ duke@435: declare_constant(CardTableModRefBS::card_size_in_words) \ duke@435: \ duke@435: declare_constant(CardTableRS::youngergen_card) \ duke@435: \ duke@435: declare_constant(CollectedHeap::Abstract) \ duke@435: declare_constant(CollectedHeap::SharedHeap) \ duke@435: declare_constant(CollectedHeap::GenCollectedHeap) \ duke@435: \ duke@435: declare_constant(GenCollectedHeap::max_gens) \ duke@435: \ duke@435: /* constants from Generation::Name enum */ \ duke@435: \ duke@435: declare_constant(Generation::DefNew) \ duke@435: declare_constant(Generation::MarkSweepCompact) \ duke@435: declare_constant(Generation::Other) \ duke@435: \ duke@435: declare_constant(Generation::LogOfGenGrain) \ duke@435: declare_constant(Generation::GenGrain) \ duke@435: \ duke@435: declare_constant(HeapWordSize) \ duke@435: declare_constant(LogHeapWordSize) \ duke@435: \ duke@435: /* constants from PermGen::Name enum */ \ duke@435: \ duke@435: declare_constant(PermGen::MarkSweepCompact) \ duke@435: declare_constant(PermGen::MarkSweep) \ duke@435: \ duke@435: /************************/ \ duke@435: /* PerfMemory - jvmstat */ \ duke@435: /************************/ \ duke@435: \ duke@435: declare_preprocessor_constant("PERFDATA_MAJOR_VERSION", PERFDATA_MAJOR_VERSION) \ duke@435: declare_preprocessor_constant("PERFDATA_MINOR_VERSION", PERFDATA_MINOR_VERSION) \ duke@435: declare_preprocessor_constant("PERFDATA_BIG_ENDIAN", PERFDATA_BIG_ENDIAN) \ duke@435: declare_preprocessor_constant("PERFDATA_LITTLE_ENDIAN", PERFDATA_LITTLE_ENDIAN) \ duke@435: \ duke@435: /***************/ \ duke@435: /* SymbolTable */ \ duke@435: /***************/ \ duke@435: \ duke@435: declare_constant(SymbolTable::symbol_table_size) \ duke@435: \ duke@435: /********************/ \ duke@435: /* SystemDictionary */ \ duke@435: /********************/ \ duke@435: \ duke@435: declare_constant(SystemDictionary::_loader_constraint_size) \ duke@435: declare_constant(SystemDictionary::_nof_buckets) \ duke@435: \ duke@435: /***********************************/ \ duke@435: /* LoaderConstraintTable constants */ \ duke@435: /***********************************/ \ duke@435: \ duke@435: declare_constant(LoaderConstraintTable::_loader_constraint_size) \ duke@435: declare_constant(LoaderConstraintTable::_nof_buckets) \ duke@435: \ duke@435: /************************************************************/ \ duke@435: /* HotSpot specific JVM_ACC constants from global anon enum */ \ duke@435: /************************************************************/ \ duke@435: \ duke@435: declare_constant(JVM_ACC_WRITTEN_FLAGS) \ duke@435: declare_constant(JVM_ACC_MONITOR_MATCH) \ duke@435: declare_constant(JVM_ACC_HAS_MONITOR_BYTECODES) \ duke@435: declare_constant(JVM_ACC_HAS_LOOPS) \ duke@435: declare_constant(JVM_ACC_LOOPS_FLAG_INIT) \ duke@435: declare_constant(JVM_ACC_QUEUED) \ duke@435: declare_constant(JVM_ACC_NOT_OSR_COMPILABLE) \ duke@435: declare_constant(JVM_ACC_HAS_LINE_NUMBER_TABLE) \ duke@435: declare_constant(JVM_ACC_HAS_CHECKED_EXCEPTIONS) \ duke@435: declare_constant(JVM_ACC_HAS_JSRS) \ duke@435: declare_constant(JVM_ACC_IS_OLD) \ duke@435: declare_constant(JVM_ACC_IS_OBSOLETE) \ duke@435: declare_constant(JVM_ACC_IS_PREFIXED_NATIVE) \ duke@435: declare_constant(JVM_ACC_HAS_MIRANDA_METHODS) \ duke@435: declare_constant(JVM_ACC_HAS_VANILLA_CONSTRUCTOR) \ duke@435: declare_constant(JVM_ACC_HAS_FINALIZER) \ duke@435: declare_constant(JVM_ACC_IS_CLONEABLE) \ duke@435: declare_constant(JVM_ACC_HAS_LOCAL_VARIABLE_TABLE) \ duke@435: declare_constant(JVM_ACC_PROMOTED_FLAGS) \ duke@435: declare_constant(JVM_ACC_FIELD_ACCESS_WATCHED) \ duke@435: declare_constant(JVM_ACC_FIELD_MODIFICATION_WATCHED) \ duke@435: \ duke@435: /*****************************/ \ duke@435: /* Thread::SuspendFlags enum */ \ duke@435: /*****************************/ \ duke@435: \ duke@435: declare_constant(Thread::_external_suspend) \ duke@435: declare_constant(Thread::_ext_suspended) \ duke@435: declare_constant(Thread::_has_async_exception) \ duke@435: \ duke@435: /*******************/ \ duke@435: /* JavaThreadState */ \ duke@435: /*******************/ \ duke@435: \ duke@435: declare_constant(_thread_uninitialized) \ duke@435: declare_constant(_thread_new) \ duke@435: declare_constant(_thread_new_trans) \ duke@435: declare_constant(_thread_in_native) \ duke@435: declare_constant(_thread_in_native_trans) \ duke@435: declare_constant(_thread_in_vm) \ duke@435: declare_constant(_thread_in_vm_trans) \ duke@435: declare_constant(_thread_in_Java) \ duke@435: declare_constant(_thread_in_Java_trans) \ duke@435: declare_constant(_thread_blocked) \ duke@435: declare_constant(_thread_blocked_trans) \ duke@435: \ duke@435: /******************************/ \ duke@435: /* Klass misc. enum constants */ \ duke@435: /******************************/ \ duke@435: \ duke@435: declare_constant(Klass::_primary_super_limit) \ duke@435: declare_constant(Klass::_lh_instance_slow_path_bit) \ duke@435: declare_constant(Klass::_lh_log2_element_size_shift) \ duke@435: declare_constant(Klass::_lh_element_type_shift) \ duke@435: declare_constant(Klass::_lh_header_size_shift) \ duke@435: declare_constant(Klass::_lh_array_tag_shift) \ duke@435: declare_constant(Klass::_lh_array_tag_type_value) \ duke@435: declare_constant(Klass::_lh_array_tag_obj_value) \ duke@435: \ duke@435: /********************************/ \ duke@435: /* constMethodOopDesc anon-enum */ \ duke@435: /********************************/ \ duke@435: \ duke@435: declare_constant(constMethodOopDesc::_has_linenumber_table) \ duke@435: declare_constant(constMethodOopDesc::_has_checked_exceptions) \ duke@435: declare_constant(constMethodOopDesc::_has_localvariable_table) \ duke@435: \ duke@435: /*************************************/ \ never@3137: /* instanceKlass enum */ \ duke@435: /*************************************/ \ duke@435: \ duke@435: declare_constant(instanceKlass::implementors_limit) \ duke@435: \ never@3137: /*************************************/ \ never@3137: /* FieldInfo FieldOffset enum */ \ never@3137: /*************************************/ \ never@3137: \ never@3137: declare_constant(FieldInfo::access_flags_offset) \ never@3137: declare_constant(FieldInfo::name_index_offset) \ never@3137: declare_constant(FieldInfo::signature_index_offset) \ never@3137: declare_constant(FieldInfo::initval_index_offset) \ never@3137: declare_constant(FieldInfo::low_offset) \ never@3137: declare_constant(FieldInfo::high_offset) \ never@3137: declare_constant(FieldInfo::generic_signature_offset) \ never@3137: declare_constant(FieldInfo::field_slots) \ never@3137: \ duke@435: /************************************************/ \ duke@435: /* instanceKlass InnerClassAttributeOffset enum */ \ duke@435: /************************************************/ \ duke@435: \ duke@435: declare_constant(instanceKlass::inner_class_inner_class_info_offset) \ duke@435: declare_constant(instanceKlass::inner_class_outer_class_info_offset) \ duke@435: declare_constant(instanceKlass::inner_class_inner_name_offset) \ duke@435: declare_constant(instanceKlass::inner_class_access_flags_offset) \ duke@435: declare_constant(instanceKlass::inner_class_next_offset) \ duke@435: \ duke@435: /*********************************/ \ duke@435: /* instanceKlass ClassState enum */ \ duke@435: /*********************************/ \ duke@435: \ duke@435: declare_constant(instanceKlass::unparsable_by_gc) \ duke@435: declare_constant(instanceKlass::allocated) \ duke@435: declare_constant(instanceKlass::loaded) \ duke@435: declare_constant(instanceKlass::linked) \ duke@435: declare_constant(instanceKlass::being_initialized) \ duke@435: declare_constant(instanceKlass::fully_initialized) \ duke@435: declare_constant(instanceKlass::initialization_error) \ duke@435: \ duke@435: /*********************************/ \ coleenp@2497: /* Symbol* - symbol max length */ \ duke@435: /*********************************/ \ duke@435: \ coleenp@2497: declare_constant(Symbol::max_symbol_length) \ duke@435: \ jrose@2268: /*************************************************/ \ jrose@2268: /* constantPoolOop layout enum for InvokeDynamic */ \ jrose@2268: /*************************************************/ \ jrose@2268: \ jrose@2268: declare_constant(constantPoolOopDesc::_indy_bsm_offset) \ jrose@2268: declare_constant(constantPoolOopDesc::_indy_argc_offset) \ jrose@2268: declare_constant(constantPoolOopDesc::_indy_argv_offset) \ jrose@2268: \ duke@435: /*********************************************/ \ duke@435: /* ConstantPoolCacheEntry FlagBitValues enum */ \ duke@435: /*********************************************/ \ duke@435: \ duke@435: declare_constant(ConstantPoolCacheEntry::hotSwapBit) \ duke@435: declare_constant(ConstantPoolCacheEntry::methodInterface) \ duke@435: declare_constant(ConstantPoolCacheEntry::volatileField) \ duke@435: declare_constant(ConstantPoolCacheEntry::vfinalMethod) \ duke@435: declare_constant(ConstantPoolCacheEntry::finalField) \ duke@435: \ duke@435: /******************************************/ \ duke@435: /* ConstantPoolCacheEntry FlagValues enum */ \ duke@435: /******************************************/ \ duke@435: \ duke@435: declare_constant(ConstantPoolCacheEntry::tosBits) \ duke@435: \ duke@435: /***************************************/ \ duke@435: /* java_lang_Thread::ThreadStatus enum */ \ duke@435: /***************************************/ \ duke@435: \ duke@435: declare_constant(java_lang_Thread::NEW) \ duke@435: declare_constant(java_lang_Thread::RUNNABLE) \ duke@435: declare_constant(java_lang_Thread::SLEEPING) \ duke@435: declare_constant(java_lang_Thread::IN_OBJECT_WAIT) \ duke@435: declare_constant(java_lang_Thread::IN_OBJECT_WAIT_TIMED) \ duke@435: declare_constant(java_lang_Thread::PARKED) \ duke@435: declare_constant(java_lang_Thread::PARKED_TIMED) \ duke@435: declare_constant(java_lang_Thread::BLOCKED_ON_MONITOR_ENTER) \ duke@435: declare_constant(java_lang_Thread::TERMINATED) \ duke@435: \ duke@435: /******************************/ \ duke@435: /* Debug info */ \ duke@435: /******************************/ \ duke@435: \ duke@435: declare_constant(Location::OFFSET_MASK) \ duke@435: declare_constant(Location::OFFSET_SHIFT) \ duke@435: declare_constant(Location::TYPE_MASK) \ duke@435: declare_constant(Location::TYPE_SHIFT) \ duke@435: declare_constant(Location::WHERE_MASK) \ duke@435: declare_constant(Location::WHERE_SHIFT) \ duke@435: \ duke@435: /* constants from Location::Type enum */ \ duke@435: \ duke@435: declare_constant(Location::normal) \ duke@435: declare_constant(Location::oop) \ kvn@766: declare_constant(Location::narrowoop) \ duke@435: declare_constant(Location::int_in_long) \ duke@435: declare_constant(Location::lng) \ duke@435: declare_constant(Location::float_in_dbl) \ duke@435: declare_constant(Location::dbl) \ duke@435: declare_constant(Location::addr) \ duke@435: declare_constant(Location::invalid) \ duke@435: \ duke@435: /* constants from Location::Where enum */ \ duke@435: \ duke@435: declare_constant(Location::on_stack) \ duke@435: declare_constant(Location::in_register) \ duke@435: \ duke@435: /*********************/ \ duke@435: /* Matcher (C2 only) */ \ duke@435: /*********************/ \ duke@435: \ duke@435: declare_c2_preprocessor_constant("Matcher::interpreter_frame_pointer_reg", Matcher::interpreter_frame_pointer_reg()) \ duke@435: \ duke@435: /*********************************************/ \ duke@435: /* MethodCompilation (globalDefinitions.hpp) */ \ duke@435: /*********************************************/ \ duke@435: \ duke@435: declare_constant(InvocationEntryBci) \ duke@435: declare_constant(InvalidOSREntryBci) \ duke@435: \ duke@435: /***************/ \ duke@435: /* OopMapValue */ \ duke@435: /***************/ \ duke@435: \ duke@435: declare_constant(OopMapValue::type_bits) \ duke@435: declare_constant(OopMapValue::register_bits) \ duke@435: declare_constant(OopMapValue::type_shift) \ duke@435: declare_constant(OopMapValue::register_shift) \ duke@435: declare_constant(OopMapValue::type_mask) \ duke@435: declare_constant(OopMapValue::type_mask_in_place) \ duke@435: declare_constant(OopMapValue::register_mask) \ duke@435: declare_constant(OopMapValue::register_mask_in_place) \ duke@435: declare_constant(OopMapValue::unused_value) \ duke@435: declare_constant(OopMapValue::oop_value) \ duke@435: declare_constant(OopMapValue::value_value) \ coleenp@548: declare_constant(OopMapValue::narrowoop_value) \ duke@435: declare_constant(OopMapValue::callee_saved_value) \ duke@435: declare_constant(OopMapValue::derived_oop_value) \ duke@435: \ duke@435: /******************/ \ duke@435: /* JNIHandleBlock */ \ duke@435: /******************/ \ duke@435: \ duke@435: declare_constant(JNIHandleBlock::block_size_in_oops) \ duke@435: \ duke@435: /**********************/ \ duke@435: /* ObjectSynchronizer */ \ duke@435: /**********************/ \ duke@435: \ duke@435: declare_constant(ObjectSynchronizer::_BLOCKSIZE) \ duke@435: \ never@3108: /**********************/ \ never@3108: /* PcDesc */ \ never@3108: /**********************/ \ never@3108: \ never@3108: declare_constant(PcDesc::PCDESC_reexecute) \ never@3108: declare_constant(PcDesc::PCDESC_is_method_handle_invoke) \ never@3108: declare_constant(PcDesc::PCDESC_return_oop) \ never@3108: \ never@3108: /**********************/ \ never@3108: /* frame */ \ never@3108: /**********************/ \ never@3108: \ never@3108: X86_ONLY(declare_constant(frame::entry_frame_call_wrapper_offset)) \ never@3108: declare_constant(frame::pc_return_offset) \ never@3108: \ duke@435: /********************************/ \ duke@435: /* Calling convention constants */ \ duke@435: /********************************/ \ duke@435: \ duke@435: declare_constant(RegisterImpl::number_of_registers) \ duke@435: declare_constant(ConcreteRegisterImpl::number_of_registers) \ duke@435: declare_preprocessor_constant("REG_COUNT", REG_COUNT) \ duke@435: declare_c2_preprocessor_constant("SAVED_ON_ENTRY_REG_COUNT", SAVED_ON_ENTRY_REG_COUNT) \ duke@435: declare_c2_preprocessor_constant("C_SAVED_ON_ENTRY_REG_COUNT", C_SAVED_ON_ENTRY_REG_COUNT) duke@435: duke@435: /* NOTE that we do not use the last_entry() macro here; it is used */ duke@435: /* in vmStructs__.hpp's VM_INT_CONSTANTS_OS_CPU macro (and */ duke@435: /* must be present there) */ duke@435: duke@435: //-------------------------------------------------------------------------------- duke@435: // VM_LONG_CONSTANTS duke@435: // duke@435: // This table contains long constants required over in the duke@435: // serviceability agent. The "declare_constant" macro is used for all duke@435: // enums, etc., while "declare_preprocessor_constant" must be used for duke@435: // all #defined constants. duke@435: duke@435: #define VM_LONG_CONSTANTS(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \ duke@435: \ duke@435: /*********************/ \ duke@435: /* MarkOop constants */ \ duke@435: /*********************/ \ duke@435: \ duke@435: /* Note: some of these are declared as long constants just for */ \ duke@435: /* consistency. The mask constants are the only ones requiring */ \ duke@435: /* 64 bits (on 64-bit platforms). */ \ duke@435: \ duke@435: declare_constant(markOopDesc::age_bits) \ duke@435: declare_constant(markOopDesc::lock_bits) \ duke@435: declare_constant(markOopDesc::biased_lock_bits) \ duke@435: declare_constant(markOopDesc::max_hash_bits) \ duke@435: declare_constant(markOopDesc::hash_bits) \ duke@435: \ duke@435: declare_constant(markOopDesc::lock_shift) \ duke@435: declare_constant(markOopDesc::biased_lock_shift) \ duke@435: declare_constant(markOopDesc::age_shift) \ duke@435: declare_constant(markOopDesc::hash_shift) \ duke@435: \ duke@435: declare_constant(markOopDesc::lock_mask) \ duke@435: declare_constant(markOopDesc::lock_mask_in_place) \ duke@435: declare_constant(markOopDesc::biased_lock_mask) \ duke@435: declare_constant(markOopDesc::biased_lock_mask_in_place) \ duke@435: declare_constant(markOopDesc::biased_lock_bit_in_place) \ duke@435: declare_constant(markOopDesc::age_mask) \ duke@435: declare_constant(markOopDesc::age_mask_in_place) \ duke@435: declare_constant(markOopDesc::hash_mask) \ duke@435: declare_constant(markOopDesc::hash_mask_in_place) \ duke@435: declare_constant(markOopDesc::biased_lock_alignment) \ duke@435: \ duke@435: declare_constant(markOopDesc::locked_value) \ duke@435: declare_constant(markOopDesc::unlocked_value) \ duke@435: declare_constant(markOopDesc::monitor_value) \ duke@435: declare_constant(markOopDesc::marked_value) \ duke@435: declare_constant(markOopDesc::biased_lock_pattern) \ duke@435: \ duke@435: declare_constant(markOopDesc::no_hash) \ duke@435: declare_constant(markOopDesc::no_hash_in_place) \ duke@435: declare_constant(markOopDesc::no_lock_in_place) \ coleenp@622: declare_constant(markOopDesc::max_age) \ coleenp@622: \ coleenp@622: /* Constants in markOop used by CMS. */ \ coleenp@622: declare_constant(markOopDesc::cms_shift) \ coleenp@622: declare_constant(markOopDesc::cms_mask) \ coleenp@622: declare_constant(markOopDesc::size_shift) \ duke@435: duke@435: /* NOTE that we do not use the last_entry() macro here; it is used */ duke@435: /* in vmStructs__.hpp's VM_LONG_CONSTANTS_OS_CPU macro (and */ duke@435: /* must be present there) */ duke@435: duke@435: duke@435: //-------------------------------------------------------------------------------- duke@435: // Macros operating on the above lists duke@435: //-------------------------------------------------------------------------------- duke@435: duke@435: // This utility macro quotes the passed string duke@435: #define QUOTE(x) #x duke@435: duke@435: //-------------------------------------------------------------------------------- duke@435: // VMStructEntry macros duke@435: // duke@435: duke@435: // This macro generates a VMStructEntry line for a nonstatic field duke@435: #define GENERATE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \ duke@435: { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 0, cast_uint64_t(offset_of(typeName, fieldName)), NULL }, duke@435: duke@435: // This macro generates a VMStructEntry line for a static field duke@435: #define GENERATE_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \ duke@435: { QUOTE(typeName), QUOTE(fieldName), QUOTE(type), 1, 0, &typeName::fieldName }, duke@435: duke@435: // This macro generates a VMStructEntry line for an unchecked duke@435: // nonstatic field, in which the size of the type is also specified. duke@435: // The type string is given as NULL, indicating an "opaque" type. duke@435: #define GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, size) \ duke@435: { QUOTE(typeName), QUOTE(fieldName), NULL, 0, cast_uint64_t(offset_of(typeName, fieldName)), NULL }, duke@435: duke@435: // This macro generates a VMStructEntry line for an unchecked duke@435: // static field, in which the size of the type is also specified. duke@435: // The type string is given as NULL, indicating an "opaque" type. duke@435: #define GENERATE_UNCHECKED_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, size) \ duke@435: { QUOTE(typeName), QUOTE(fieldName), NULL, 1, 0, (void*) &typeName::fieldName }, duke@435: duke@435: // This macro generates the sentinel value indicating the end of the list duke@435: #define GENERATE_VM_STRUCT_LAST_ENTRY() \ duke@435: { NULL, NULL, NULL, 0, 0, NULL } duke@435: duke@435: // This macro checks the type of a VMStructEntry by comparing pointer types duke@435: #define CHECK_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \ duke@435: {typeName *dummyObj = NULL; type* dummy = &dummyObj->fieldName; } duke@435: duke@435: // This macro checks the type of a volatile VMStructEntry by comparing pointer types duke@435: #define CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \ duke@435: {typedef type dummyvtype; typeName *dummyObj = NULL; volatile dummyvtype* dummy = &dummyObj->fieldName; } duke@435: duke@435: // This macro checks the type of a VMStructEntry by comparing pointer types duke@435: #define CHECK_STATIC_VM_STRUCT_ENTRY(typeName, fieldName, type) \ duke@435: {type* dummy = &typeName::fieldName; } duke@435: duke@435: // This macro ensures the type of a field and its containing type are duke@435: // present in the type table. The assertion string is shorter than duke@435: // preferable because (incredibly) of a bug in Solstice NFS client duke@435: // which seems to prevent very long lines from compiling. This assertion duke@435: // means that an entry in VMStructs::localHotSpotVMStructs[] was not duke@435: // found in VMStructs::localHotSpotVMTypes[]. duke@435: #define ENSURE_FIELD_TYPE_PRESENT(typeName, fieldName, type) \ duke@435: { assert(findType(QUOTE(typeName)) != 0, "type \"" QUOTE(typeName) "\" not found in type table"); \ duke@435: assert(findType(QUOTE(type)) != 0, "type \"" QUOTE(type) "\" not found in type table"); } duke@435: duke@435: // This is a no-op macro for unchecked fields duke@435: #define CHECK_NO_OP(a, b, c) duke@435: duke@435: // This is a no-op macro for the sentinel value duke@435: #define CHECK_SENTINEL() duke@435: duke@435: // duke@435: // Build-specific macros: duke@435: // duke@435: duke@435: // Generate and check a nonstatic field in non-product builds duke@435: #ifndef PRODUCT duke@435: # define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: # define CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: # define ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT(a, b, c) ENSURE_FIELD_TYPE_PRESENT(a, b, c) duke@435: # define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: # define CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: # define ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT(a, b, c) ENSURE_FIELD_TYPE_PRESENT(a, b, c) duke@435: #else duke@435: # define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: # define CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: # define ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT(a, b, c) duke@435: # define GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: # define CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: # define ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT(a, b, c) duke@435: #endif /* PRODUCT */ duke@435: duke@435: // Generate and check a nonstatic field in C1 builds duke@435: #ifdef COMPILER1 duke@435: # define GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: # define CHECK_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: # define ENSURE_C1_FIELD_TYPE_PRESENT(a, b, c) ENSURE_FIELD_TYPE_PRESENT(a, b, c) duke@435: #else duke@435: # define GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: # define CHECK_C1_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: # define ENSURE_C1_FIELD_TYPE_PRESENT(a, b, c) duke@435: #endif /* COMPILER1 */ duke@435: // Generate and check a nonstatic field in C2 builds duke@435: #ifdef COMPILER2 duke@435: # define GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: # define CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) CHECK_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: # define ENSURE_C2_FIELD_TYPE_PRESENT(a, b, c) ENSURE_FIELD_TYPE_PRESENT(a, b, c) duke@435: #else duke@435: # define GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: # define CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: # define ENSURE_C2_FIELD_TYPE_PRESENT(a, b, c) duke@435: #endif /* COMPILER2 */ duke@435: duke@435: // Generate but do not check a static field in C1 builds duke@435: #ifdef COMPILER1 duke@435: # define GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: #else duke@435: # define GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: #endif /* COMPILER1 */ duke@435: duke@435: // Generate but do not check a static field in C2 builds duke@435: #ifdef COMPILER2 duke@435: # define GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) GENERATE_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: #else duke@435: # define GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY(a, b, c) duke@435: #endif /* COMPILER2 */ duke@435: duke@435: //-------------------------------------------------------------------------------- duke@435: // VMTypeEntry macros duke@435: // duke@435: duke@435: #define GENERATE_VM_TYPE_ENTRY(type, superclass) \ duke@435: { QUOTE(type), QUOTE(superclass), 0, 0, 0, sizeof(type) }, duke@435: duke@435: #define GENERATE_TOPLEVEL_VM_TYPE_ENTRY(type) \ duke@435: { QUOTE(type), NULL, 0, 0, 0, sizeof(type) }, duke@435: duke@435: #define GENERATE_OOP_VM_TYPE_ENTRY(type) \ duke@435: { QUOTE(type), NULL, 1, 0, 0, sizeof(type) }, duke@435: duke@435: #define GENERATE_INTEGER_VM_TYPE_ENTRY(type) \ duke@435: { QUOTE(type), NULL, 0, 1, 0, sizeof(type) }, duke@435: duke@435: #define GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY(type) \ duke@435: { QUOTE(type), NULL, 0, 1, 1, sizeof(type) }, duke@435: duke@435: #define GENERATE_VM_TYPE_LAST_ENTRY() \ duke@435: { NULL, NULL, 0, 0, 0, 0 } duke@435: duke@435: #define CHECK_VM_TYPE_ENTRY(type, superclass) \ duke@435: { type* dummyObj = NULL; superclass* dummySuperObj = dummyObj; } duke@435: duke@435: #define CHECK_VM_TYPE_NO_OP(a) duke@435: #define CHECK_SINGLE_ARG_VM_TYPE_NO_OP(a) duke@435: duke@435: // duke@435: // Build-specific macros: duke@435: // duke@435: duke@435: #ifdef COMPILER1 duke@435: # define GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY(a) GENERATE_TOPLEVEL_VM_TYPE_ENTRY(a) duke@435: # define CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY(a) duke@435: #else duke@435: # define GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY(a) duke@435: # define CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY(a) duke@435: #endif /* COMPILER1 */ duke@435: duke@435: #ifdef COMPILER2 duke@435: # define GENERATE_C2_VM_TYPE_ENTRY(a, b) GENERATE_VM_TYPE_ENTRY(a, b) duke@435: # define CHECK_C2_VM_TYPE_ENTRY(a, b) CHECK_VM_TYPE_ENTRY(a, b) duke@435: # define GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY(a) GENERATE_TOPLEVEL_VM_TYPE_ENTRY(a) duke@435: # define CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY(a) duke@435: #else duke@435: # define GENERATE_C2_VM_TYPE_ENTRY(a, b) duke@435: # define CHECK_C2_VM_TYPE_ENTRY(a, b) duke@435: # define GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY(a) duke@435: # define CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY(a) duke@435: #endif /* COMPILER2 */ duke@435: duke@435: duke@435: //-------------------------------------------------------------------------------- duke@435: // VMIntConstantEntry macros duke@435: // duke@435: duke@435: #define GENERATE_VM_INT_CONSTANT_ENTRY(name) \ duke@435: { QUOTE(name), (int32_t) name }, duke@435: duke@435: #define GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value) \ duke@435: { name, (int32_t) value }, duke@435: duke@435: // This macro generates the sentinel value indicating the end of the list duke@435: #define GENERATE_VM_INT_CONSTANT_LAST_ENTRY() \ duke@435: { NULL, 0 } duke@435: duke@435: duke@435: // Generate an int constant for a C1 build duke@435: #ifdef COMPILER1 duke@435: # define GENERATE_C1_VM_INT_CONSTANT_ENTRY(name) GENERATE_VM_INT_CONSTANT_ENTRY(name) duke@435: #else duke@435: # define GENERATE_C1_VM_INT_CONSTANT_ENTRY(name) duke@435: #endif /* COMPILER1 */ duke@435: duke@435: // Generate an int constant for a C2 build duke@435: #ifdef COMPILER2 duke@435: # define GENERATE_C2_VM_INT_CONSTANT_ENTRY(name) GENERATE_VM_INT_CONSTANT_ENTRY(name) duke@435: # define GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value) GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value) duke@435: #else duke@435: # define GENERATE_C2_VM_INT_CONSTANT_ENTRY(name) duke@435: # define GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY(name, value) duke@435: #endif /* COMPILER1 */ duke@435: duke@435: //-------------------------------------------------------------------------------- duke@435: // VMLongConstantEntry macros duke@435: // duke@435: duke@435: #define GENERATE_VM_LONG_CONSTANT_ENTRY(name) \ duke@435: { QUOTE(name), cast_uint64_t(name) }, duke@435: duke@435: #define GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) \ duke@435: { name, cast_uint64_t(value) }, duke@435: duke@435: // This macro generates the sentinel value indicating the end of the list duke@435: #define GENERATE_VM_LONG_CONSTANT_LAST_ENTRY() \ duke@435: { NULL, 0 } duke@435: duke@435: // Generate a long constant for a C1 build duke@435: #ifdef COMPILER1 duke@435: # define GENERATE_C1_VM_LONG_CONSTANT_ENTRY(name) GENERATE_VM_LONG_CONSTANT_ENTRY(name) duke@435: #else duke@435: # define GENERATE_C1_VM_LONG_CONSTANT_ENTRY(name) duke@435: #endif /* COMPILER1 */ duke@435: duke@435: // Generate a long constant for a C2 build duke@435: #ifdef COMPILER2 duke@435: # define GENERATE_C2_VM_LONG_CONSTANT_ENTRY(name) GENERATE_VM_LONG_CONSTANT_ENTRY(name) duke@435: # define GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) duke@435: #else duke@435: # define GENERATE_C2_VM_LONG_CONSTANT_ENTRY(name) duke@435: # define GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY(name, value) duke@435: #endif /* COMPILER1 */ duke@435: duke@435: // duke@435: // Instantiation of VMStructEntries, VMTypeEntries and VMIntConstantEntries duke@435: // duke@435: duke@435: // These initializers are allowed to access private fields in classes duke@435: // as long as class VMStructs is a friend duke@435: VMStructEntry VMStructs::localHotSpotVMStructs[] = { duke@435: duke@435: VM_STRUCTS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_STATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_C1_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_VM_STRUCT_LAST_ENTRY) duke@435: duke@435: #ifndef SERIALGC duke@435: VM_STRUCTS_PARALLELGC(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_STATIC_VM_STRUCT_ENTRY) duke@435: duke@435: VM_STRUCTS_CMS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \ coleenp@622: GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_STATIC_VM_STRUCT_ENTRY) duke@435: #endif // SERIALGC duke@435: duke@435: VM_STRUCTS_CPU(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_STATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_VM_STRUCT_LAST_ENTRY) duke@435: duke@435: VM_STRUCTS_OS_CPU(GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_STATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY, \ duke@435: GENERATE_VM_STRUCT_LAST_ENTRY) duke@435: }; duke@435: duke@435: VMTypeEntry VMStructs::localHotSpotVMTypes[] = { duke@435: duke@435: VM_TYPES(GENERATE_VM_TYPE_ENTRY, duke@435: GENERATE_TOPLEVEL_VM_TYPE_ENTRY, duke@435: GENERATE_OOP_VM_TYPE_ENTRY, duke@435: GENERATE_INTEGER_VM_TYPE_ENTRY, duke@435: GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY, duke@435: GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY, duke@435: GENERATE_C2_VM_TYPE_ENTRY, duke@435: GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY, duke@435: GENERATE_VM_TYPE_LAST_ENTRY) duke@435: duke@435: #ifndef SERIALGC duke@435: VM_TYPES_PARALLELGC(GENERATE_VM_TYPE_ENTRY, duke@435: GENERATE_TOPLEVEL_VM_TYPE_ENTRY) duke@435: duke@435: VM_TYPES_CMS(GENERATE_VM_TYPE_ENTRY, duke@435: GENERATE_TOPLEVEL_VM_TYPE_ENTRY) duke@435: duke@435: VM_TYPES_PARNEW(GENERATE_VM_TYPE_ENTRY) duke@435: #endif // SERIALGC duke@435: duke@435: VM_TYPES_CPU(GENERATE_VM_TYPE_ENTRY, duke@435: GENERATE_TOPLEVEL_VM_TYPE_ENTRY, duke@435: GENERATE_OOP_VM_TYPE_ENTRY, duke@435: GENERATE_INTEGER_VM_TYPE_ENTRY, duke@435: GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY, duke@435: GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY, duke@435: GENERATE_C2_VM_TYPE_ENTRY, duke@435: GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY, duke@435: GENERATE_VM_TYPE_LAST_ENTRY) duke@435: duke@435: VM_TYPES_OS_CPU(GENERATE_VM_TYPE_ENTRY, duke@435: GENERATE_TOPLEVEL_VM_TYPE_ENTRY, duke@435: GENERATE_OOP_VM_TYPE_ENTRY, duke@435: GENERATE_INTEGER_VM_TYPE_ENTRY, duke@435: GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY, duke@435: GENERATE_C1_TOPLEVEL_VM_TYPE_ENTRY, duke@435: GENERATE_C2_VM_TYPE_ENTRY, duke@435: GENERATE_C2_TOPLEVEL_VM_TYPE_ENTRY, duke@435: GENERATE_VM_TYPE_LAST_ENTRY) duke@435: }; duke@435: duke@435: VMIntConstantEntry VMStructs::localHotSpotVMIntConstants[] = { duke@435: duke@435: VM_INT_CONSTANTS(GENERATE_VM_INT_CONSTANT_ENTRY, duke@435: GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY, duke@435: GENERATE_C1_VM_INT_CONSTANT_ENTRY, duke@435: GENERATE_C2_VM_INT_CONSTANT_ENTRY, duke@435: GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY, duke@435: GENERATE_VM_INT_CONSTANT_LAST_ENTRY) duke@435: duke@435: #ifndef SERIALGC duke@435: VM_INT_CONSTANTS_CMS(GENERATE_VM_INT_CONSTANT_ENTRY) duke@435: duke@435: VM_INT_CONSTANTS_PARNEW(GENERATE_VM_INT_CONSTANT_ENTRY) duke@435: #endif // SERIALGC duke@435: duke@435: VM_INT_CONSTANTS_CPU(GENERATE_VM_INT_CONSTANT_ENTRY, duke@435: GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY, duke@435: GENERATE_C1_VM_INT_CONSTANT_ENTRY, duke@435: GENERATE_C2_VM_INT_CONSTANT_ENTRY, duke@435: GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY, duke@435: GENERATE_VM_INT_CONSTANT_LAST_ENTRY) duke@435: duke@435: VM_INT_CONSTANTS_OS_CPU(GENERATE_VM_INT_CONSTANT_ENTRY, duke@435: GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY, duke@435: GENERATE_C1_VM_INT_CONSTANT_ENTRY, duke@435: GENERATE_C2_VM_INT_CONSTANT_ENTRY, duke@435: GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY, duke@435: GENERATE_VM_INT_CONSTANT_LAST_ENTRY) duke@435: }; duke@435: duke@435: VMLongConstantEntry VMStructs::localHotSpotVMLongConstants[] = { duke@435: duke@435: VM_LONG_CONSTANTS(GENERATE_VM_LONG_CONSTANT_ENTRY, duke@435: GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY, duke@435: GENERATE_C1_VM_LONG_CONSTANT_ENTRY, duke@435: GENERATE_C2_VM_LONG_CONSTANT_ENTRY, duke@435: GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY, duke@435: GENERATE_VM_LONG_CONSTANT_LAST_ENTRY) duke@435: duke@435: VM_LONG_CONSTANTS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY, duke@435: GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY, duke@435: GENERATE_C1_VM_LONG_CONSTANT_ENTRY, duke@435: GENERATE_C2_VM_LONG_CONSTANT_ENTRY, duke@435: GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY, duke@435: GENERATE_VM_LONG_CONSTANT_LAST_ENTRY) duke@435: duke@435: VM_LONG_CONSTANTS_OS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY, duke@435: GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY, duke@435: GENERATE_C1_VM_LONG_CONSTANT_ENTRY, duke@435: GENERATE_C2_VM_LONG_CONSTANT_ENTRY, duke@435: GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY, duke@435: GENERATE_VM_LONG_CONSTANT_LAST_ENTRY) duke@435: }; duke@435: duke@435: // This is used both to check the types of referenced fields and, in duke@435: // debug builds, to ensure that all of the field types are present. duke@435: void duke@435: VMStructs::init() { duke@435: VM_STRUCTS(CHECK_NONSTATIC_VM_STRUCT_ENTRY, duke@435: CHECK_STATIC_VM_STRUCT_ENTRY, duke@435: CHECK_NO_OP, duke@435: CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY, duke@435: CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, duke@435: CHECK_C1_NONSTATIC_VM_STRUCT_ENTRY, duke@435: CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY, duke@435: CHECK_NO_OP, duke@435: CHECK_NO_OP, duke@435: CHECK_SENTINEL); duke@435: duke@435: #ifndef SERIALGC duke@435: VM_STRUCTS_PARALLELGC(CHECK_NONSTATIC_VM_STRUCT_ENTRY, duke@435: CHECK_STATIC_VM_STRUCT_ENTRY); duke@435: duke@435: VM_STRUCTS_CMS(CHECK_NONSTATIC_VM_STRUCT_ENTRY, coleenp@622: CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY, duke@435: CHECK_STATIC_VM_STRUCT_ENTRY); duke@435: #endif // SERIALGC duke@435: duke@435: VM_STRUCTS_CPU(CHECK_NONSTATIC_VM_STRUCT_ENTRY, duke@435: CHECK_STATIC_VM_STRUCT_ENTRY, duke@435: CHECK_NO_OP, duke@435: CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY, duke@435: CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, duke@435: CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY, duke@435: CHECK_NO_OP, duke@435: CHECK_NO_OP, duke@435: CHECK_SENTINEL); duke@435: duke@435: VM_STRUCTS_OS_CPU(CHECK_NONSTATIC_VM_STRUCT_ENTRY, duke@435: CHECK_STATIC_VM_STRUCT_ENTRY, duke@435: CHECK_NO_OP, duke@435: CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY, duke@435: CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY, duke@435: CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY, duke@435: CHECK_NO_OP, duke@435: CHECK_NO_OP, duke@435: CHECK_SENTINEL); duke@435: duke@435: VM_TYPES(CHECK_VM_TYPE_ENTRY, duke@435: CHECK_SINGLE_ARG_VM_TYPE_NO_OP, duke@435: CHECK_SINGLE_ARG_VM_TYPE_NO_OP, duke@435: CHECK_SINGLE_ARG_VM_TYPE_NO_OP, duke@435: CHECK_SINGLE_ARG_VM_TYPE_NO_OP, duke@435: CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY, duke@435: CHECK_C2_VM_TYPE_ENTRY, duke@435: CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY, duke@435: CHECK_SENTINEL); duke@435: duke@435: #ifndef SERIALGC duke@435: VM_TYPES_PARALLELGC(CHECK_VM_TYPE_ENTRY, duke@435: CHECK_SINGLE_ARG_VM_TYPE_NO_OP); duke@435: duke@435: VM_TYPES_CMS(CHECK_VM_TYPE_ENTRY, duke@435: CHECK_SINGLE_ARG_VM_TYPE_NO_OP); duke@435: duke@435: VM_TYPES_PARNEW(CHECK_VM_TYPE_ENTRY) duke@435: #endif // SERIALGC duke@435: duke@435: VM_TYPES_CPU(CHECK_VM_TYPE_ENTRY, duke@435: CHECK_SINGLE_ARG_VM_TYPE_NO_OP, duke@435: CHECK_SINGLE_ARG_VM_TYPE_NO_OP, duke@435: CHECK_SINGLE_ARG_VM_TYPE_NO_OP, duke@435: CHECK_SINGLE_ARG_VM_TYPE_NO_OP, duke@435: CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY, duke@435: CHECK_C2_VM_TYPE_ENTRY, duke@435: CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY, duke@435: CHECK_SENTINEL); duke@435: duke@435: VM_TYPES_OS_CPU(CHECK_VM_TYPE_ENTRY, duke@435: CHECK_SINGLE_ARG_VM_TYPE_NO_OP, duke@435: CHECK_SINGLE_ARG_VM_TYPE_NO_OP, duke@435: CHECK_SINGLE_ARG_VM_TYPE_NO_OP, duke@435: CHECK_SINGLE_ARG_VM_TYPE_NO_OP, duke@435: CHECK_C1_TOPLEVEL_VM_TYPE_ENTRY, duke@435: CHECK_C2_VM_TYPE_ENTRY, duke@435: CHECK_C2_TOPLEVEL_VM_TYPE_ENTRY, duke@435: CHECK_SENTINEL); duke@435: duke@435: // duke@435: // Split VM_STRUCTS() invocation into two parts to allow MS VC++ 6.0 duke@435: // to build with the source mounted over SNC3.2. Symptom was that duke@435: // debug build failed with an internal compiler error. Has been seen duke@435: // mounting sources from Solaris 2.6 and 2.7 hosts, but so far not duke@435: // 2.8 hosts. Appears to occur because line is too long. duke@435: // duke@435: // If an assertion failure is triggered here it means that an entry duke@435: // in VMStructs::localHotSpotVMStructs[] was not found in duke@435: // VMStructs::localHotSpotVMTypes[]. (The assertion itself had to be duke@435: // made less descriptive because of this above bug -- see the duke@435: // definition of ENSURE_FIELD_TYPE_PRESENT.) duke@435: // duke@435: // NOTE: taken out because this was just not working on everyone's duke@435: // Solstice NFS setup. If everyone switches to local workspaces on duke@435: // Win32, we can put this back in. duke@435: #ifndef _WINDOWS duke@435: debug_only(VM_STRUCTS(ENSURE_FIELD_TYPE_PRESENT, \ duke@435: CHECK_NO_OP, \ duke@435: CHECK_NO_OP, \ duke@435: CHECK_NO_OP, \ duke@435: CHECK_NO_OP, \ duke@435: CHECK_NO_OP, \ duke@435: CHECK_NO_OP, \ duke@435: CHECK_NO_OP, \ duke@435: CHECK_NO_OP, \ duke@435: CHECK_SENTINEL)); duke@435: debug_only(VM_STRUCTS(CHECK_NO_OP, \ duke@435: ENSURE_FIELD_TYPE_PRESENT, \ duke@435: CHECK_NO_OP, \ duke@435: ENSURE_FIELD_TYPE_PRESENT, \ duke@435: ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT, \ duke@435: ENSURE_C1_FIELD_TYPE_PRESENT, \ duke@435: ENSURE_C2_FIELD_TYPE_PRESENT, \ duke@435: CHECK_NO_OP, \ duke@435: CHECK_NO_OP, \ duke@435: CHECK_SENTINEL)); duke@435: #ifndef SERIALGC duke@435: debug_only(VM_STRUCTS_PARALLELGC(ENSURE_FIELD_TYPE_PRESENT, \ duke@435: ENSURE_FIELD_TYPE_PRESENT)); duke@435: debug_only(VM_STRUCTS_CMS(ENSURE_FIELD_TYPE_PRESENT, \ coleenp@622: ENSURE_FIELD_TYPE_PRESENT, \ duke@435: ENSURE_FIELD_TYPE_PRESENT)); duke@435: #endif // SERIALGC duke@435: debug_only(VM_STRUCTS_CPU(ENSURE_FIELD_TYPE_PRESENT, \ duke@435: ENSURE_FIELD_TYPE_PRESENT, \ duke@435: CHECK_NO_OP, \ duke@435: ENSURE_FIELD_TYPE_PRESENT, \ duke@435: ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT, \ duke@435: ENSURE_C2_FIELD_TYPE_PRESENT, \ duke@435: CHECK_NO_OP, \ duke@435: CHECK_NO_OP, \ duke@435: CHECK_SENTINEL)); duke@435: debug_only(VM_STRUCTS_OS_CPU(ENSURE_FIELD_TYPE_PRESENT, \ duke@435: ENSURE_FIELD_TYPE_PRESENT, \ duke@435: CHECK_NO_OP, \ duke@435: ENSURE_FIELD_TYPE_PRESENT, \ duke@435: ENSURE_NONPRODUCT_FIELD_TYPE_PRESENT, \ duke@435: ENSURE_C2_FIELD_TYPE_PRESENT, \ duke@435: CHECK_NO_OP, \ duke@435: CHECK_NO_OP, \ duke@435: CHECK_SENTINEL)); duke@435: #endif duke@435: } duke@435: duke@435: extern "C" { duke@435: duke@435: // see comments on cast_uint64_t at the top of this file duke@435: #define ASSIGN_CONST_TO_64BIT_VAR(var, expr) \ duke@435: JNIEXPORT uint64_t var = cast_uint64_t(expr); duke@435: #define ASSIGN_OFFSET_TO_64BIT_VAR(var, type, field) \ duke@435: ASSIGN_CONST_TO_64BIT_VAR(var, offset_of(type, field)) duke@435: #define ASSIGN_STRIDE_TO_64BIT_VAR(var, array) \ duke@435: ASSIGN_CONST_TO_64BIT_VAR(var, (char*)&array[1] - (char*)&array[0]) duke@435: duke@435: JNIEXPORT VMStructEntry* gHotSpotVMStructs = VMStructs::localHotSpotVMStructs; duke@435: ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryTypeNameOffset, VMStructEntry, typeName); duke@435: ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryFieldNameOffset, VMStructEntry, fieldName); duke@435: ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryTypeStringOffset, VMStructEntry, typeString); duke@435: ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryIsStaticOffset, VMStructEntry, isStatic); duke@435: ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryOffsetOffset, VMStructEntry, offset); duke@435: ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMStructEntryAddressOffset, VMStructEntry, address); duke@435: ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMStructEntryArrayStride, gHotSpotVMStructs); duke@435: JNIEXPORT VMTypeEntry* gHotSpotVMTypes = VMStructs::localHotSpotVMTypes; duke@435: ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryTypeNameOffset, VMTypeEntry, typeName); duke@435: ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntrySuperclassNameOffset, VMTypeEntry, superclassName); duke@435: ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsOopTypeOffset, VMTypeEntry, isOopType); duke@435: ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsIntegerTypeOffset, VMTypeEntry, isIntegerType); duke@435: ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntryIsUnsignedOffset, VMTypeEntry, isUnsigned); duke@435: ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMTypeEntrySizeOffset, VMTypeEntry, size); duke@435: ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMTypeEntryArrayStride,gHotSpotVMTypes); duke@435: JNIEXPORT VMIntConstantEntry* gHotSpotVMIntConstants = VMStructs::localHotSpotVMIntConstants; duke@435: ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMIntConstantEntryNameOffset, VMIntConstantEntry, name); duke@435: ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMIntConstantEntryValueOffset, VMIntConstantEntry, value); duke@435: ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMIntConstantEntryArrayStride, gHotSpotVMIntConstants); duke@435: JNIEXPORT VMLongConstantEntry* gHotSpotVMLongConstants = VMStructs::localHotSpotVMLongConstants; duke@435: ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMLongConstantEntryNameOffset, VMLongConstantEntry, name); duke@435: ASSIGN_OFFSET_TO_64BIT_VAR(gHotSpotVMLongConstantEntryValueOffset, VMLongConstantEntry, value); duke@435: ASSIGN_STRIDE_TO_64BIT_VAR(gHotSpotVMLongConstantEntryArrayStride, gHotSpotVMLongConstants); duke@435: } duke@435: duke@435: #ifdef ASSERT coleenp@2497: static int recursiveFindType(VMTypeEntry* origtypes, const char* typeName, bool isRecurse) { coleenp@2497: { coleenp@2497: VMTypeEntry* types = origtypes; coleenp@2497: while (types->typeName != NULL) { coleenp@2497: if (!strcmp(typeName, types->typeName)) { coleenp@2497: return 1; coleenp@2497: } coleenp@2497: ++types; coleenp@2497: } coleenp@2497: } coleenp@2497: size_t len = strlen(typeName); coleenp@2497: if (typeName[len-1] == '*') { coleenp@2497: char * s = new char[len]; coleenp@2497: strncpy(s, typeName, len - 1); coleenp@2497: s[len-1] = '\0'; coleenp@2497: // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName); coleenp@2497: if (recursiveFindType(origtypes, s, true) == 1) { coleenp@2497: delete s; coleenp@2497: return 1; coleenp@2497: } coleenp@2497: delete s; coleenp@2497: } coleenp@2497: if (strstr(typeName, "GrowableArray<") == typeName) { coleenp@2497: const char * start = typeName + strlen("GrowableArray<"); coleenp@2497: const char * end = strrchr(typeName, '>'); coleenp@2497: int len = end - start + 1; coleenp@2497: char * s = new char[len]; coleenp@2497: strncpy(s, start, len - 1); coleenp@2497: s[len-1] = '\0'; coleenp@2497: // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName); coleenp@2497: if (recursiveFindType(origtypes, s, true) == 1) { coleenp@2497: delete s; coleenp@2497: return 1; coleenp@2497: } coleenp@2497: delete s; coleenp@2497: } coleenp@2497: if (strstr(typeName, "const ") == typeName) { coleenp@2497: const char * s = typeName + strlen("const "); coleenp@2497: // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName); coleenp@2497: if (recursiveFindType(origtypes, s, true) == 1) { coleenp@2497: return 1; coleenp@2497: } coleenp@2497: } coleenp@2497: if (strstr(typeName, " const") == typeName + len - 6) { coleenp@2497: char * s = strdup(typeName); coleenp@2497: s[len - 6] = '\0'; coleenp@2497: // tty->print_cr("checking \"%s\" for \"%s\"", s, typeName); coleenp@2497: if (recursiveFindType(origtypes, s, true) == 1) { coleenp@2497: return 1; coleenp@2497: } coleenp@2497: } coleenp@2497: if (!isRecurse) { coleenp@2497: tty->print_cr("type \"%s\" not found", typeName); coleenp@2497: } coleenp@2497: return 2; coleenp@2497: } coleenp@2497: coleenp@2497: duke@435: int duke@435: VMStructs::findType(const char* typeName) { duke@435: VMTypeEntry* types = gHotSpotVMTypes; duke@435: coleenp@2497: return recursiveFindType(types, typeName, false); duke@435: } duke@435: #endif duke@435: duke@435: void vmStructs_init() { duke@435: debug_only(VMStructs::init()); duke@435: }