Path: blob/master/src/hotspot/share/jvmci/vmStructs_jvmci.cpp
40949 views
/*1* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#include "precompiled.hpp"25#include "code/codeCache.hpp"26#include "compiler/compileBroker.hpp"27#include "gc/shared/collectedHeap.hpp"28#include "jvmci/jvmciCodeInstaller.hpp"29#include "jvmci/jvmciCompilerToVM.hpp"30#include "jvmci/jvmciRuntime.hpp"31#include "jvmci/vmStructs_jvmci.hpp"32#include "oops/klassVtable.hpp"33#include "oops/objArrayKlass.hpp"34#include "runtime/deoptimization.hpp"35#include "runtime/flags/jvmFlag.hpp"36#include "runtime/osThread.hpp"37#include "runtime/sharedRuntime.hpp"38#include "runtime/stubRoutines.hpp"39#include "runtime/vm_version.hpp"40#if INCLUDE_G1GC41#include "gc/g1/g1CardTable.hpp"42#include "gc/g1/heapRegion.hpp"43#include "gc/g1/g1ThreadLocalData.hpp"44#endif4546#define VM_STRUCTS(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field) \47static_field(CompilerToVM::Data, Klass_vtable_start_offset, int) \48static_field(CompilerToVM::Data, Klass_vtable_length_offset, int) \49\50static_field(CompilerToVM::Data, Method_extra_stack_entries, int) \51\52static_field(CompilerToVM::Data, SharedRuntime_ic_miss_stub, address) \53static_field(CompilerToVM::Data, SharedRuntime_handle_wrong_method_stub, address) \54static_field(CompilerToVM::Data, SharedRuntime_deopt_blob_unpack, address) \55static_field(CompilerToVM::Data, SharedRuntime_deopt_blob_unpack_with_exception_in_tls, \56address) \57static_field(CompilerToVM::Data, SharedRuntime_deopt_blob_uncommon_trap, address) \58\59static_field(CompilerToVM::Data, ThreadLocalAllocBuffer_alignment_reserve, size_t) \60\61static_field(CompilerToVM::Data, Universe_collectedHeap, CollectedHeap*) \62static_field(CompilerToVM::Data, Universe_base_vtable_size, int) \63static_field(CompilerToVM::Data, Universe_narrow_oop_base, address) \64static_field(CompilerToVM::Data, Universe_narrow_oop_shift, int) \65static_field(CompilerToVM::Data, Universe_narrow_klass_base, address) \66static_field(CompilerToVM::Data, Universe_narrow_klass_shift, int) \67static_field(CompilerToVM::Data, Universe_non_oop_bits, void*) \68static_field(CompilerToVM::Data, Universe_verify_oop_mask, uintptr_t) \69static_field(CompilerToVM::Data, Universe_verify_oop_bits, uintptr_t) \70\71static_field(CompilerToVM::Data, _supports_inline_contig_alloc, bool) \72static_field(CompilerToVM::Data, _heap_end_addr, HeapWord**) \73static_field(CompilerToVM::Data, _heap_top_addr, HeapWord* volatile*) \74\75static_field(CompilerToVM::Data, _max_oop_map_stack_offset, int) \76static_field(CompilerToVM::Data, _fields_annotations_base_offset, int) \77\78static_field(CompilerToVM::Data, cardtable_start_address, CardTable::CardValue*) \79static_field(CompilerToVM::Data, cardtable_shift, int) \80\81static_field(CompilerToVM::Data, vm_page_size, int) \82\83static_field(CompilerToVM::Data, sizeof_vtableEntry, int) \84static_field(CompilerToVM::Data, sizeof_ExceptionTableElement, int) \85static_field(CompilerToVM::Data, sizeof_LocalVariableTableElement, int) \86static_field(CompilerToVM::Data, sizeof_ConstantPool, int) \87static_field(CompilerToVM::Data, sizeof_narrowKlass, int) \88static_field(CompilerToVM::Data, sizeof_arrayOopDesc, int) \89static_field(CompilerToVM::Data, sizeof_BasicLock, int) \90\91static_field(CompilerToVM::Data, dsin, address) \92static_field(CompilerToVM::Data, dcos, address) \93static_field(CompilerToVM::Data, dtan, address) \94static_field(CompilerToVM::Data, dexp, address) \95static_field(CompilerToVM::Data, dlog, address) \96static_field(CompilerToVM::Data, dlog10, address) \97static_field(CompilerToVM::Data, dpow, address) \98\99static_field(CompilerToVM::Data, symbol_init, address) \100static_field(CompilerToVM::Data, symbol_clinit, address) \101\102static_field(Abstract_VM_Version, _features, uint64_t) \103\104nonstatic_field(Annotations, _fields_annotations, Array<AnnotationArray*>*) \105\106nonstatic_field(Array<int>, _length, int) \107unchecked_nonstatic_field(Array<u1>, _data, sizeof(u1)) \108unchecked_nonstatic_field(Array<u2>, _data, sizeof(u2)) \109nonstatic_field(Array<Klass*>, _length, int) \110nonstatic_field(Array<Klass*>, _data[0], Klass*) \111\112volatile_nonstatic_field(BasicLock, _displaced_header, markWord) \113\114static_field(CodeCache, _low_bound, address) \115static_field(CodeCache, _high_bound, address) \116\117nonstatic_field(CollectedHeap, _total_collections, unsigned int) \118\119nonstatic_field(CompileTask, _num_inlined_bytecodes, int) \120\121nonstatic_field(ConstantPool, _tags, Array<u1>*) \122nonstatic_field(ConstantPool, _pool_holder, InstanceKlass*) \123nonstatic_field(ConstantPool, _length, int) \124nonstatic_field(ConstantPool, _flags, u2) \125nonstatic_field(ConstantPool, _source_file_name_index, u2) \126\127nonstatic_field(ConstMethod, _constants, ConstantPool*) \128nonstatic_field(ConstMethod, _flags, u2) \129nonstatic_field(ConstMethod, _code_size, u2) \130nonstatic_field(ConstMethod, _name_index, u2) \131nonstatic_field(ConstMethod, _signature_index, u2) \132nonstatic_field(ConstMethod, _method_idnum, u2) \133nonstatic_field(ConstMethod, _max_stack, u2) \134nonstatic_field(ConstMethod, _max_locals, u2) \135\136nonstatic_field(DataLayout, _header._struct._tag, u1) \137nonstatic_field(DataLayout, _header._struct._flags, u1) \138nonstatic_field(DataLayout, _header._struct._bci, u2) \139nonstatic_field(DataLayout, _header._struct._traps, u4) \140nonstatic_field(DataLayout, _cells[0], intptr_t) \141\142nonstatic_field(Deoptimization::UnrollBlock, _size_of_deoptimized_frame, int) \143nonstatic_field(Deoptimization::UnrollBlock, _caller_adjustment, int) \144nonstatic_field(Deoptimization::UnrollBlock, _number_of_frames, int) \145nonstatic_field(Deoptimization::UnrollBlock, _total_frame_sizes, int) \146nonstatic_field(Deoptimization::UnrollBlock, _frame_sizes, intptr_t*) \147nonstatic_field(Deoptimization::UnrollBlock, _frame_pcs, address*) \148nonstatic_field(Deoptimization::UnrollBlock, _initial_info, intptr_t) \149nonstatic_field(Deoptimization::UnrollBlock, _unpack_kind, int) \150\151nonstatic_field(ExceptionTableElement, start_pc, u2) \152nonstatic_field(ExceptionTableElement, end_pc, u2) \153nonstatic_field(ExceptionTableElement, handler_pc, u2) \154nonstatic_field(ExceptionTableElement, catch_type_index, u2) \155\156nonstatic_field(InstanceKlass, _fields, Array<u2>*) \157nonstatic_field(InstanceKlass, _constants, ConstantPool*) \158nonstatic_field(InstanceKlass, _init_state, u1) \159nonstatic_field(InstanceKlass, _init_thread, Thread*) \160nonstatic_field(InstanceKlass, _misc_flags, u2) \161nonstatic_field(InstanceKlass, _annotations, Annotations*) \162\163volatile_nonstatic_field(JavaFrameAnchor, _last_Java_sp, intptr_t*) \164volatile_nonstatic_field(JavaFrameAnchor, _last_Java_pc, address) \165\166nonstatic_field(JVMCICompileState, _jvmti_can_hotswap_or_post_breakpoint, jbyte) \167nonstatic_field(JVMCICompileState, _jvmti_can_access_local_variables, jbyte) \168nonstatic_field(JVMCICompileState, _jvmti_can_post_on_exceptions, jbyte) \169nonstatic_field(JVMCICompileState, _jvmti_can_pop_frame, jbyte) \170nonstatic_field(JVMCICompileState, _compilation_ticks, jint) \171\172nonstatic_field(JavaThread, _threadObj, OopHandle) \173nonstatic_field(JavaThread, _anchor, JavaFrameAnchor) \174nonstatic_field(JavaThread, _vm_result, oop) \175nonstatic_field(JavaThread, _stack_overflow_state._stack_overflow_limit, address) \176volatile_nonstatic_field(JavaThread, _exception_oop, oop) \177volatile_nonstatic_field(JavaThread, _exception_pc, address) \178volatile_nonstatic_field(JavaThread, _is_method_handle_return, int) \179volatile_nonstatic_field(JavaThread, _doing_unsafe_access, bool) \180nonstatic_field(JavaThread, _osthread, OSThread*) \181nonstatic_field(JavaThread, _pending_deoptimization, int) \182nonstatic_field(JavaThread, _pending_failed_speculation, jlong) \183nonstatic_field(JavaThread, _pending_transfer_to_interpreter, bool) \184nonstatic_field(JavaThread, _jvmci_counters, jlong*) \185nonstatic_field(JavaThread, _jvmci_reserved0, intptr_t*) \186nonstatic_field(JavaThread, _jvmci_reserved1, intptr_t*) \187nonstatic_field(JavaThread, _jvmci_reserved_oop0, oop) \188nonstatic_field(JavaThread, _should_post_on_exceptions_flag, int) \189nonstatic_field(JavaThread, _jni_environment, JNIEnv) \190nonstatic_field(JavaThread, _poll_data, SafepointMechanism::ThreadData) \191nonstatic_field(JavaThread, _stack_overflow_state._reserved_stack_activation, address) \192\193static_field(java_lang_Class, _klass_offset, int) \194static_field(java_lang_Class, _array_klass_offset, int) \195\196nonstatic_field(InvocationCounter, _counter, unsigned int) \197\198nonstatic_field(Klass, _secondary_super_cache, Klass*) \199nonstatic_field(Klass, _secondary_supers, Array<Klass*>*) \200nonstatic_field(Klass, _super, Klass*) \201nonstatic_field(Klass, _super_check_offset, juint) \202volatile_nonstatic_field(Klass, _subklass, Klass*) \203nonstatic_field(Klass, _layout_helper, jint) \204nonstatic_field(Klass, _name, Symbol*) \205nonstatic_field(Klass, _prototype_header, markWord) \206volatile_nonstatic_field(Klass, _next_sibling, Klass*) \207nonstatic_field(Klass, _java_mirror, OopHandle) \208nonstatic_field(Klass, _modifier_flags, jint) \209nonstatic_field(Klass, _access_flags, AccessFlags) \210nonstatic_field(Klass, _class_loader_data, ClassLoaderData*) \211\212nonstatic_field(LocalVariableTableElement, start_bci, u2) \213nonstatic_field(LocalVariableTableElement, length, u2) \214nonstatic_field(LocalVariableTableElement, name_cp_index, u2) \215nonstatic_field(LocalVariableTableElement, descriptor_cp_index, u2) \216nonstatic_field(LocalVariableTableElement, signature_cp_index, u2) \217nonstatic_field(LocalVariableTableElement, slot, u2) \218\219nonstatic_field(Method, _constMethod, ConstMethod*) \220nonstatic_field(Method, _method_data, MethodData*) \221nonstatic_field(Method, _method_counters, MethodCounters*) \222nonstatic_field(Method, _access_flags, AccessFlags) \223nonstatic_field(Method, _vtable_index, int) \224nonstatic_field(Method, _intrinsic_id, u2) \225nonstatic_field(Method, _flags, u2) \226volatile_nonstatic_field(Method, _code, CompiledMethod*) \227volatile_nonstatic_field(Method, _from_compiled_entry, address) \228\229nonstatic_field(MethodCounters, _nmethod_age, int) \230nonstatic_field(MethodCounters, _invoke_mask, int) \231nonstatic_field(MethodCounters, _backedge_mask, int) \232nonstatic_field(MethodCounters, _interpreter_throwout_count, u2) \233JVMTI_ONLY(nonstatic_field(MethodCounters, _number_of_breakpoints, u2)) \234nonstatic_field(MethodCounters, _invocation_counter, InvocationCounter) \235nonstatic_field(MethodCounters, _backedge_counter, InvocationCounter) \236\237nonstatic_field(MethodData, _size, int) \238nonstatic_field(MethodData, _method, Method*) \239nonstatic_field(MethodData, _data_size, int) \240nonstatic_field(MethodData, _data[0], intptr_t) \241nonstatic_field(MethodData, _parameters_type_data_di, int) \242nonstatic_field(MethodData, _compiler_counters._nof_decompiles, uint) \243nonstatic_field(MethodData, _compiler_counters._nof_overflow_recompiles, uint) \244nonstatic_field(MethodData, _compiler_counters._nof_overflow_traps, uint) \245nonstatic_field(MethodData, _compiler_counters._trap_hist._array[0], u1) \246nonstatic_field(MethodData, _eflags, intx) \247nonstatic_field(MethodData, _arg_local, intx) \248nonstatic_field(MethodData, _arg_stack, intx) \249nonstatic_field(MethodData, _arg_returned, intx) \250nonstatic_field(MethodData, _tenure_traps, uint) \251nonstatic_field(MethodData, _invoke_mask, int) \252nonstatic_field(MethodData, _backedge_mask, int) \253nonstatic_field(MethodData, _jvmci_ir_size, int) \254\255nonstatic_field(nmethod, _verified_entry_point, address) \256nonstatic_field(nmethod, _comp_level, int) \257\258nonstatic_field(ObjArrayKlass, _element_klass, Klass*) \259\260unchecked_nonstatic_field(ObjectMonitor, _owner, sizeof(void *)) /* NOTE: no type */ \261volatile_nonstatic_field(ObjectMonitor, _recursions, intptr_t) \262volatile_nonstatic_field(ObjectMonitor, _cxq, ObjectWaiter*) \263volatile_nonstatic_field(ObjectMonitor, _EntryList, ObjectWaiter*) \264volatile_nonstatic_field(ObjectMonitor, _succ, JavaThread*) \265\266volatile_nonstatic_field(oopDesc, _mark, markWord) \267volatile_nonstatic_field(oopDesc, _metadata._klass, Klass*) \268\269static_field(os, _polling_page, address) \270\271static_field(StubRoutines, _verify_oop_count, jint) \272\273static_field(StubRoutines, _throw_delayed_StackOverflowError_entry, address) \274\275static_field(StubRoutines, _jbyte_arraycopy, address) \276static_field(StubRoutines, _jshort_arraycopy, address) \277static_field(StubRoutines, _jint_arraycopy, address) \278static_field(StubRoutines, _jlong_arraycopy, address) \279static_field(StubRoutines, _oop_arraycopy, address) \280static_field(StubRoutines, _oop_arraycopy_uninit, address) \281static_field(StubRoutines, _jbyte_disjoint_arraycopy, address) \282static_field(StubRoutines, _jshort_disjoint_arraycopy, address) \283static_field(StubRoutines, _jint_disjoint_arraycopy, address) \284static_field(StubRoutines, _jlong_disjoint_arraycopy, address) \285static_field(StubRoutines, _oop_disjoint_arraycopy, address) \286static_field(StubRoutines, _oop_disjoint_arraycopy_uninit, address) \287static_field(StubRoutines, _arrayof_jbyte_arraycopy, address) \288static_field(StubRoutines, _arrayof_jshort_arraycopy, address) \289static_field(StubRoutines, _arrayof_jint_arraycopy, address) \290static_field(StubRoutines, _arrayof_jlong_arraycopy, address) \291static_field(StubRoutines, _arrayof_oop_arraycopy, address) \292static_field(StubRoutines, _arrayof_oop_arraycopy_uninit, address) \293static_field(StubRoutines, _arrayof_jbyte_disjoint_arraycopy, address) \294static_field(StubRoutines, _arrayof_jshort_disjoint_arraycopy, address) \295static_field(StubRoutines, _arrayof_jint_disjoint_arraycopy, address) \296static_field(StubRoutines, _arrayof_jlong_disjoint_arraycopy, address) \297static_field(StubRoutines, _arrayof_oop_disjoint_arraycopy, address) \298static_field(StubRoutines, _arrayof_oop_disjoint_arraycopy_uninit, address) \299static_field(StubRoutines, _checkcast_arraycopy, address) \300static_field(StubRoutines, _checkcast_arraycopy_uninit, address) \301static_field(StubRoutines, _unsafe_arraycopy, address) \302static_field(StubRoutines, _generic_arraycopy, address) \303\304static_field(StubRoutines, _aescrypt_encryptBlock, address) \305static_field(StubRoutines, _aescrypt_decryptBlock, address) \306static_field(StubRoutines, _cipherBlockChaining_encryptAESCrypt, address) \307static_field(StubRoutines, _cipherBlockChaining_decryptAESCrypt, address) \308static_field(StubRoutines, _electronicCodeBook_encryptAESCrypt, address) \309static_field(StubRoutines, _electronicCodeBook_decryptAESCrypt, address) \310static_field(StubRoutines, _counterMode_AESCrypt, address) \311static_field(StubRoutines, _base64_encodeBlock, address) \312static_field(StubRoutines, _base64_decodeBlock, address) \313static_field(StubRoutines, _ghash_processBlocks, address) \314static_field(StubRoutines, _sha1_implCompress, address) \315static_field(StubRoutines, _sha1_implCompressMB, address) \316static_field(StubRoutines, _sha256_implCompress, address) \317static_field(StubRoutines, _sha256_implCompressMB, address) \318static_field(StubRoutines, _sha512_implCompress, address) \319static_field(StubRoutines, _sha512_implCompressMB, address) \320static_field(StubRoutines, _updateBytesCRC32, address) \321static_field(StubRoutines, _crc_table_adr, address) \322static_field(StubRoutines, _crc32c_table_addr, address) \323static_field(StubRoutines, _updateBytesCRC32C, address) \324static_field(StubRoutines, _updateBytesAdler32, address) \325static_field(StubRoutines, _multiplyToLen, address) \326static_field(StubRoutines, _squareToLen, address) \327static_field(StubRoutines, _mulAdd, address) \328static_field(StubRoutines, _montgomeryMultiply, address) \329static_field(StubRoutines, _montgomerySquare, address) \330static_field(StubRoutines, _vectorizedMismatch, address) \331static_field(StubRoutines, _bigIntegerRightShiftWorker, address) \332static_field(StubRoutines, _bigIntegerLeftShiftWorker, address) \333\334nonstatic_field(Thread, _tlab, ThreadLocalAllocBuffer) \335nonstatic_field(Thread, _allocated_bytes, jlong) \336\337nonstatic_field(ThreadLocalAllocBuffer, _start, HeapWord*) \338nonstatic_field(ThreadLocalAllocBuffer, _top, HeapWord*) \339nonstatic_field(ThreadLocalAllocBuffer, _end, HeapWord*) \340nonstatic_field(ThreadLocalAllocBuffer, _pf_top, HeapWord*) \341nonstatic_field(ThreadLocalAllocBuffer, _desired_size, size_t) \342nonstatic_field(ThreadLocalAllocBuffer, _refill_waste_limit, size_t) \343nonstatic_field(ThreadLocalAllocBuffer, _number_of_refills, unsigned) \344nonstatic_field(ThreadLocalAllocBuffer, _slow_allocations, unsigned) \345\346nonstatic_field(SafepointMechanism::ThreadData, _polling_word, volatile uintptr_t) \347nonstatic_field(SafepointMechanism::ThreadData, _polling_page, volatile uintptr_t) \348\349nonstatic_field(ThreadShadow, _pending_exception, oop) \350\351static_field(Symbol, _vm_symbols[0], Symbol*) \352\353nonstatic_field(vtableEntry, _method, Method*) \354355#define VM_TYPES(declare_type, declare_toplevel_type, declare_integer_type, declare_unsigned_integer_type) \356declare_integer_type(bool) \357declare_unsigned_integer_type(size_t) \358declare_integer_type(intx) \359declare_unsigned_integer_type(uintx) \360\361declare_toplevel_type(BasicLock) \362declare_toplevel_type(CompilerToVM) \363declare_toplevel_type(ExceptionTableElement) \364declare_toplevel_type(JVMFlag) \365declare_toplevel_type(JVMFlag*) \366declare_toplevel_type(InvocationCounter) \367declare_toplevel_type(JVMCICompileState) \368declare_toplevel_type(JVMCIEnv) \369declare_toplevel_type(LocalVariableTableElement) \370declare_toplevel_type(narrowKlass) \371declare_toplevel_type(ObjectWaiter) \372declare_toplevel_type(Symbol*) \373declare_toplevel_type(vtableEntry) \374\375declare_toplevel_type(oopDesc) \376declare_type(arrayOopDesc, oopDesc) \377\378declare_toplevel_type(MetaspaceObj) \379declare_type(Metadata, MetaspaceObj) \380declare_type(Klass, Metadata) \381declare_type(InstanceKlass, Klass) \382declare_type(ConstantPool, Metadata) \383384#define VM_INT_CONSTANTS(declare_constant, declare_constant_with_value, declare_preprocessor_constant) \385declare_preprocessor_constant("ASSERT", DEBUG_ONLY(1) NOT_DEBUG(0)) \386declare_preprocessor_constant("FIELDINFO_TAG_SIZE", FIELDINFO_TAG_SIZE) \387\388declare_constant(CompLevel_none) \389declare_constant(CompLevel_simple) \390declare_constant(CompLevel_limited_profile) \391declare_constant(CompLevel_full_profile) \392declare_constant(CompLevel_full_optimization) \393declare_constant(HeapWordSize) \394declare_constant(InvocationEntryBci) \395declare_constant(LogKlassAlignmentInBytes) \396declare_constant(JVMCINMethodData::SPECULATION_LENGTH_BITS) \397\398declare_constant(JVM_ACC_WRITTEN_FLAGS) \399declare_constant(JVM_ACC_MONITOR_MATCH) \400declare_constant(JVM_ACC_HAS_MONITOR_BYTECODES) \401declare_constant(JVM_ACC_HAS_FINALIZER) \402declare_constant(JVM_ACC_IS_CLONEABLE_FAST) \403declare_constant(JVM_ACC_IS_HIDDEN_CLASS) \404declare_constant(JVM_ACC_FIELD_INTERNAL) \405declare_constant(JVM_ACC_FIELD_STABLE) \406declare_constant(JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE) \407declare_preprocessor_constant("JVM_ACC_VARARGS", JVM_ACC_VARARGS) \408declare_preprocessor_constant("JVM_ACC_BRIDGE", JVM_ACC_BRIDGE) \409declare_preprocessor_constant("JVM_ACC_ANNOTATION", JVM_ACC_ANNOTATION) \410declare_preprocessor_constant("JVM_ACC_ENUM", JVM_ACC_ENUM) \411declare_preprocessor_constant("JVM_ACC_SYNTHETIC", JVM_ACC_SYNTHETIC) \412declare_preprocessor_constant("JVM_ACC_INTERFACE", JVM_ACC_INTERFACE) \413declare_preprocessor_constant("JVM_ACC_FIELD_INITIALIZED_FINAL_UPDATE", JVM_ACC_FIELD_INITIALIZED_FINAL_UPDATE) \414\415declare_constant(JVM_CONSTANT_Utf8) \416declare_constant(JVM_CONSTANT_Unicode) \417declare_constant(JVM_CONSTANT_Integer) \418declare_constant(JVM_CONSTANT_Float) \419declare_constant(JVM_CONSTANT_Long) \420declare_constant(JVM_CONSTANT_Double) \421declare_constant(JVM_CONSTANT_Class) \422declare_constant(JVM_CONSTANT_String) \423declare_constant(JVM_CONSTANT_Fieldref) \424declare_constant(JVM_CONSTANT_Methodref) \425declare_constant(JVM_CONSTANT_InterfaceMethodref) \426declare_constant(JVM_CONSTANT_NameAndType) \427declare_constant(JVM_CONSTANT_MethodHandle) \428declare_constant(JVM_CONSTANT_MethodType) \429declare_constant(JVM_CONSTANT_InvokeDynamic) \430declare_constant(JVM_CONSTANT_Dynamic) \431declare_constant(JVM_CONSTANT_Module) \432declare_constant(JVM_CONSTANT_Package) \433declare_constant(JVM_CONSTANT_ExternalMax) \434\435declare_constant(JVM_CONSTANT_Invalid) \436declare_constant(JVM_CONSTANT_InternalMin) \437declare_constant(JVM_CONSTANT_UnresolvedClass) \438declare_constant(JVM_CONSTANT_ClassIndex) \439declare_constant(JVM_CONSTANT_StringIndex) \440declare_constant(JVM_CONSTANT_UnresolvedClassInError) \441declare_constant(JVM_CONSTANT_MethodHandleInError) \442declare_constant(JVM_CONSTANT_MethodTypeInError) \443declare_constant(JVM_CONSTANT_DynamicInError) \444declare_constant(JVM_CONSTANT_InternalMax) \445\446declare_constant(ArrayData::array_len_off_set) \447declare_constant(ArrayData::array_start_off_set) \448\449declare_constant(BitData::exception_seen_flag) \450declare_constant(BitData::null_seen_flag) \451declare_constant(BranchData::not_taken_off_set) \452\453declare_constant_with_value("CardTable::dirty_card", CardTable::dirty_card_val()) \454\455declare_constant(CodeInstaller::VERIFIED_ENTRY) \456declare_constant(CodeInstaller::UNVERIFIED_ENTRY) \457declare_constant(CodeInstaller::OSR_ENTRY) \458declare_constant(CodeInstaller::EXCEPTION_HANDLER_ENTRY) \459declare_constant(CodeInstaller::DEOPT_HANDLER_ENTRY) \460declare_constant(CodeInstaller::FRAME_COMPLETE) \461declare_constant(CodeInstaller::INVOKEINTERFACE) \462declare_constant(CodeInstaller::INVOKEVIRTUAL) \463declare_constant(CodeInstaller::INVOKESTATIC) \464declare_constant(CodeInstaller::INVOKESPECIAL) \465declare_constant(CodeInstaller::INLINE_INVOKE) \466declare_constant(CodeInstaller::POLL_NEAR) \467declare_constant(CodeInstaller::POLL_RETURN_NEAR) \468declare_constant(CodeInstaller::POLL_FAR) \469declare_constant(CodeInstaller::POLL_RETURN_FAR) \470declare_constant(CodeInstaller::CARD_TABLE_SHIFT) \471declare_constant(CodeInstaller::CARD_TABLE_ADDRESS) \472declare_constant(CodeInstaller::HEAP_TOP_ADDRESS) \473declare_constant(CodeInstaller::HEAP_END_ADDRESS) \474declare_constant(CodeInstaller::NARROW_KLASS_BASE_ADDRESS) \475declare_constant(CodeInstaller::NARROW_OOP_BASE_ADDRESS) \476declare_constant(CodeInstaller::CRC_TABLE_ADDRESS) \477declare_constant(CodeInstaller::LOG_OF_HEAP_REGION_GRAIN_BYTES) \478declare_constant(CodeInstaller::INLINE_CONTIGUOUS_ALLOCATION_SUPPORTED) \479declare_constant(CodeInstaller::DEOPT_MH_HANDLER_ENTRY) \480declare_constant(CodeInstaller::VERIFY_OOP_COUNT_ADDRESS) \481declare_constant(CodeInstaller::VERIFY_OOPS) \482declare_constant(CodeInstaller::VERIFY_OOP_BITS) \483declare_constant(CodeInstaller::VERIFY_OOP_MASK) \484declare_constant(CodeInstaller::INVOKE_INVALID) \485\486declare_constant(CollectedHeap::None) \487declare_constant(CollectedHeap::Serial) \488declare_constant(CollectedHeap::Parallel) \489declare_constant(CollectedHeap::G1) \490declare_constant(CollectedHeap::Epsilon) \491declare_constant(CollectedHeap::Z) \492declare_constant(CollectedHeap::Shenandoah) \493\494declare_constant(vmIntrinsics::FIRST_MH_SIG_POLY) \495declare_constant(vmIntrinsics::LAST_MH_SIG_POLY) \496declare_constant(vmIntrinsics::_invokeGeneric) \497declare_constant(vmIntrinsics::_compiledLambdaForm) \498\499declare_constant(CollectedHeap::Serial) \500declare_constant(CollectedHeap::Parallel) \501declare_constant(CollectedHeap::G1) \502declare_constant(CollectedHeap::Epsilon) \503declare_constant(CollectedHeap::Z) \504declare_constant(CollectedHeap::Shenandoah) \505\506declare_constant(ConstantPool::CPCACHE_INDEX_TAG) \507declare_constant(ConstantPool::_has_dynamic_constant) \508\509declare_constant(ConstMethod::_has_linenumber_table) \510declare_constant(ConstMethod::_has_localvariable_table) \511declare_constant(ConstMethod::_has_exception_table) \512declare_constant(ConstMethod::_has_method_annotations) \513declare_constant(ConstMethod::_has_parameter_annotations) \514\515declare_constant(CounterData::count_off) \516\517declare_constant(DataLayout::cell_size) \518declare_constant(DataLayout::no_tag) \519declare_constant(DataLayout::bit_data_tag) \520declare_constant(DataLayout::counter_data_tag) \521declare_constant(DataLayout::jump_data_tag) \522declare_constant(DataLayout::receiver_type_data_tag) \523declare_constant(DataLayout::virtual_call_data_tag) \524declare_constant(DataLayout::ret_data_tag) \525declare_constant(DataLayout::branch_data_tag) \526declare_constant(DataLayout::multi_branch_data_tag) \527declare_constant(DataLayout::arg_info_data_tag) \528declare_constant(DataLayout::call_type_data_tag) \529declare_constant(DataLayout::virtual_call_type_data_tag) \530declare_constant(DataLayout::parameters_type_data_tag) \531declare_constant(DataLayout::speculative_trap_data_tag) \532\533declare_constant(Deoptimization::Unpack_deopt) \534declare_constant(Deoptimization::Unpack_exception) \535declare_constant(Deoptimization::Unpack_uncommon_trap) \536declare_constant(Deoptimization::Unpack_reexecute) \537\538declare_constant(Deoptimization::_action_bits) \539declare_constant(Deoptimization::_reason_bits) \540declare_constant(Deoptimization::_debug_id_bits) \541declare_constant(Deoptimization::_action_shift) \542declare_constant(Deoptimization::_reason_shift) \543declare_constant(Deoptimization::_debug_id_shift) \544\545declare_constant(Deoptimization::Action_none) \546declare_constant(Deoptimization::Action_maybe_recompile) \547declare_constant(Deoptimization::Action_reinterpret) \548declare_constant(Deoptimization::Action_make_not_entrant) \549declare_constant(Deoptimization::Action_make_not_compilable) \550\551declare_constant(Deoptimization::Reason_none) \552declare_constant(Deoptimization::Reason_null_check) \553declare_constant(Deoptimization::Reason_range_check) \554declare_constant(Deoptimization::Reason_class_check) \555declare_constant(Deoptimization::Reason_array_check) \556declare_constant(Deoptimization::Reason_unreached0) \557declare_constant(Deoptimization::Reason_constraint) \558declare_constant(Deoptimization::Reason_div0_check) \559declare_constant(Deoptimization::Reason_loop_limit_check) \560declare_constant(Deoptimization::Reason_type_checked_inlining) \561declare_constant(Deoptimization::Reason_optimized_type_check) \562declare_constant(Deoptimization::Reason_aliasing) \563declare_constant(Deoptimization::Reason_transfer_to_interpreter) \564declare_constant(Deoptimization::Reason_not_compiled_exception_handler) \565declare_constant(Deoptimization::Reason_unresolved) \566declare_constant(Deoptimization::Reason_jsr_mismatch) \567declare_constant(Deoptimization::Reason_LIMIT) \568declare_constant(Deoptimization::_support_large_access_byte_array_virtualization) \569\570declare_constant(FieldInfo::access_flags_offset) \571declare_constant(FieldInfo::name_index_offset) \572declare_constant(FieldInfo::signature_index_offset) \573declare_constant(FieldInfo::initval_index_offset) \574declare_constant(FieldInfo::low_packed_offset) \575declare_constant(FieldInfo::high_packed_offset) \576declare_constant(FieldInfo::field_slots) \577\578declare_constant(InstanceKlass::linked) \579declare_constant(InstanceKlass::being_initialized) \580declare_constant(InstanceKlass::fully_initialized) \581\582/*********************************/ \583/* InstanceKlass _misc_flags */ \584/*********************************/ \585\586declare_constant(InstanceKlass::_misc_has_nonstatic_concrete_methods) \587declare_constant(InstanceKlass::_misc_declares_nonstatic_concrete_methods) \588\589declare_constant(JumpData::taken_off_set) \590declare_constant(JumpData::displacement_off_set) \591\592declare_preprocessor_constant("JVMCI::ok", JVMCI::ok) \593declare_preprocessor_constant("JVMCI::dependencies_failed", JVMCI::dependencies_failed) \594declare_preprocessor_constant("JVMCI::cache_full", JVMCI::cache_full) \595declare_preprocessor_constant("JVMCI::code_too_large", JVMCI::code_too_large) \596declare_constant(JVMCIRuntime::none) \597declare_constant(JVMCIRuntime::by_holder) \598declare_constant(JVMCIRuntime::by_full_signature) \599\600declare_constant(Klass::_lh_neutral_value) \601declare_constant(Klass::_lh_instance_slow_path_bit) \602declare_constant(Klass::_lh_log2_element_size_shift) \603declare_constant(Klass::_lh_log2_element_size_mask) \604declare_constant(Klass::_lh_element_type_shift) \605declare_constant(Klass::_lh_element_type_mask) \606declare_constant(Klass::_lh_header_size_shift) \607declare_constant(Klass::_lh_header_size_mask) \608declare_constant(Klass::_lh_array_tag_shift) \609declare_constant(Klass::_lh_array_tag_type_value) \610declare_constant(Klass::_lh_array_tag_obj_value) \611\612declare_constant(markWord::no_hash) \613\614declare_constant(Method::_caller_sensitive) \615declare_constant(Method::_force_inline) \616declare_constant(Method::_dont_inline) \617declare_constant(Method::_hidden) \618declare_constant(Method::_intrinsic_candidate) \619declare_constant(Method::_reserved_stack_access) \620\621declare_constant(Method::nonvirtual_vtable_index) \622declare_constant(Method::invalid_vtable_index) \623\624declare_constant(MultiBranchData::per_case_cell_count) \625\626declare_constant(ReceiverTypeData::nonprofiled_count_off_set) \627declare_constant(ReceiverTypeData::receiver_type_row_cell_count) \628declare_constant(ReceiverTypeData::receiver0_offset) \629declare_constant(ReceiverTypeData::count0_offset) \630\631declare_constant(vmIntrinsics::_invokeBasic) \632declare_constant(vmIntrinsics::_linkToVirtual) \633declare_constant(vmIntrinsics::_linkToStatic) \634declare_constant(vmIntrinsics::_linkToSpecial) \635declare_constant(vmIntrinsics::_linkToInterface) \636\637declare_constant(vmSymbols::FIRST_SID) \638declare_constant(vmSymbols::SID_LIMIT) \639640#define VM_LONG_CONSTANTS(declare_constant, declare_preprocessor_constant) \641declare_constant(InvocationCounter::count_increment) \642declare_constant(InvocationCounter::count_shift) \643\644declare_constant(markWord::hash_shift) \645declare_constant(markWord::monitor_value) \646\647declare_constant(markWord::biased_lock_mask_in_place) \648declare_constant(markWord::age_mask_in_place) \649declare_constant(markWord::epoch_mask_in_place) \650declare_constant(markWord::hash_mask) \651declare_constant(markWord::hash_mask_in_place) \652\653declare_constant(markWord::unlocked_value) \654declare_constant(markWord::biased_lock_pattern) \655\656declare_constant(markWord::no_hash_in_place) \657declare_constant(markWord::no_lock_in_place) \658659#define VM_ADDRESSES(declare_address, declare_preprocessor_address, declare_function) \660declare_function(SharedRuntime::register_finalizer) \661declare_function(SharedRuntime::exception_handler_for_return_address) \662declare_function(SharedRuntime::OSR_migration_end) \663declare_function(SharedRuntime::enable_stack_reserved_zone) \664declare_function(SharedRuntime::frem) \665declare_function(SharedRuntime::drem) \666\667declare_function(os::dll_load) \668declare_function(os::dll_lookup) \669declare_function(os::javaTimeMillis) \670declare_function(os::javaTimeNanos) \671\672declare_function(Deoptimization::fetch_unroll_info) \673declare_function(Deoptimization::uncommon_trap) \674declare_function(Deoptimization::unpack_frames) \675\676declare_function(JVMCIRuntime::new_instance) \677declare_function(JVMCIRuntime::new_array) \678declare_function(JVMCIRuntime::new_multi_array) \679declare_function(JVMCIRuntime::dynamic_new_array) \680declare_function(JVMCIRuntime::dynamic_new_instance) \681\682declare_function(JVMCIRuntime::new_instance_or_null) \683declare_function(JVMCIRuntime::new_array_or_null) \684declare_function(JVMCIRuntime::new_multi_array_or_null) \685declare_function(JVMCIRuntime::dynamic_new_array_or_null) \686declare_function(JVMCIRuntime::dynamic_new_instance_or_null) \687\688declare_function(JVMCIRuntime::invoke_static_method_one_arg) \689\690declare_function(JVMCIRuntime::vm_message) \691declare_function(JVMCIRuntime::identity_hash_code) \692declare_function(JVMCIRuntime::exception_handler_for_pc) \693declare_function(JVMCIRuntime::monitorenter) \694declare_function(JVMCIRuntime::monitorexit) \695declare_function(JVMCIRuntime::object_notify) \696declare_function(JVMCIRuntime::object_notifyAll) \697declare_function(JVMCIRuntime::throw_and_post_jvmti_exception) \698declare_function(JVMCIRuntime::throw_klass_external_name_exception) \699declare_function(JVMCIRuntime::throw_class_cast_exception) \700declare_function(JVMCIRuntime::log_primitive) \701declare_function(JVMCIRuntime::log_object) \702declare_function(JVMCIRuntime::log_printf) \703declare_function(JVMCIRuntime::vm_error) \704declare_function(JVMCIRuntime::load_and_clear_exception) \705G1GC_ONLY(declare_function(JVMCIRuntime::write_barrier_pre)) \706G1GC_ONLY(declare_function(JVMCIRuntime::write_barrier_post)) \707declare_function(JVMCIRuntime::validate_object) \708\709declare_function(JVMCIRuntime::test_deoptimize_call_int)710711712#if INCLUDE_G1GC713714#define VM_STRUCTS_JVMCI_G1GC(nonstatic_field, static_field) \715static_field(HeapRegion, LogOfHRGrainBytes, int)716717#define VM_INT_CONSTANTS_JVMCI_G1GC(declare_constant, declare_constant_with_value, declare_preprocessor_constant) \718declare_constant_with_value("G1CardTable::g1_young_gen", G1CardTable::g1_young_card_val()) \719declare_constant_with_value("G1ThreadLocalData::satb_mark_queue_active_offset", in_bytes(G1ThreadLocalData::satb_mark_queue_active_offset())) \720declare_constant_with_value("G1ThreadLocalData::satb_mark_queue_index_offset", in_bytes(G1ThreadLocalData::satb_mark_queue_index_offset())) \721declare_constant_with_value("G1ThreadLocalData::satb_mark_queue_buffer_offset", in_bytes(G1ThreadLocalData::satb_mark_queue_buffer_offset())) \722declare_constant_with_value("G1ThreadLocalData::dirty_card_queue_index_offset", in_bytes(G1ThreadLocalData::dirty_card_queue_index_offset())) \723declare_constant_with_value("G1ThreadLocalData::dirty_card_queue_buffer_offset", in_bytes(G1ThreadLocalData::dirty_card_queue_buffer_offset()))724725#endif // INCLUDE_G1GC726727728#ifdef LINUX729730#define VM_ADDRESSES_OS(declare_address, declare_preprocessor_address, declare_function) \731declare_preprocessor_address("RTLD_DEFAULT", RTLD_DEFAULT)732733#endif734735736#ifdef BSD737738#define VM_ADDRESSES_OS(declare_address, declare_preprocessor_address, declare_function) \739declare_preprocessor_address("RTLD_DEFAULT", RTLD_DEFAULT)740741#endif742743#ifdef AARCH64744745#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \746static_field(VM_Version, _zva_length, int) \747volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*)748749#define DECLARE_INT_CPU_FEATURE_CONSTANT(id, name, bit) GENERATE_VM_INT_CONSTANT_ENTRY(VM_Version::CPU_##id)750#define VM_INT_CPU_FEATURE_CONSTANTS CPU_FEATURE_FLAGS(DECLARE_INT_CPU_FEATURE_CONSTANT)751752#endif753754#ifdef X86755756#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field) \757volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*) \758static_field(VM_Version, _has_intel_jcc_erratum, bool)759760#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant) \761LP64_ONLY(declare_constant(frame::arg_reg_save_area_bytes)) \762declare_constant(frame::interpreter_frame_sender_sp_offset) \763declare_constant(frame::interpreter_frame_last_sp_offset)764765#define DECLARE_LONG_CPU_FEATURE_CONSTANT(id, name, bit) GENERATE_VM_LONG_CONSTANT_ENTRY(VM_Version::CPU_##id)766#define VM_LONG_CPU_FEATURE_CONSTANTS CPU_FEATURE_FLAGS(DECLARE_LONG_CPU_FEATURE_CONSTANT)767768#endif769770/*771* Dummy defines for architectures that don't use these.772*/773#ifndef VM_STRUCTS_CPU774#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field)775#endif776777#ifndef VM_INT_CONSTANTS_CPU778#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)779#endif780781#ifndef VM_LONG_CONSTANTS_CPU782#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant)783#endif784785#ifndef VM_ADDRESSES_OS786#define VM_ADDRESSES_OS(declare_address, declare_preprocessor_address, declare_function)787#endif788789//790// Instantiation of VMStructEntries, VMTypeEntries and VMIntConstantEntries791//792793// These initializers are allowed to access private fields in classes794// as long as class VMStructs is a friend795VMStructEntry JVMCIVMStructs::localHotSpotVMStructs[] = {796VM_STRUCTS(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,797GENERATE_STATIC_VM_STRUCT_ENTRY,798GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,799GENERATE_NONSTATIC_VM_STRUCT_ENTRY)800801VM_STRUCTS_CPU(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,802GENERATE_STATIC_VM_STRUCT_ENTRY,803GENERATE_UNCHECKED_NONSTATIC_VM_STRUCT_ENTRY,804GENERATE_NONSTATIC_VM_STRUCT_ENTRY,805GENERATE_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,806GENERATE_C2_NONSTATIC_VM_STRUCT_ENTRY,807GENERATE_C1_UNCHECKED_STATIC_VM_STRUCT_ENTRY,808GENERATE_C2_UNCHECKED_STATIC_VM_STRUCT_ENTRY)809810#if INCLUDE_G1GC811VM_STRUCTS_JVMCI_G1GC(GENERATE_NONSTATIC_VM_STRUCT_ENTRY,812GENERATE_STATIC_VM_STRUCT_ENTRY)813#endif814815GENERATE_VM_STRUCT_LAST_ENTRY()816};817818VMTypeEntry JVMCIVMStructs::localHotSpotVMTypes[] = {819VM_TYPES(GENERATE_VM_TYPE_ENTRY,820GENERATE_TOPLEVEL_VM_TYPE_ENTRY,821GENERATE_INTEGER_VM_TYPE_ENTRY,822GENERATE_UNSIGNED_INTEGER_VM_TYPE_ENTRY)823824GENERATE_VM_TYPE_LAST_ENTRY()825};826827VMIntConstantEntry JVMCIVMStructs::localHotSpotVMIntConstants[] = {828VM_INT_CONSTANTS(GENERATE_VM_INT_CONSTANT_ENTRY,829GENERATE_VM_INT_CONSTANT_WITH_VALUE_ENTRY,830GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)831832VM_INT_CONSTANTS_CPU(GENERATE_VM_INT_CONSTANT_ENTRY,833GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY,834GENERATE_C1_VM_INT_CONSTANT_ENTRY,835GENERATE_C2_VM_INT_CONSTANT_ENTRY,836GENERATE_C2_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)837838#if INCLUDE_G1GC839VM_INT_CONSTANTS_JVMCI_G1GC(GENERATE_VM_INT_CONSTANT_ENTRY,840GENERATE_VM_INT_CONSTANT_WITH_VALUE_ENTRY,841GENERATE_PREPROCESSOR_VM_INT_CONSTANT_ENTRY)842#endif843#ifdef VM_INT_CPU_FEATURE_CONSTANTS844VM_INT_CPU_FEATURE_CONSTANTS845#endif846GENERATE_VM_INT_CONSTANT_LAST_ENTRY()847};848849VMLongConstantEntry JVMCIVMStructs::localHotSpotVMLongConstants[] = {850VM_LONG_CONSTANTS(GENERATE_VM_LONG_CONSTANT_ENTRY,851GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)852853VM_LONG_CONSTANTS_CPU(GENERATE_VM_LONG_CONSTANT_ENTRY,854GENERATE_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY,855GENERATE_C1_VM_LONG_CONSTANT_ENTRY,856GENERATE_C2_VM_LONG_CONSTANT_ENTRY,857GENERATE_C2_PREPROCESSOR_VM_LONG_CONSTANT_ENTRY)858#ifdef VM_LONG_CPU_FEATURE_CONSTANTS859VM_LONG_CPU_FEATURE_CONSTANTS860#endif861GENERATE_VM_LONG_CONSTANT_LAST_ENTRY()862};863#undef DECLARE_CPU_FEATURE_FLAG864865VMAddressEntry JVMCIVMStructs::localHotSpotVMAddresses[] = {866VM_ADDRESSES(GENERATE_VM_ADDRESS_ENTRY,867GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY,868GENERATE_VM_FUNCTION_ENTRY)869VM_ADDRESSES_OS(GENERATE_VM_ADDRESS_ENTRY,870GENERATE_PREPROCESSOR_VM_ADDRESS_ENTRY,871GENERATE_VM_FUNCTION_ENTRY)872873GENERATE_VM_ADDRESS_LAST_ENTRY()874};875876int JVMCIVMStructs::localHotSpotVMStructs_count() {877// Ignore sentinel entry at the end878return (sizeof(localHotSpotVMStructs) / sizeof(VMStructEntry)) - 1;879}880int JVMCIVMStructs::localHotSpotVMTypes_count() {881// Ignore sentinel entry at the end882return (sizeof(localHotSpotVMTypes) / sizeof(VMTypeEntry)) - 1;883}884int JVMCIVMStructs::localHotSpotVMIntConstants_count() {885// Ignore sentinel entry at the end886return (sizeof(localHotSpotVMIntConstants) / sizeof(VMIntConstantEntry)) - 1;887}888int JVMCIVMStructs::localHotSpotVMLongConstants_count() {889// Ignore sentinel entry at the end890return (sizeof(localHotSpotVMLongConstants) / sizeof(VMLongConstantEntry)) - 1;891}892int JVMCIVMStructs::localHotSpotVMAddresses_count() {893// Ignore sentinel entry at the end894return (sizeof(localHotSpotVMAddresses) / sizeof(VMAddressEntry)) - 1;895}896897extern "C" {898JNIEXPORT VMStructEntry* jvmciHotSpotVMStructs = JVMCIVMStructs::localHotSpotVMStructs;899JNIEXPORT VMTypeEntry* jvmciHotSpotVMTypes = JVMCIVMStructs::localHotSpotVMTypes;900JNIEXPORT VMIntConstantEntry* jvmciHotSpotVMIntConstants = JVMCIVMStructs::localHotSpotVMIntConstants;901JNIEXPORT VMLongConstantEntry* jvmciHotSpotVMLongConstants = JVMCIVMStructs::localHotSpotVMLongConstants;902JNIEXPORT VMAddressEntry* jvmciHotSpotVMAddresses = JVMCIVMStructs::localHotSpotVMAddresses;903}904905#ifdef ASSERT906// This is used both to check the types of referenced fields and907// to ensure that all of the field types are present.908void JVMCIVMStructs::init() {909VM_STRUCTS(CHECK_NONSTATIC_VM_STRUCT_ENTRY,910CHECK_STATIC_VM_STRUCT_ENTRY,911CHECK_NO_OP,912CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY);913914915VM_STRUCTS_CPU(CHECK_NONSTATIC_VM_STRUCT_ENTRY,916CHECK_STATIC_VM_STRUCT_ENTRY,917CHECK_NO_OP,918CHECK_VOLATILE_NONSTATIC_VM_STRUCT_ENTRY,919CHECK_NONPRODUCT_NONSTATIC_VM_STRUCT_ENTRY,920CHECK_C2_NONSTATIC_VM_STRUCT_ENTRY,921CHECK_NO_OP,922CHECK_NO_OP);923924#if INCLUDE_G1GC925VM_STRUCTS_JVMCI_G1GC(CHECK_NONSTATIC_VM_STRUCT_ENTRY,926CHECK_STATIC_VM_STRUCT_ENTRY)927#endif928929VM_TYPES(CHECK_VM_TYPE_ENTRY,930CHECK_SINGLE_ARG_VM_TYPE_NO_OP,931CHECK_SINGLE_ARG_VM_TYPE_NO_OP,932CHECK_SINGLE_ARG_VM_TYPE_NO_OP);933}934935void jvmci_vmStructs_init() {936JVMCIVMStructs::init();937}938#endif // ASSERT939940941