< prev index next >

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotVMConfig.java

Print this page

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

 50         int speculationLengthBits = getConstant("JVMCINMethodData::SPECULATION_LENGTH_BITS", Integer.class);
 51         JVMCIError.guarantee(HotSpotSpeculationEncoding.LENGTH_BITS == speculationLengthBits, "%d != %d", HotSpotSpeculationEncoding.LENGTH_BITS, speculationLengthBits);
 52     }
 53 
 54     /**
 55      * Gets the host architecture name for the purpose of finding the corresponding
 56      * {@linkplain HotSpotJVMCIBackendFactory backend}.
 57      */
 58     static String getHostArchitectureName() {
 59         Architecture arch = Architecture.current();
 60         switch (arch) {
 61             case X64: return "amd64";
 62             default:  return arch.name().toLowerCase();
 63         }
 64     }
 65 
 66     final boolean useDeferredInitBarriers = getFlag("ReduceInitialCardMarks", Boolean.class);
 67 
 68     final boolean useCompressedOops = getFlag("UseCompressedOops", Boolean.class);
 69 


 70     final int objectAlignment = getFlag("ObjectAlignmentInBytes", Integer.class);
 71 
 72     final int klassOffsetInBytes = getFieldValue("CompilerToVM::Data::oopDesc_klass_offset_in_bytes", Integer.class, "int");
 73 
 74     final int subklassOffset = getFieldOffset("Klass::_subklass", Integer.class, "Klass*");
 75     final int superOffset = getFieldOffset("Klass::_super", Integer.class, "Klass*");
 76     final int nextSiblingOffset = getFieldOffset("Klass::_next_sibling", Integer.class, "Klass*");
 77     final int superCheckOffsetOffset = getFieldOffset("Klass::_super_check_offset", Integer.class, "juint");
 78     final int secondarySuperCacheOffset = getFieldOffset("Klass::_secondary_super_cache", Integer.class, "Klass*");
 79 
 80     final int classLoaderDataOffset = getFieldOffset("Klass::_class_loader_data", Integer.class, "ClassLoaderData*");
 81 
 82     /**
 83      * The offset of the _java_mirror field (of type {@link Class}) in a Klass.
 84      */
 85     final int javaMirrorOffset = getFieldOffset("Klass::_java_mirror", Integer.class, "OopHandle");
 86 
 87     final int klassAccessFlagsOffset = getFieldOffset("Klass::_access_flags", Integer.class, "AccessFlags");
 88     final int klassLayoutHelperOffset = getFieldOffset("Klass::_layout_helper", Integer.class, "jint");
 89 

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

 50         int speculationLengthBits = getConstant("JVMCINMethodData::SPECULATION_LENGTH_BITS", Integer.class);
 51         JVMCIError.guarantee(HotSpotSpeculationEncoding.LENGTH_BITS == speculationLengthBits, "%d != %d", HotSpotSpeculationEncoding.LENGTH_BITS, speculationLengthBits);
 52     }
 53 
 54     /**
 55      * Gets the host architecture name for the purpose of finding the corresponding
 56      * {@linkplain HotSpotJVMCIBackendFactory backend}.
 57      */
 58     static String getHostArchitectureName() {
 59         Architecture arch = Architecture.current();
 60         switch (arch) {
 61             case X64: return "amd64";
 62             default:  return arch.name().toLowerCase();
 63         }
 64     }
 65 
 66     final boolean useDeferredInitBarriers = getFlag("ReduceInitialCardMarks", Boolean.class);
 67 
 68     final boolean useCompressedOops = getFlag("UseCompressedOops", Boolean.class);
 69 
 70     final boolean useClassMetaspaceForAllClasses = getFlag("UseClassMetaspaceForAllClasses", Boolean.class);
 71 
 72     final int objectAlignment = getFlag("ObjectAlignmentInBytes", Integer.class);
 73 
 74     final int klassOffsetInBytes = getFieldValue("CompilerToVM::Data::oopDesc_klass_offset_in_bytes", Integer.class, "int");
 75 
 76     final int subklassOffset = getFieldOffset("Klass::_subklass", Integer.class, "Klass*");
 77     final int superOffset = getFieldOffset("Klass::_super", Integer.class, "Klass*");
 78     final int nextSiblingOffset = getFieldOffset("Klass::_next_sibling", Integer.class, "Klass*");
 79     final int superCheckOffsetOffset = getFieldOffset("Klass::_super_check_offset", Integer.class, "juint");
 80     final int secondarySuperCacheOffset = getFieldOffset("Klass::_secondary_super_cache", Integer.class, "Klass*");
 81 
 82     final int classLoaderDataOffset = getFieldOffset("Klass::_class_loader_data", Integer.class, "ClassLoaderData*");
 83 
 84     /**
 85      * The offset of the _java_mirror field (of type {@link Class}) in a Klass.
 86      */
 87     final int javaMirrorOffset = getFieldOffset("Klass::_java_mirror", Integer.class, "OopHandle");
 88 
 89     final int klassAccessFlagsOffset = getFieldOffset("Klass::_access_flags", Integer.class, "AccessFlags");
 90     final int klassLayoutHelperOffset = getFieldOffset("Klass::_layout_helper", Integer.class, "jint");
 91 
< prev index next >