< prev index next >

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

Print this page




 235     final int vmSymbolsSIDLimit = getConstant("vmSymbols::SID_LIMIT", Integer.class);
 236 
 237     /**
 238      * Returns the symbol in the {@code vmSymbols} table at position {@code index} as a
 239      * {@link String}.
 240      *
 241      * @param index position in the symbol table
 242      * @return the symbol at position id
 243      */
 244     String symbolAt(int index) {
 245         HotSpotJVMCIRuntimeProvider runtime = runtime();
 246         assert vmSymbolsFirstSID <= index && index < vmSymbolsSIDLimit : "index " + index + " is out of bounds";
 247         assert symbolPointerSize == Unsafe.ADDRESS_SIZE : "the following address read is broken";
 248         int offset = index * symbolPointerSize;
 249         return runtime.getCompilerToVM().getSymbol(UNSAFE.getAddress(vmSymbolsSymbols + offset));
 250     }
 251 
 252     final int universeBaseVtableSize = getFieldValue("CompilerToVM::Data::Universe_base_vtable_size", Integer.class, "int");
 253 
 254     final int baseVtableLength() {
 255         return universeBaseVtableSize / vtableEntrySize;
 256     }
 257 
 258     final int klassOffset = getFieldValue("java_lang_Class::_klass_offset", Integer.class, "int");
 259 
 260     /**
 261      * The DataLayout header size is the same as the cell size.
 262      */
 263     final int dataLayoutHeaderSize = getConstant("DataLayout::cell_size", Integer.class);
 264     final int dataLayoutTagOffset = getFieldOffset("DataLayout::_header._struct._tag", Integer.class, "u1");
 265     final int dataLayoutFlagsOffset = getFieldOffset("DataLayout::_header._struct._flags", Integer.class, "u1");
 266     final int dataLayoutBCIOffset = getFieldOffset("DataLayout::_header._struct._bci", Integer.class, "u2");
 267     final int dataLayoutCellSize = getConstant("DataLayout::cell_size", Integer.class);
 268 
 269     final int dataLayoutNoTag = getConstant("DataLayout::no_tag", Integer.class);
 270     final int dataLayoutBitDataTag = getConstant("DataLayout::bit_data_tag", Integer.class);
 271     final int dataLayoutCounterDataTag = getConstant("DataLayout::counter_data_tag", Integer.class);
 272     final int dataLayoutJumpDataTag = getConstant("DataLayout::jump_data_tag", Integer.class);
 273     final int dataLayoutReceiverTypeDataTag = getConstant("DataLayout::receiver_type_data_tag", Integer.class);
 274     final int dataLayoutVirtualCallDataTag = getConstant("DataLayout::virtual_call_data_tag", Integer.class);
 275     final int dataLayoutRetDataTag = getConstant("DataLayout::ret_data_tag", Integer.class);




 235     final int vmSymbolsSIDLimit = getConstant("vmSymbols::SID_LIMIT", Integer.class);
 236 
 237     /**
 238      * Returns the symbol in the {@code vmSymbols} table at position {@code index} as a
 239      * {@link String}.
 240      *
 241      * @param index position in the symbol table
 242      * @return the symbol at position id
 243      */
 244     String symbolAt(int index) {
 245         HotSpotJVMCIRuntimeProvider runtime = runtime();
 246         assert vmSymbolsFirstSID <= index && index < vmSymbolsSIDLimit : "index " + index + " is out of bounds";
 247         assert symbolPointerSize == Unsafe.ADDRESS_SIZE : "the following address read is broken";
 248         int offset = index * symbolPointerSize;
 249         return runtime.getCompilerToVM().getSymbol(UNSAFE.getAddress(vmSymbolsSymbols + offset));
 250     }
 251 
 252     final int universeBaseVtableSize = getFieldValue("CompilerToVM::Data::Universe_base_vtable_size", Integer.class, "int");
 253 
 254     final int baseVtableLength() {
 255         return universeBaseVtableSize / (vtableEntrySize / heapWordSize);
 256     }
 257 
 258     final int klassOffset = getFieldValue("java_lang_Class::_klass_offset", Integer.class, "int");
 259 
 260     /**
 261      * The DataLayout header size is the same as the cell size.
 262      */
 263     final int dataLayoutHeaderSize = getConstant("DataLayout::cell_size", Integer.class);
 264     final int dataLayoutTagOffset = getFieldOffset("DataLayout::_header._struct._tag", Integer.class, "u1");
 265     final int dataLayoutFlagsOffset = getFieldOffset("DataLayout::_header._struct._flags", Integer.class, "u1");
 266     final int dataLayoutBCIOffset = getFieldOffset("DataLayout::_header._struct._bci", Integer.class, "u2");
 267     final int dataLayoutCellSize = getConstant("DataLayout::cell_size", Integer.class);
 268 
 269     final int dataLayoutNoTag = getConstant("DataLayout::no_tag", Integer.class);
 270     final int dataLayoutBitDataTag = getConstant("DataLayout::bit_data_tag", Integer.class);
 271     final int dataLayoutCounterDataTag = getConstant("DataLayout::counter_data_tag", Integer.class);
 272     final int dataLayoutJumpDataTag = getConstant("DataLayout::jump_data_tag", Integer.class);
 273     final int dataLayoutReceiverTypeDataTag = getConstant("DataLayout::receiver_type_data_tag", Integer.class);
 274     final int dataLayoutVirtualCallDataTag = getConstant("DataLayout::virtual_call_data_tag", Integer.class);
 275     final int dataLayoutRetDataTag = getConstant("DataLayout::ret_data_tag", Integer.class);


< prev index next >