Mercurial > hg > graal-jvmci-8
view jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java @ 23704:8a7b88cb7f22
back port of JDK-8139379
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 21 Jun 2016 15:41:01 +0200 |
parents | 9ac04c6047c8 |
children | 8b40dfc73eea |
line wrap: on
line source
/* * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package jdk.vm.ci.hotspot; import static jdk.vm.ci.hotspot.UnsafeAccess.UNSAFE; import sun.misc.Unsafe; /** * Used to access native configuration details. */ class HotSpotVMConfig extends HotSpotVMConfigAccess { static HotSpotVMConfig config() { return HotSpotJVMCIRuntime.runtime().getConfig(); } private final String osArch = getHostArchitectureName(); @SuppressWarnings("try") HotSpotVMConfig(HotSpotVMConfigStore store) { super(store); } /** * Gets the host architecture name for the purpose of finding the corresponding * {@linkplain HotSpotJVMCIBackendFactory backend}. */ String getHostArchitectureName() { String arch = System.getProperty("os.arch"); if (arch.equals("x86_64")) { arch = "amd64"; } else if (arch.equals("sparcv9")) { arch = "sparc"; } return arch; } private final Integer amd64RequiredInt = osArch.equals("amd64") ? null : 0; final boolean windowsOs = System.getProperty("os.name", "").startsWith("Windows"); final boolean linuxOs = System.getProperty("os.name", "").startsWith("Linux"); // Compressed Oops related values. final boolean useCompressedOops = getFlag("UseCompressedOops", Boolean.class); final boolean useCompressedClassPointers = getFlag("UseCompressedClassPointers", Boolean.class); final int objectAlignment = getFlag("ObjectAlignmentInBytes", Integer.class); final int prototypeMarkWordOffset = getFieldOffset("Klass::_prototype_header", Integer.class, "markOop"); final int subklassOffset = getFieldOffset("Klass::_subklass", Integer.class, "Klass*"); final int nextSiblingOffset = getFieldOffset("Klass::_next_sibling", Integer.class, "Klass*"); final int superCheckOffsetOffset = getFieldOffset("Klass::_super_check_offset", Integer.class, "juint"); final int secondarySuperCacheOffset = getFieldOffset("Klass::_secondary_super_cache", Integer.class, "Klass*"); final int secondarySupersOffset = getFieldOffset("Klass::_secondary_supers", Integer.class, "Array<Klass*>*"); final int classMirrorOffset = getFieldOffset("Klass::_java_mirror", Integer.class, "oop"); final int klassSuperKlassOffset = getFieldOffset("Klass::_super", Integer.class, "Klass*"); final int klassModifierFlagsOffset = getFieldOffset("Klass::_modifier_flags", Integer.class, "jint"); final int klassAccessFlagsOffset = getFieldOffset("Klass::_access_flags", Integer.class, "AccessFlags"); final int klassLayoutHelperOffset = getFieldOffset("Klass::_layout_helper", Integer.class, "jint"); final int klassNameOffset = getFieldOffset("Klass::_name", Integer.class, "Symbol*"); final int klassLayoutHelperNeutralValue = getConstant("Klass::_lh_neutral_value", Integer.class); final int klassLayoutHelperInstanceSlowPathBit = getConstant("Klass::_lh_instance_slow_path_bit", Integer.class); final int layoutHelperLog2ElementSizeShift = getConstant("Klass::_lh_log2_element_size_shift", Integer.class); final int layoutHelperLog2ElementSizeMask = getConstant("Klass::_lh_log2_element_size_mask", Integer.class); final int layoutHelperElementTypeShift = getConstant("Klass::_lh_element_type_shift", Integer.class); final int layoutHelperElementTypeMask = getConstant("Klass::_lh_element_type_mask", Integer.class); final int layoutHelperHeaderSizeShift = getConstant("Klass::_lh_header_size_shift", Integer.class); final int layoutHelperHeaderSizeMask = getConstant("Klass::_lh_header_size_mask", Integer.class); final int layoutHelperArrayTagShift = getConstant("Klass::_lh_array_tag_shift", Integer.class); final int layoutHelperArrayTagTypeValue = getConstant("Klass::_lh_array_tag_type_value", Integer.class); final int layoutHelperArrayTagObjectValue = getConstant("Klass::_lh_array_tag_obj_value", Integer.class); /** * This filters out the bit that differentiates a type array from an object array. */ int layoutHelperElementTypePrimitiveInPlace() { return (layoutHelperArrayTagTypeValue & ~layoutHelperArrayTagObjectValue) << layoutHelperArrayTagShift; } final int arrayKlassComponentMirrorOffset = getFieldOffset("ArrayKlass::_component_mirror", Integer.class, "oop"); final int vtableEntrySize = getTypeSize("vtableEntry"); final int vtableEntryMethodOffset = getFieldOffset("vtableEntry::_method", Integer.class, "Method*"); final int arrayU1LengthOffset = getFieldOffset("Array<int>::_length", Integer.class, "int"); final int arrayU1DataOffset = getFieldOffset("Array<u1>::_data", Integer.class); final int arrayU2DataOffset = getFieldOffset("Array<u2>::_data", Integer.class); final int metaspaceArrayLengthOffset = getFieldOffset("Array<Klass*>::_length", Integer.class, "int"); final int metaspaceArrayBaseOffset = getFieldOffset("Array<Klass*>::_data[0]", Integer.class, "Klass*"); final int instanceKlassSourceFileNameIndexOffset = getFieldOffset("InstanceKlass::_source_file_name_index", Integer.class, "u2"); final int instanceKlassInitStateOffset = getFieldOffset("InstanceKlass::_init_state", Integer.class, "u1"); final int instanceKlassConstantsOffset = getFieldOffset("InstanceKlass::_constants", Integer.class, "ConstantPool*"); final int instanceKlassFieldsOffset = getFieldOffset("InstanceKlass::_fields", Integer.class, "Array<u2>*"); final int instanceKlassStateLinked = getConstant("InstanceKlass::linked", Integer.class); final int instanceKlassStateFullyInitialized = getConstant("InstanceKlass::fully_initialized", Integer.class); final int arrayClassElementOffset = getFieldOffset("ObjArrayKlass::_element_klass", Integer.class, "Klass*"); final int fieldInfoAccessFlagsOffset = getConstant("FieldInfo::access_flags_offset", Integer.class); final int fieldInfoNameIndexOffset = getConstant("FieldInfo::name_index_offset", Integer.class); final int fieldInfoSignatureIndexOffset = getConstant("FieldInfo::signature_index_offset", Integer.class); final int fieldInfoInitvalIndexOffset = getConstant("FieldInfo::initval_index_offset", Integer.class); final int fieldInfoLowPackedOffset = getConstant("FieldInfo::low_packed_offset", Integer.class); final int fieldInfoHighPackedOffset = getConstant("FieldInfo::high_packed_offset", Integer.class); final int fieldInfoFieldSlots = getConstant("FieldInfo::field_slots", Integer.class); final int fieldInfoTagSize = getConstant("FIELDINFO_TAG_SIZE", Integer.class); final int jvmAccFieldInternal = getConstant("JVM_ACC_FIELD_INTERNAL", Integer.class); final int jvmAccFieldStable = getConstant("JVM_ACC_FIELD_STABLE", Integer.class); final int jvmAccFieldHasGenericSignature = getConstant("JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE", Integer.class); final int jvmAccWrittenFlags = getConstant("JVM_ACC_WRITTEN_FLAGS", Integer.class); final int jvmAccIsCloneable = getConstant("JVM_ACC_IS_CLONEABLE", Integer.class); final int runtimeCallStackSize = getConstant("frame::arg_reg_save_area_bytes", Integer.class, amd64RequiredInt); final int markWordNoHashInPlace = getConstant("markOopDesc::no_hash_in_place", Integer.class); final int markWordNoLockInPlace = getConstant("markOopDesc::no_lock_in_place", Integer.class); long arrayPrototypeMarkWord() { return markWordNoHashInPlace | markWordNoLockInPlace; } final int methodAccessFlagsOffset = getFieldOffset("Method::_access_flags", Integer.class, "AccessFlags"); final int methodConstMethodOffset = getFieldOffset("Method::_constMethod", Integer.class, "ConstMethod*"); final int methodIntrinsicIdOffset = getFieldOffset("Method::_intrinsic_id", Integer.class, "u1"); final int methodFlagsOffset = getFieldOffset("Method::_flags", Integer.class, "u1"); final int methodVtableIndexOffset = getFieldOffset("Method::_vtable_index", Integer.class, "int"); final int methodFlagsCallerSensitive = getConstant("Method::_caller_sensitive", Integer.class); final int methodFlagsForceInline = getConstant("Method::_force_inline", Integer.class); final int methodFlagsDontInline = getConstant("Method::_dont_inline", Integer.class); final int nonvirtualVtableIndex = getConstant("Method::nonvirtual_vtable_index", Integer.class); final int invalidVtableIndex = getConstant("Method::invalid_vtable_index", Integer.class); final int invocationEntryBci = getConstant("InvocationEntryBci", Integer.class); final int extraStackEntries = getFieldValue("CompilerToVM::Data::Method_extra_stack_entries", Integer.class, "int"); final int constMethodConstantsOffset = getFieldOffset("ConstMethod::_constants", Integer.class, "ConstantPool*"); final int constMethodFlagsOffset = getFieldOffset("ConstMethod::_flags", Integer.class, "u2"); final int constMethodCodeSizeOffset = getFieldOffset("ConstMethod::_code_size", Integer.class, "u2"); final int constMethodNameIndexOffset = getFieldOffset("ConstMethod::_name_index", Integer.class, "u2"); final int constMethodSignatureIndexOffset = getFieldOffset("ConstMethod::_signature_index", Integer.class, "u2"); final int constMethodMaxStackOffset = getFieldOffset("ConstMethod::_max_stack", Integer.class, "u2"); final int methodMaxLocalsOffset = getFieldOffset("ConstMethod::_max_locals", Integer.class, "u2"); final int constMethodHasLineNumberTable = getConstant("ConstMethod::_has_linenumber_table", Integer.class); final int constMethodHasLocalVariableTable = getConstant("ConstMethod::_has_localvariable_table", Integer.class); final int constMethodHasExceptionTable = getConstant("ConstMethod::_has_exception_table", Integer.class); final int exceptionTableElementSize = getTypeSize("ExceptionTableElement"); final int exceptionTableElementStartPcOffset = getFieldOffset("ExceptionTableElement::start_pc", Integer.class, "u2"); final int exceptionTableElementEndPcOffset = getFieldOffset("ExceptionTableElement::end_pc", Integer.class, "u2"); final int exceptionTableElementHandlerPcOffset = getFieldOffset("ExceptionTableElement::handler_pc", Integer.class, "u2"); final int exceptionTableElementCatchTypeIndexOffset = getFieldOffset("ExceptionTableElement::catch_type_index", Integer.class, "u2"); final int localVariableTableElementSize = getTypeSize("LocalVariableTableElement"); final int localVariableTableElementStartBciOffset = getFieldOffset("LocalVariableTableElement::start_bci", Integer.class, "u2"); final int localVariableTableElementLengthOffset = getFieldOffset("LocalVariableTableElement::length", Integer.class, "u2"); final int localVariableTableElementNameCpIndexOffset = getFieldOffset("LocalVariableTableElement::name_cp_index", Integer.class, "u2"); final int localVariableTableElementDescriptorCpIndexOffset = getFieldOffset("LocalVariableTableElement::descriptor_cp_index", Integer.class, "u2"); final int localVariableTableElementSignatureCpIndexOffset = getFieldOffset("LocalVariableTableElement::signature_cp_index", Integer.class, "u2"); final int localVariableTableElementSlotOffset = getFieldOffset("LocalVariableTableElement::slot", Integer.class, "u2"); final int constantPoolSize = getTypeSize("ConstantPool"); final int constantPoolTagsOffset = getFieldOffset("ConstantPool::_tags", Integer.class, "Array<u1>*"); final int constantPoolHolderOffset = getFieldOffset("ConstantPool::_pool_holder", Integer.class, "InstanceKlass*"); final int constantPoolLengthOffset = getFieldOffset("ConstantPool::_length", Integer.class, "int"); final int constantPoolCpCacheIndexTag = getConstant("ConstantPool::CPCACHE_INDEX_TAG", Integer.class); final int jvmConstantUtf8 = getConstant("JVM_CONSTANT_Utf8", Integer.class); final int jvmConstantInteger = getConstant("JVM_CONSTANT_Integer", Integer.class); final int jvmConstantLong = getConstant("JVM_CONSTANT_Long", Integer.class); final int jvmConstantFloat = getConstant("JVM_CONSTANT_Float", Integer.class); final int jvmConstantDouble = getConstant("JVM_CONSTANT_Double", Integer.class); final int jvmConstantClass = getConstant("JVM_CONSTANT_Class", Integer.class); final int jvmConstantUnresolvedClass = getConstant("JVM_CONSTANT_UnresolvedClass", Integer.class); final int jvmConstantUnresolvedClassInError = getConstant("JVM_CONSTANT_UnresolvedClassInError", Integer.class); final int jvmConstantString = getConstant("JVM_CONSTANT_String", Integer.class); final int jvmConstantFieldref = getConstant("JVM_CONSTANT_Fieldref", Integer.class); final int jvmConstantMethodref = getConstant("JVM_CONSTANT_Methodref", Integer.class); final int jvmConstantInterfaceMethodref = getConstant("JVM_CONSTANT_InterfaceMethodref", Integer.class); final int jvmConstantNameAndType = getConstant("JVM_CONSTANT_NameAndType", Integer.class); final int jvmConstantMethodHandle = getConstant("JVM_CONSTANT_MethodHandle", Integer.class); final int jvmConstantMethodHandleInError = getConstant("JVM_CONSTANT_MethodHandleInError", Integer.class); final int jvmConstantMethodType = getConstant("JVM_CONSTANT_MethodType", Integer.class); final int jvmConstantMethodTypeInError = getConstant("JVM_CONSTANT_MethodTypeInError", Integer.class); final int jvmConstantInvokeDynamic = getConstant("JVM_CONSTANT_InvokeDynamic", Integer.class); final int jvmConstantExternalMax = getConstant("JVM_CONSTANT_ExternalMax", Integer.class); final int jvmConstantInternalMin = getConstant("JVM_CONSTANT_InternalMin", Integer.class); final int jvmConstantInternalMax = getConstant("JVM_CONSTANT_InternalMax", Integer.class); final int heapWordSize = getConstant("HeapWordSize", Integer.class); final int symbolPointerSize = getTypeSize("Symbol*"); final int symbolLengthOffset = getFieldOffset("Symbol::_length", Integer.class, "unsigned short"); final int symbolBodyOffset = getFieldOffset("Symbol::_body[0]", Integer.class, "jbyte"); final long vmSymbolsSymbols = getFieldAddress("vmSymbols::_symbols[0]", "Symbol*"); final int vmSymbolsFirstSID = getConstant("vmSymbols::FIRST_SID", Integer.class); final int vmSymbolsSIDLimit = getConstant("vmSymbols::SID_LIMIT", Integer.class); /** * Returns the symbol in the {@code vmSymbols} table at position {@code index} as a * {@link String}. * * @param index position in the symbol table * @return the symbol at position id */ String symbolAt(int index) { HotSpotJVMCIRuntime runtime = HotSpotJVMCIRuntime.runtime(); assert vmSymbolsFirstSID <= index && index < vmSymbolsSIDLimit : "index " + index + " is out of bounds"; assert symbolPointerSize == Unsafe.ADDRESS_SIZE : "the following address read is broken"; int offset = index * symbolPointerSize; return runtime.getCompilerToVM().getSymbol(UNSAFE.getAddress(vmSymbolsSymbols + offset)); } final int klassHasFinalizerFlag = getConstant("JVM_ACC_HAS_FINALIZER", Integer.class); // Modifier.SYNTHETIC is not so we get it via vmStructs. final int syntheticFlag = getConstant("JVM_ACC_SYNTHETIC", Integer.class); final int klassVtableStartOffset = getFieldValue("CompilerToVM::Data::Klass_vtable_start_offset", Integer.class, "int"); final int klassVtableLengthOffset = getFieldValue("CompilerToVM::Data::Klass_vtable_length_offset", Integer.class, "int"); final int universeBaseVtableSize = getFieldValue("CompilerToVM::Data::Universe_base_vtable_size", Integer.class, "int"); final int baseVtableLength() { return universeBaseVtableSize / vtableEntrySize; } final int klassOffset = getFieldValue("java_lang_Class::_klass_offset", Integer.class, "int"); final int methodDataOffset = getFieldOffset("Method::_method_data", Integer.class, "MethodData*"); final int methodCodeOffset = getFieldOffset("Method::_code", Integer.class, "nmethod*"); final int methodDataSize = getFieldOffset("MethodData::_size", Integer.class, "int"); final int methodDataDataSize = getFieldOffset("MethodData::_data_size", Integer.class, "int"); final int methodDataOopDataOffset = getFieldOffset("MethodData::_data[0]", Integer.class, "intptr_t"); final int methodDataOopTrapHistoryOffset = getFieldOffset("MethodData::_trap_hist._array[0]", Integer.class, "u1"); final int methodDataIRSizeOffset = getFieldOffset("MethodData::_jvmci_ir_size", Integer.class, "int"); final int nmethodCompLevelOffset = getFieldOffset("nmethod::_comp_level", Integer.class, "int"); final int compilationLevelNone = getConstant("CompLevel_none", Integer.class); final int compilationLevelSimple = getConstant("CompLevel_simple", Integer.class); final int compilationLevelLimitedProfile = getConstant("CompLevel_limited_profile", Integer.class); final int compilationLevelFullProfile = getConstant("CompLevel_full_profile", Integer.class); final int compilationLevelFullOptimization = getConstant("CompLevel_full_optimization", Integer.class); final int compLevelAdjustmentNone = getConstant("JVMCIRuntime::none", Integer.class); final int compLevelAdjustmentByHolder = getConstant("JVMCIRuntime::by_holder", Integer.class); final int compLevelAdjustmentByFullSignature = getConstant("JVMCIRuntime::by_full_signature", Integer.class); /** * This is the largest stack offset encodeable in an OopMapValue. Offsets larger than this will * throw an exception during code installation. */ final int maxOopMapStackOffset = getFieldValue("JVMCIRuntime::max_oop_map_stack_offset", Integer.class, "int"); /** * The DataLayout header size is the same as the cell size. */ final int dataLayoutHeaderSize = getConstant("DataLayout::cell_size", Integer.class); final int dataLayoutTagOffset = getFieldOffset("DataLayout::_header._struct._tag", Integer.class, "u1"); final int dataLayoutFlagsOffset = getFieldOffset("DataLayout::_header._struct._flags", Integer.class, "u1"); final int dataLayoutBCIOffset = getFieldOffset("DataLayout::_header._struct._bci", Integer.class, "u2"); final int dataLayoutCellsOffset = getFieldOffset("DataLayout::_cells[0]", Integer.class, "intptr_t"); final int dataLayoutCellSize = getConstant("DataLayout::cell_size", Integer.class); final int dataLayoutNoTag = getConstant("DataLayout::no_tag", Integer.class); final int dataLayoutBitDataTag = getConstant("DataLayout::bit_data_tag", Integer.class); final int dataLayoutCounterDataTag = getConstant("DataLayout::counter_data_tag", Integer.class); final int dataLayoutJumpDataTag = getConstant("DataLayout::jump_data_tag", Integer.class); final int dataLayoutReceiverTypeDataTag = getConstant("DataLayout::receiver_type_data_tag", Integer.class); final int dataLayoutVirtualCallDataTag = getConstant("DataLayout::virtual_call_data_tag", Integer.class); final int dataLayoutRetDataTag = getConstant("DataLayout::ret_data_tag", Integer.class); final int dataLayoutBranchDataTag = getConstant("DataLayout::branch_data_tag", Integer.class); final int dataLayoutMultiBranchDataTag = getConstant("DataLayout::multi_branch_data_tag", Integer.class); final int dataLayoutArgInfoDataTag = getConstant("DataLayout::arg_info_data_tag", Integer.class); final int dataLayoutCallTypeDataTag = getConstant("DataLayout::call_type_data_tag", Integer.class); final int dataLayoutVirtualCallTypeDataTag = getConstant("DataLayout::virtual_call_type_data_tag", Integer.class); final int dataLayoutParametersTypeDataTag = getConstant("DataLayout::parameters_type_data_tag", Integer.class); final int dataLayoutSpeculativeTrapDataTag = getConstant("DataLayout::speculative_trap_data_tag", Integer.class); final int bciProfileWidth = getFlag("BciProfileWidth", Integer.class); final int typeProfileWidth = getFlag("TypeProfileWidth", Integer.class); final int methodProfileWidth = getFlag("MethodProfileWidth", Integer.class); final int deoptReasonNone = getConstant("Deoptimization::Reason_none", Integer.class); final int deoptReasonNullCheck = getConstant("Deoptimization::Reason_null_check", Integer.class); final int deoptReasonRangeCheck = getConstant("Deoptimization::Reason_range_check", Integer.class); final int deoptReasonClassCheck = getConstant("Deoptimization::Reason_class_check", Integer.class); final int deoptReasonArrayCheck = getConstant("Deoptimization::Reason_array_check", Integer.class); final int deoptReasonUnreached0 = getConstant("Deoptimization::Reason_unreached0", Integer.class); final int deoptReasonTypeCheckInlining = getConstant("Deoptimization::Reason_type_checked_inlining", Integer.class); final int deoptReasonOptimizedTypeCheck = getConstant("Deoptimization::Reason_optimized_type_check", Integer.class); final int deoptReasonNotCompiledExceptionHandler = getConstant("Deoptimization::Reason_not_compiled_exception_handler", Integer.class); final int deoptReasonUnresolved = getConstant("Deoptimization::Reason_unresolved", Integer.class); final int deoptReasonJsrMismatch = getConstant("Deoptimization::Reason_jsr_mismatch", Integer.class); final int deoptReasonDiv0Check = getConstant("Deoptimization::Reason_div0_check", Integer.class); final int deoptReasonConstraint = getConstant("Deoptimization::Reason_constraint", Integer.class); final int deoptReasonLoopLimitCheck = getConstant("Deoptimization::Reason_loop_limit_check", Integer.class); final int deoptReasonAliasing = getConstant("Deoptimization::Reason_aliasing", Integer.class); final int deoptReasonTransferToInterpreter = getConstant("Deoptimization::Reason_transfer_to_interpreter", Integer.class); final int deoptReasonOSROffset = getConstant("Deoptimization::Reason_LIMIT", Integer.class); final int deoptActionNone = getConstant("Deoptimization::Action_none", Integer.class); final int deoptActionMaybeRecompile = getConstant("Deoptimization::Action_maybe_recompile", Integer.class); final int deoptActionReinterpret = getConstant("Deoptimization::Action_reinterpret", Integer.class); final int deoptActionMakeNotEntrant = getConstant("Deoptimization::Action_make_not_entrant", Integer.class); final int deoptActionMakeNotCompilable = getConstant("Deoptimization::Action_make_not_compilable", Integer.class); final int deoptimizationActionBits = getConstant("Deoptimization::_action_bits", Integer.class); final int deoptimizationReasonBits = getConstant("Deoptimization::_reason_bits", Integer.class); final int deoptimizationDebugIdBits = getConstant("Deoptimization::_debug_id_bits", Integer.class); final int deoptimizationActionShift = getConstant("Deoptimization::_action_shift", Integer.class); final int deoptimizationReasonShift = getConstant("Deoptimization::_reason_shift", Integer.class); final int deoptimizationDebugIdShift = getConstant("Deoptimization::_debug_id_shift", Integer.class); final int vmIntrinsicInvokeBasic = getConstant("vmIntrinsics::_invokeBasic", Integer.class); final int vmIntrinsicLinkToVirtual = getConstant("vmIntrinsics::_linkToVirtual", Integer.class); final int vmIntrinsicLinkToStatic = getConstant("vmIntrinsics::_linkToStatic", Integer.class); final int vmIntrinsicLinkToSpecial = getConstant("vmIntrinsics::_linkToSpecial", Integer.class); final int vmIntrinsicLinkToInterface = getConstant("vmIntrinsics::_linkToInterface", Integer.class); final int codeInstallResultOk = getConstant("JVMCIEnv::ok", Integer.class); final int codeInstallResultDependenciesFailed = getConstant("JVMCIEnv::dependencies_failed", Integer.class); final int codeInstallResultDependenciesInvalid = getConstant("JVMCIEnv::dependencies_invalid", Integer.class); final int codeInstallResultCacheFull = getConstant("JVMCIEnv::cache_full", Integer.class); final int codeInstallResultCodeTooLarge = getConstant("JVMCIEnv::code_too_large", Integer.class); String getCodeInstallResultDescription(int codeInstallResult) { if (codeInstallResult == codeInstallResultOk) { return "ok"; } if (codeInstallResult == codeInstallResultDependenciesFailed) { return "dependencies failed"; } if (codeInstallResult == codeInstallResultDependenciesInvalid) { return "dependencies invalid"; } if (codeInstallResult == codeInstallResultCacheFull) { return "code cache is full"; } if (codeInstallResult == codeInstallResultCodeTooLarge) { return "code is too large"; } assert false : codeInstallResult; return "unknown"; } final int compilerToVMKlassTag = getConstant("CompilerToVM::KLASS_TAG", Integer.class); final int compilerToVMSymbolTag = getConstant("CompilerToVM::SYMBOL_TAG", Integer.class); final int bitDataExceptionSeenFlag = getConstant("BitData::exception_seen_flag", Integer.class); final int bitDataNullSeenFlag = getConstant("BitData::null_seen_flag", Integer.class); final int methodDataCountOffset = getConstant("CounterData::count_off", Integer.class); final int jumpDataTakenOffset = getConstant("JumpData::taken_off_set", Integer.class); final int jumpDataDisplacementOffset = getConstant("JumpData::displacement_off_set", Integer.class); final int receiverTypeDataNonprofiledCountOffset = getConstant("ReceiverTypeData::nonprofiled_count_off_set", Integer.class); final int receiverTypeDataReceiverTypeRowCellCount = getConstant("ReceiverTypeData::receiver_type_row_cell_count", Integer.class); final int receiverTypeDataReceiver0Offset = getConstant("ReceiverTypeData::receiver0_offset", Integer.class); final int receiverTypeDataCount0Offset = getConstant("ReceiverTypeData::count0_offset", Integer.class); final int branchDataNotTakenOffset = getConstant("BranchData::not_taken_off_set", Integer.class); final int arrayDataArrayLenOffset = getConstant("ArrayData::array_len_off_set", Integer.class); final int arrayDataArrayStartOffset = getConstant("ArrayData::array_start_off_set", Integer.class); final int multiBranchDataPerCaseCellCount = getConstant("MultiBranchData::per_case_cell_count", Integer.class); }