66 // Get raw pointer to the array that contains all gHotSpotVM values. |
65 // Get raw pointer to the array that contains all gHotSpotVM values. |
67 final long gHotSpotVMData = compilerToVm.initializeConfiguration(this); |
66 final long gHotSpotVMData = compilerToVm.initializeConfiguration(this); |
68 assert gHotSpotVMData != 0; |
67 assert gHotSpotVMData != 0; |
69 |
68 |
70 // Make FindBugs happy. |
69 // Make FindBugs happy. |
71 gHotSpotVMStructs = 0; |
70 jvmciHotSpotVMStructs = 0; |
72 gHotSpotVMTypes = 0; |
71 jvmciHotSpotVMTypes = 0; |
73 gHotSpotVMIntConstants = 0; |
72 jvmciHotSpotVMIntConstants = 0; |
74 gHotSpotVMLongConstants = 0; |
73 jvmciHotSpotVMLongConstants = 0; |
75 gHotSpotVMAddresses = 0; |
74 jvmciHotSpotVMAddresses = 0; |
76 |
75 |
77 // Initialize the gHotSpotVM fields. |
76 // Initialize the gHotSpotVM fields. |
78 for (Field f : HotSpotVMConfig.class.getDeclaredFields()) { |
77 for (Field f : HotSpotVMConfig.class.getDeclaredFields()) { |
79 if (f.isAnnotationPresent(HotSpotVMData.class)) { |
78 if (f.isAnnotationPresent(HotSpotVMData.class)) { |
80 HotSpotVMData annotation = f.getAnnotation(HotSpotVMData.class); |
79 HotSpotVMData annotation = f.getAnnotation(HotSpotVMData.class); |
87 } |
86 } |
88 } |
87 } |
89 } |
88 } |
90 |
89 |
91 // Quick sanity check. |
90 // Quick sanity check. |
92 assert gHotSpotVMStructs != 0; |
91 assert jvmciHotSpotVMStructs != 0; |
93 assert gHotSpotVMTypes != 0; |
92 assert jvmciHotSpotVMTypes != 0; |
94 assert gHotSpotVMIntConstants != 0; |
93 assert jvmciHotSpotVMIntConstants != 0; |
95 assert gHotSpotVMLongConstants != 0; |
94 assert jvmciHotSpotVMLongConstants != 0; |
96 assert gHotSpotVMAddresses != 0; |
95 assert jvmciHotSpotVMAddresses != 0; |
97 |
96 |
98 initialize(); |
97 initialize(); |
99 |
98 |
100 oopEncoding = new CompressEncoding(narrowOopBase, narrowOopShift, logMinObjAlignment()); |
99 oopEncoding = new CompressEncoding(narrowOopBase, narrowOopShift, logMinObjAlignment()); |
101 klassEncoding = new CompressEncoding(narrowKlassBase, narrowKlassShift, logKlassAlignment); |
100 klassEncoding = new CompressEncoding(narrowKlassBase, narrowKlassShift, logKlassAlignment); |
102 |
|
103 final long barrierSetAddress = UNSAFE.getAddress(universeCollectedHeap + collectedHeapBarrierSetOffset); |
|
104 final int kind = UNSAFE.getInt(barrierSetAddress + barrierSetFakeRttiOffset + fakeRttiConcreteTagOffset); |
|
105 if ((kind == barrierSetCardTableModRef) || (kind == barrierSetCardTableForRS) || (kind == barrierSetCardTableExtension) || (kind == barrierSetG1SATBCT) || (kind == barrierSetG1SATBCTLogging)) { |
|
106 final long base = UNSAFE.getAddress(barrierSetAddress + cardTableModRefBSByteMapBaseOffset); |
|
107 assert base != 0 : "unexpected byte_map_base: " + base; |
|
108 cardtableStartAddress = base; |
|
109 cardtableShift = cardTableModRefBSCardShift; |
|
110 } else if (kind == barrierSetModRef) { |
|
111 // No post barriers |
|
112 cardtableStartAddress = 0; |
|
113 cardtableShift = 0; |
|
114 } else { |
|
115 cardtableStartAddress = -1; |
|
116 cardtableShift = -1; |
|
117 } |
|
118 |
|
119 // Now handle all HotSpotVMManual fields. |
|
120 inlineCacheMissStub = inlineCacheMissBlob + UNSAFE.getInt(inlineCacheMissBlob + codeBlobCodeOffsetOffset); |
|
121 handleWrongMethodStub = wrongMethodBlob + UNSAFE.getInt(wrongMethodBlob + codeBlobCodeOffsetOffset); |
|
122 handleDeoptStub = deoptBlob + UNSAFE.getInt(deoptBlob + codeBlobCodeOffsetOffset) + UNSAFE.getInt(deoptBlob + deoptimizationBlobUnpackOffsetOffset); |
|
123 uncommonTrapStub = deoptBlob + UNSAFE.getInt(deoptBlob + codeBlobCodeOffsetOffset) + UNSAFE.getInt(deoptBlob + deoptimizationBlobUncommonTrapOffsetOffset); |
|
124 |
|
125 tlabAlignmentReserve = roundUp(threadLocalAllocBufferEndReserve(), minObjAlignment()); |
|
126 |
101 |
127 assert check(); |
102 assert check(); |
128 assert HotSpotVMConfigVerifier.check(); |
103 assert HotSpotVMConfigVerifier.check(); |
129 } |
104 } |
130 |
105 |
137 * Initialize fields by reading their values from vmStructs. |
112 * Initialize fields by reading their values from vmStructs. |
138 */ |
113 */ |
139 private void initialize() { |
114 private void initialize() { |
140 // Fill the VM fields hash map. |
115 // Fill the VM fields hash map. |
141 HashMap<String, VMFields.Field> vmFields = new HashMap<>(); |
116 HashMap<String, VMFields.Field> vmFields = new HashMap<>(); |
142 for (VMFields.Field e : new VMFields(gHotSpotVMStructs)) { |
117 for (VMFields.Field e : new VMFields(jvmciHotSpotVMStructs)) { |
143 vmFields.put(e.getName(), e); |
118 vmFields.put(e.getName(), e); |
144 } |
119 } |
145 |
120 |
146 // Fill the VM types hash map. |
121 // Fill the VM types hash map. |
147 HashMap<String, VMTypes.Type> vmTypes = new HashMap<>(); |
122 HashMap<String, VMTypes.Type> vmTypes = new HashMap<>(); |
148 for (VMTypes.Type e : new VMTypes(gHotSpotVMTypes)) { |
123 for (VMTypes.Type e : new VMTypes(jvmciHotSpotVMTypes)) { |
149 vmTypes.put(e.getTypeName(), e); |
124 vmTypes.put(e.getTypeName(), e); |
150 } |
125 } |
151 |
126 |
152 // Fill the VM constants hash map. |
127 // Fill the VM constants hash map. |
153 HashMap<String, AbstractConstant> vmConstants = new HashMap<>(); |
128 HashMap<String, AbstractConstant> vmConstants = new HashMap<>(); |
154 for (AbstractConstant e : new VMIntConstants(gHotSpotVMIntConstants)) { |
129 for (AbstractConstant e : new VMIntConstants(jvmciHotSpotVMIntConstants)) { |
155 vmConstants.put(e.getName(), e); |
130 vmConstants.put(e.getName(), e); |
156 } |
131 } |
157 for (AbstractConstant e : new VMAddresses(gHotSpotVMLongConstants)) { |
132 for (AbstractConstant e : new VMLongConstants(jvmciHotSpotVMLongConstants)) { |
158 vmConstants.put(e.getName(), e); |
133 vmConstants.put(e.getName(), e); |
159 } |
134 } |
160 |
135 |
161 // Fill the VM addresses hash map. |
136 // Fill the VM addresses hash map. |
162 HashMap<String, VMAddresses.Address> vmAddresses = new HashMap<>(); |
137 HashMap<String, VMAddresses.Address> vmAddresses = new HashMap<>(); |
163 for (VMAddresses.Address e : new VMAddresses(gHotSpotVMAddresses)) { |
138 for (VMAddresses.Address e : new VMAddresses(jvmciHotSpotVMAddresses)) { |
164 vmAddresses.put(e.getName(), e); |
139 vmAddresses.put(e.getName(), e); |
165 } |
140 } |
166 |
141 |
167 // Fill the flags hash map. |
142 // Fill the flags hash map. |
168 HashMap<String, Flags.Flag> flags = new HashMap<>(); |
143 HashMap<String, Flags.Flag> flags = new HashMap<>(); |
369 } |
345 } |
370 |
346 |
371 /** |
347 /** |
372 * VMStructEntry (see {@code vmStructs.hpp}). |
348 * VMStructEntry (see {@code vmStructs.hpp}). |
373 */ |
349 */ |
374 @HotSpotVMData(index = 0) @Stable private long gHotSpotVMStructs; |
350 @HotSpotVMData(index = 0) @Stable private long jvmciHotSpotVMStructs; |
375 @HotSpotVMData(index = 1) @Stable private long gHotSpotVMStructEntryTypeNameOffset; |
351 @HotSpotVMData(index = 1) @Stable private long jvmciHotSpotVMStructEntryTypeNameOffset; |
376 @HotSpotVMData(index = 2) @Stable private long gHotSpotVMStructEntryFieldNameOffset; |
352 @HotSpotVMData(index = 2) @Stable private long jvmciHotSpotVMStructEntryFieldNameOffset; |
377 @HotSpotVMData(index = 3) @Stable private long gHotSpotVMStructEntryTypeStringOffset; |
353 @HotSpotVMData(index = 3) @Stable private long jvmciHotSpotVMStructEntryTypeStringOffset; |
378 @HotSpotVMData(index = 4) @Stable private long gHotSpotVMStructEntryIsStaticOffset; |
354 @HotSpotVMData(index = 4) @Stable private long jvmciHotSpotVMStructEntryIsStaticOffset; |
379 @HotSpotVMData(index = 5) @Stable private long gHotSpotVMStructEntryOffsetOffset; |
355 @HotSpotVMData(index = 5) @Stable private long jvmciHotSpotVMStructEntryOffsetOffset; |
380 @HotSpotVMData(index = 6) @Stable private long gHotSpotVMStructEntryAddressOffset; |
356 @HotSpotVMData(index = 6) @Stable private long jvmciHotSpotVMStructEntryAddressOffset; |
381 @HotSpotVMData(index = 7) @Stable private long gHotSpotVMStructEntryArrayStride; |
357 @HotSpotVMData(index = 7) @Stable private long jvmciHotSpotVMStructEntryArrayStride; |
382 |
358 |
383 final class VMFields implements Iterable<VMFields.Field> { |
359 final class VMFields implements Iterable<VMFields.Field> { |
384 |
360 |
385 private final long address; |
361 private final long address; |
386 |
362 |
420 Field(long address) { |
396 Field(long address) { |
421 this.entryAddress = address; |
397 this.entryAddress = address; |
422 } |
398 } |
423 |
399 |
424 public String getTypeName() { |
400 public String getTypeName() { |
425 long typeNameAddress = UNSAFE.getAddress(entryAddress + gHotSpotVMStructEntryTypeNameOffset); |
401 long typeNameAddress = UNSAFE.getAddress(entryAddress + jvmciHotSpotVMStructEntryTypeNameOffset); |
426 return readCString(UNSAFE, typeNameAddress); |
402 return readCString(UNSAFE, typeNameAddress); |
427 } |
403 } |
428 |
404 |
429 public String getFieldName() { |
405 public String getFieldName() { |
430 long fieldNameAddress = UNSAFE.getAddress(entryAddress + gHotSpotVMStructEntryFieldNameOffset); |
406 long fieldNameAddress = UNSAFE.getAddress(entryAddress + jvmciHotSpotVMStructEntryFieldNameOffset); |
431 return readCString(UNSAFE, fieldNameAddress); |
407 return readCString(UNSAFE, fieldNameAddress); |
432 } |
408 } |
433 |
409 |
434 public String getTypeString() { |
410 public String getTypeString() { |
435 long typeStringAddress = UNSAFE.getAddress(entryAddress + gHotSpotVMStructEntryTypeStringOffset); |
411 long typeStringAddress = UNSAFE.getAddress(entryAddress + jvmciHotSpotVMStructEntryTypeStringOffset); |
436 return readCString(UNSAFE, typeStringAddress); |
412 return readCString(UNSAFE, typeStringAddress); |
437 } |
413 } |
438 |
414 |
439 public boolean isStatic() { |
415 public boolean isStatic() { |
440 return UNSAFE.getInt(entryAddress + gHotSpotVMStructEntryIsStaticOffset) != 0; |
416 return UNSAFE.getInt(entryAddress + jvmciHotSpotVMStructEntryIsStaticOffset) != 0; |
441 } |
417 } |
442 |
418 |
443 public long getOffset() { |
419 public long getOffset() { |
444 return UNSAFE.getLong(entryAddress + gHotSpotVMStructEntryOffsetOffset); |
420 return UNSAFE.getLong(entryAddress + jvmciHotSpotVMStructEntryOffsetOffset); |
445 } |
421 } |
446 |
422 |
447 public long getAddress() { |
423 public long getAddress() { |
448 return UNSAFE.getAddress(entryAddress + gHotSpotVMStructEntryAddressOffset); |
424 return UNSAFE.getAddress(entryAddress + jvmciHotSpotVMStructEntryAddressOffset); |
449 } |
425 } |
450 |
426 |
451 public String getName() { |
427 public String getName() { |
452 String typeName = getTypeName(); |
428 String typeName = getTypeName(); |
453 String fieldName = getFieldName(); |
429 String fieldName = getFieldName(); |
485 } |
462 } |
486 |
463 |
487 /** |
464 /** |
488 * VMTypeEntry (see vmStructs.hpp). |
465 * VMTypeEntry (see vmStructs.hpp). |
489 */ |
466 */ |
490 @HotSpotVMData(index = 8) @Stable private long gHotSpotVMTypes; |
467 @HotSpotVMData(index = 8) @Stable private long jvmciHotSpotVMTypes; |
491 @HotSpotVMData(index = 9) @Stable private long gHotSpotVMTypeEntryTypeNameOffset; |
468 @HotSpotVMData(index = 9) @Stable private long jvmciHotSpotVMTypeEntryTypeNameOffset; |
492 @HotSpotVMData(index = 10) @Stable private long gHotSpotVMTypeEntrySuperclassNameOffset; |
469 @HotSpotVMData(index = 10) @Stable private long jvmciHotSpotVMTypeEntrySuperclassNameOffset; |
493 @HotSpotVMData(index = 11) @Stable private long gHotSpotVMTypeEntryIsOopTypeOffset; |
470 @HotSpotVMData(index = 11) @Stable private long jvmciHotSpotVMTypeEntryIsOopTypeOffset; |
494 @HotSpotVMData(index = 12) @Stable private long gHotSpotVMTypeEntryIsIntegerTypeOffset; |
471 @HotSpotVMData(index = 12) @Stable private long jvmciHotSpotVMTypeEntryIsIntegerTypeOffset; |
495 @HotSpotVMData(index = 13) @Stable private long gHotSpotVMTypeEntryIsUnsignedOffset; |
472 @HotSpotVMData(index = 13) @Stable private long jvmciHotSpotVMTypeEntryIsUnsignedOffset; |
496 @HotSpotVMData(index = 14) @Stable private long gHotSpotVMTypeEntrySizeOffset; |
473 @HotSpotVMData(index = 14) @Stable private long jvmciHotSpotVMTypeEntrySizeOffset; |
497 @HotSpotVMData(index = 15) @Stable private long gHotSpotVMTypeEntryArrayStride; |
474 @HotSpotVMData(index = 15) @Stable private long jvmciHotSpotVMTypeEntryArrayStride; |
498 |
475 |
499 final class VMTypes implements Iterable<VMTypes.Type> { |
476 final class VMTypes implements Iterable<VMTypes.Type> { |
500 |
477 |
501 private final long address; |
478 private final long address; |
502 |
479 |
536 Type(long address) { |
513 Type(long address) { |
537 this.entryAddress = address; |
514 this.entryAddress = address; |
538 } |
515 } |
539 |
516 |
540 public String getTypeName() { |
517 public String getTypeName() { |
541 long typeNameAddress = UNSAFE.getAddress(entryAddress + gHotSpotVMTypeEntryTypeNameOffset); |
518 long typeNameAddress = UNSAFE.getAddress(entryAddress + jvmciHotSpotVMTypeEntryTypeNameOffset); |
542 return readCString(UNSAFE, typeNameAddress); |
519 return readCString(UNSAFE, typeNameAddress); |
543 } |
520 } |
544 |
521 |
545 public String getSuperclassName() { |
522 public String getSuperclassName() { |
546 long superclassNameAddress = UNSAFE.getAddress(entryAddress + gHotSpotVMTypeEntrySuperclassNameOffset); |
523 long superclassNameAddress = UNSAFE.getAddress(entryAddress + jvmciHotSpotVMTypeEntrySuperclassNameOffset); |
547 return readCString(UNSAFE, superclassNameAddress); |
524 return readCString(UNSAFE, superclassNameAddress); |
548 } |
525 } |
549 |
526 |
550 public boolean isOopType() { |
527 public boolean isOopType() { |
551 return UNSAFE.getInt(entryAddress + gHotSpotVMTypeEntryIsOopTypeOffset) != 0; |
528 return UNSAFE.getInt(entryAddress + jvmciHotSpotVMTypeEntryIsOopTypeOffset) != 0; |
552 } |
529 } |
553 |
530 |
554 public boolean isIntegerType() { |
531 public boolean isIntegerType() { |
555 return UNSAFE.getInt(entryAddress + gHotSpotVMTypeEntryIsIntegerTypeOffset) != 0; |
532 return UNSAFE.getInt(entryAddress + jvmciHotSpotVMTypeEntryIsIntegerTypeOffset) != 0; |
556 } |
533 } |
557 |
534 |
558 public boolean isUnsigned() { |
535 public boolean isUnsigned() { |
559 return UNSAFE.getInt(entryAddress + gHotSpotVMTypeEntryIsUnsignedOffset) != 0; |
536 return UNSAFE.getInt(entryAddress + jvmciHotSpotVMTypeEntryIsUnsignedOffset) != 0; |
560 } |
537 } |
561 |
538 |
562 public long getSize() { |
539 public long getSize() { |
563 return UNSAFE.getLong(entryAddress + gHotSpotVMTypeEntrySizeOffset); |
540 return UNSAFE.getLong(entryAddress + jvmciHotSpotVMTypeEntrySizeOffset); |
564 } |
541 } |
565 |
542 |
566 @Override |
543 @Override |
567 public String toString() { |
544 public String toString() { |
568 return String.format("Type[typeName=%s, superclassName=%s, isOopType=%b, isIntegerType=%b, isUnsigned=%b, size=%d]", getTypeName(), getSuperclassName(), isOopType(), isIntegerType(), |
545 return String.format("Type[typeName=%s, superclassName=%s, isOopType=%b, isIntegerType=%b, isUnsigned=%b, size=%d]", getTypeName(), getSuperclassName(), isOopType(), isIntegerType(), |
920 public final int logMinObjAlignment() { |
897 public final int logMinObjAlignment() { |
921 return (int) (Math.log(objectAlignment) / Math.log(2)); |
898 return (int) (Math.log(objectAlignment) / Math.log(2)); |
922 } |
899 } |
923 |
900 |
924 @HotSpotVMType(name = "narrowKlass", get = HotSpotVMType.Type.SIZE) @Stable public int narrowKlassSize; |
901 @HotSpotVMType(name = "narrowKlass", get = HotSpotVMType.Type.SIZE) @Stable public int narrowKlassSize; |
925 @HotSpotVMField(name = "Universe::_narrow_klass._base", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long narrowKlassBase; |
902 @HotSpotVMField(name = "CompilerToVM::Data::Universe_narrow_klass_base", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long narrowKlassBase; |
926 @HotSpotVMField(name = "Universe::_narrow_klass._shift", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int narrowKlassShift; |
903 @HotSpotVMField(name = "CompilerToVM::Data::Universe_narrow_klass_shift", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int narrowKlassShift; |
927 @HotSpotVMConstant(name = "LogKlassAlignmentInBytes") @Stable public int logKlassAlignment; |
904 @HotSpotVMConstant(name = "LogKlassAlignmentInBytes") @Stable public int logKlassAlignment; |
928 |
905 |
929 // CPU capabilities |
906 // CPU capabilities |
930 @HotSpotVMFlag(name = "UseSSE") @Stable public int useSSE; |
907 @HotSpotVMFlag(name = "UseSSE") @Stable public int useSSE; |
931 @HotSpotVMFlag(name = "UseAVX", archs = {"amd64"}) @Stable public int useAVX; |
908 @HotSpotVMFlag(name = "UseAVX", archs = {"amd64"}) @Stable public int useAVX; |
932 |
|
933 @HotSpotVMField(name = "Abstract_VM_Version::_reserve_for_allocation_prefetch", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int abstractVmVersionReserveForAllocationPrefetch; |
|
934 |
909 |
935 // X86 specific values |
910 // X86 specific values |
936 @HotSpotVMField(name = "VM_Version::_cpuFeatures", type = "uint64_t", get = HotSpotVMField.Type.VALUE, archs = {"amd64"}) @Stable public long x86CPUFeatures; |
911 @HotSpotVMField(name = "VM_Version::_cpuFeatures", type = "uint64_t", get = HotSpotVMField.Type.VALUE, archs = {"amd64"}) @Stable public long x86CPUFeatures; |
937 @HotSpotVMConstant(name = "VM_Version::CPU_CX8", archs = {"amd64"}) @Stable public long cpuCX8; |
912 @HotSpotVMConstant(name = "VM_Version::CPU_CX8", archs = {"amd64"}) @Stable public long cpuCX8; |
938 @HotSpotVMConstant(name = "VM_Version::CPU_CMOV", archs = {"amd64"}) @Stable public long cpuCMOV; |
913 @HotSpotVMConstant(name = "VM_Version::CPU_CMOV", archs = {"amd64"}) @Stable public long cpuCMOV; |
1052 @HotSpotVMType(name = "InstanceKlass", get = HotSpotVMType.Type.SIZE) @Stable public int instanceKlassSize; |
1027 @HotSpotVMType(name = "InstanceKlass", get = HotSpotVMType.Type.SIZE) @Stable public int instanceKlassSize; |
1053 @HotSpotVMField(name = "InstanceKlass::_source_file_name_index", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int instanceKlassSourceFileNameIndexOffset; |
1028 @HotSpotVMField(name = "InstanceKlass::_source_file_name_index", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int instanceKlassSourceFileNameIndexOffset; |
1054 @HotSpotVMField(name = "InstanceKlass::_init_state", type = "u1", get = HotSpotVMField.Type.OFFSET) @Stable public int instanceKlassInitStateOffset; |
1029 @HotSpotVMField(name = "InstanceKlass::_init_state", type = "u1", get = HotSpotVMField.Type.OFFSET) @Stable public int instanceKlassInitStateOffset; |
1055 @HotSpotVMField(name = "InstanceKlass::_constants", type = "ConstantPool*", get = HotSpotVMField.Type.OFFSET) @Stable public int instanceKlassConstantsOffset; |
1030 @HotSpotVMField(name = "InstanceKlass::_constants", type = "ConstantPool*", get = HotSpotVMField.Type.OFFSET) @Stable public int instanceKlassConstantsOffset; |
1056 @HotSpotVMField(name = "InstanceKlass::_fields", type = "Array<u2>*", get = HotSpotVMField.Type.OFFSET) @Stable public int instanceKlassFieldsOffset; |
1031 @HotSpotVMField(name = "InstanceKlass::_fields", type = "Array<u2>*", get = HotSpotVMField.Type.OFFSET) @Stable public int instanceKlassFieldsOffset; |
1057 @HotSpotVMField(name = "InstanceKlass::_vtable_len", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int instanceKlassVtableLengthOffset; |
1032 @HotSpotVMField(name = "CompilerToVM::Data::InstanceKlass_vtable_start_offset", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int instanceKlassVtableStartOffset; |
|
1033 @HotSpotVMField(name = "CompilerToVM::Data::InstanceKlass_vtable_length_offset", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int instanceKlassVtableLengthOffset; |
1058 |
1034 |
1059 @HotSpotVMConstant(name = "InstanceKlass::linked") @Stable public int instanceKlassStateLinked; |
1035 @HotSpotVMConstant(name = "InstanceKlass::linked") @Stable public int instanceKlassStateLinked; |
1060 @HotSpotVMConstant(name = "InstanceKlass::fully_initialized") @Stable public int instanceKlassStateFullyInitialized; |
1036 @HotSpotVMConstant(name = "InstanceKlass::fully_initialized") @Stable public int instanceKlassStateFullyInitialized; |
1061 |
1037 |
1062 /** |
1038 /** |
1063 * See {@code InstanceKlass::vtable_start_offset()}. |
1039 * See {@code InstanceKlass::vtable_start_offset()}. |
1064 */ |
1040 */ |
1065 public final int instanceKlassVtableStartOffset() { |
1041 public final int instanceKlassVtableStartOffset() { |
1066 return roundUp(instanceKlassSize, heapWordSize); |
1042 return instanceKlassVtableStartOffset * heapWordSize; |
1067 } |
|
1068 |
|
1069 // TODO use CodeUtil method once it's moved from NumUtil |
|
1070 private static int roundUp(int number, int mod) { |
|
1071 return ((number + mod - 1) / mod) * mod; |
|
1072 } |
1043 } |
1073 |
1044 |
1074 @HotSpotVMType(name = "arrayOopDesc", get = HotSpotVMType.Type.SIZE) @Stable public int arrayOopDescSize; |
1045 @HotSpotVMType(name = "arrayOopDesc", get = HotSpotVMType.Type.SIZE) @Stable public int arrayOopDescSize; |
1075 |
1046 |
1076 /** |
1047 /** |
1098 @HotSpotVMConstant(name = "FieldInfo::high_packed_offset") @Stable public int fieldInfoHighPackedOffset; |
1069 @HotSpotVMConstant(name = "FieldInfo::high_packed_offset") @Stable public int fieldInfoHighPackedOffset; |
1099 @HotSpotVMConstant(name = "FieldInfo::field_slots") @Stable public int fieldInfoFieldSlots; |
1070 @HotSpotVMConstant(name = "FieldInfo::field_slots") @Stable public int fieldInfoFieldSlots; |
1100 |
1071 |
1101 @HotSpotVMConstant(name = "FIELDINFO_TAG_SIZE") @Stable public int fieldInfoTagSize; |
1072 @HotSpotVMConstant(name = "FIELDINFO_TAG_SIZE") @Stable public int fieldInfoTagSize; |
1102 |
1073 |
|
1074 @HotSpotVMConstant(name = "JVM_ACC_MONITOR_MATCH") @Stable public int jvmAccMonitorMatch; |
|
1075 @HotSpotVMConstant(name = "JVM_ACC_HAS_MONITOR_BYTECODES") @Stable public int jvmAccHasMonitorBytecodes; |
|
1076 @HotSpotVMConstant(name = "JVM_ACC_HAS_FINALIZER") @Stable public int jvmAccHasFinalizer; |
1103 @HotSpotVMConstant(name = "JVM_ACC_FIELD_INTERNAL") @Stable public int jvmAccFieldInternal; |
1077 @HotSpotVMConstant(name = "JVM_ACC_FIELD_INTERNAL") @Stable public int jvmAccFieldInternal; |
1104 @HotSpotVMConstant(name = "JVM_ACC_FIELD_STABLE") @Stable public int jvmAccFieldStable; |
1078 @HotSpotVMConstant(name = "JVM_ACC_FIELD_STABLE") @Stable public int jvmAccFieldStable; |
1105 @HotSpotVMConstant(name = "JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE") @Stable public int jvmAccFieldHasGenericSignature; |
1079 @HotSpotVMConstant(name = "JVM_ACC_FIELD_HAS_GENERIC_SIGNATURE") @Stable public int jvmAccFieldHasGenericSignature; |
1106 @HotSpotVMConstant(name = "JVM_ACC_WRITTEN_FLAGS") @Stable public int jvmAccWrittenFlags; |
1080 @HotSpotVMConstant(name = "JVM_ACC_WRITTEN_FLAGS") @Stable public int jvmAccWrittenFlags; |
|
1081 |
|
1082 // Modifier.SYNTHETIC is not public so we get it via vmStructs. |
|
1083 @HotSpotVMConstant(name = "JVM_ACC_SYNTHETIC") @Stable public int jvmAccSynthetic; |
|
1084 |
|
1085 /** |
|
1086 * @see HotSpotResolvedObjectTypeImpl#createField |
|
1087 */ |
|
1088 @HotSpotVMConstant(name = "JVM_RECOGNIZED_FIELD_MODIFIERS") @Stable public int recognizedFieldModifiers; |
1107 |
1089 |
1108 @HotSpotVMField(name = "Thread::_tlab", type = "ThreadLocalAllocBuffer", get = HotSpotVMField.Type.OFFSET) @Stable public int threadTlabOffset; |
1090 @HotSpotVMField(name = "Thread::_tlab", type = "ThreadLocalAllocBuffer", get = HotSpotVMField.Type.OFFSET) @Stable public int threadTlabOffset; |
1109 |
1091 |
1110 @HotSpotVMField(name = "JavaThread::_anchor", type = "JavaFrameAnchor", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadAnchorOffset; |
1092 @HotSpotVMField(name = "JavaThread::_anchor", type = "JavaFrameAnchor", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadAnchorOffset; |
1111 @HotSpotVMField(name = "JavaThread::_threadObj", type = "oop", get = HotSpotVMField.Type.OFFSET) @Stable public int threadObjectOffset; |
1093 @HotSpotVMField(name = "JavaThread::_threadObj", type = "oop", get = HotSpotVMField.Type.OFFSET) @Stable public int threadObjectOffset; |
1200 @HotSpotVMConstant(name = "satbMarkQueueIndexOffset") @Stable private int satbMarkQueueIndexOffset; |
1182 @HotSpotVMConstant(name = "satbMarkQueueIndexOffset") @Stable private int satbMarkQueueIndexOffset; |
1201 @HotSpotVMConstant(name = "satbMarkQueueActiveOffset") @Stable private int satbMarkQueueActiveOffset; |
1183 @HotSpotVMConstant(name = "satbMarkQueueActiveOffset") @Stable private int satbMarkQueueActiveOffset; |
1202 |
1184 |
1203 @HotSpotVMField(name = "OSThread::_interrupted", type = "jint", get = HotSpotVMField.Type.OFFSET) @Stable public int osThreadInterruptedOffset; |
1185 @HotSpotVMField(name = "OSThread::_interrupted", type = "jint", get = HotSpotVMField.Type.OFFSET) @Stable public int osThreadInterruptedOffset; |
1204 |
1186 |
1205 @HotSpotVMConstant(name = "markOopDesc::unlocked_value") @Stable public int unlockedMask; |
1187 @HotSpotVMConstant(name = "markOopDesc::hash_shift") @Stable public long markOopDescHashShift; |
|
1188 |
1206 @HotSpotVMConstant(name = "markOopDesc::biased_lock_mask_in_place") @Stable public int biasedLockMaskInPlace; |
1189 @HotSpotVMConstant(name = "markOopDesc::biased_lock_mask_in_place") @Stable public int biasedLockMaskInPlace; |
1207 @HotSpotVMConstant(name = "markOopDesc::age_mask_in_place") @Stable public int ageMaskInPlace; |
1190 @HotSpotVMConstant(name = "markOopDesc::age_mask_in_place") @Stable public int ageMaskInPlace; |
1208 @HotSpotVMConstant(name = "markOopDesc::epoch_mask_in_place") @Stable public int epochMaskInPlace; |
1191 @HotSpotVMConstant(name = "markOopDesc::epoch_mask_in_place") @Stable public int epochMaskInPlace; |
1209 |
|
1210 @HotSpotVMConstant(name = "markOopDesc::hash_shift") @Stable public long markOopDescHashShift; |
|
1211 @HotSpotVMConstant(name = "markOopDesc::hash_mask") @Stable public long markOopDescHashMask; |
1192 @HotSpotVMConstant(name = "markOopDesc::hash_mask") @Stable public long markOopDescHashMask; |
1212 @HotSpotVMConstant(name = "markOopDesc::hash_mask_in_place") @Stable public long markOopDescHashMaskInPlace; |
1193 @HotSpotVMConstant(name = "markOopDesc::hash_mask_in_place") @Stable public long markOopDescHashMaskInPlace; |
1213 |
1194 |
|
1195 @HotSpotVMConstant(name = "markOopDesc::unlocked_value") @Stable public int unlockedMask; |
1214 @HotSpotVMConstant(name = "markOopDesc::biased_lock_pattern") @Stable public int biasedLockPattern; |
1196 @HotSpotVMConstant(name = "markOopDesc::biased_lock_pattern") @Stable public int biasedLockPattern; |
|
1197 |
1215 @HotSpotVMConstant(name = "markOopDesc::no_hash_in_place") @Stable public int markWordNoHashInPlace; |
1198 @HotSpotVMConstant(name = "markOopDesc::no_hash_in_place") @Stable public int markWordNoHashInPlace; |
1216 @HotSpotVMConstant(name = "markOopDesc::no_lock_in_place") @Stable public int markWordNoLockInPlace; |
1199 @HotSpotVMConstant(name = "markOopDesc::no_lock_in_place") @Stable public int markWordNoLockInPlace; |
1217 |
1200 |
1218 /** |
1201 /** |
1219 * See {@code markOopDesc::prototype()}. |
1202 * See {@code markOopDesc::prototype()}. |
1244 @HotSpotVMField(name = "Method::_access_flags", type = "AccessFlags", get = HotSpotVMField.Type.OFFSET) @Stable public int methodAccessFlagsOffset; |
1227 @HotSpotVMField(name = "Method::_access_flags", type = "AccessFlags", get = HotSpotVMField.Type.OFFSET) @Stable public int methodAccessFlagsOffset; |
1245 @HotSpotVMField(name = "Method::_constMethod", type = "ConstMethod*", get = HotSpotVMField.Type.OFFSET) @Stable public int methodConstMethodOffset; |
1228 @HotSpotVMField(name = "Method::_constMethod", type = "ConstMethod*", get = HotSpotVMField.Type.OFFSET) @Stable public int methodConstMethodOffset; |
1246 @HotSpotVMField(name = "Method::_intrinsic_id", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int methodIntrinsicIdOffset; |
1229 @HotSpotVMField(name = "Method::_intrinsic_id", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int methodIntrinsicIdOffset; |
1247 @HotSpotVMField(name = "Method::_flags", type = "u1", get = HotSpotVMField.Type.OFFSET) @Stable public int methodFlagsOffset; |
1230 @HotSpotVMField(name = "Method::_flags", type = "u1", get = HotSpotVMField.Type.OFFSET) @Stable public int methodFlagsOffset; |
1248 @HotSpotVMField(name = "Method::_vtable_index", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodVtableIndexOffset; |
1231 @HotSpotVMField(name = "Method::_vtable_index", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodVtableIndexOffset; |
|
1232 |
|
1233 @HotSpotVMField(name = "Method::_method_counters", type = "MethodCounters*", get = HotSpotVMField.Type.OFFSET) @Stable public int methodCountersOffset; |
|
1234 @HotSpotVMField(name = "Method::_method_data", type = "MethodData*", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOffset; |
|
1235 @HotSpotVMField(name = "Method::_from_compiled_entry", type = "address", get = HotSpotVMField.Type.OFFSET) @Stable public int methodCompiledEntryOffset; |
|
1236 @HotSpotVMField(name = "Method::_code", type = "nmethod*", get = HotSpotVMField.Type.OFFSET) @Stable public int methodCodeOffset; |
1249 |
1237 |
1250 @HotSpotVMConstant(name = "Method::_jfr_towrite") @Stable public int methodFlagsJfrTowrite; |
1238 @HotSpotVMConstant(name = "Method::_jfr_towrite") @Stable public int methodFlagsJfrTowrite; |
1251 @HotSpotVMConstant(name = "Method::_caller_sensitive") @Stable public int methodFlagsCallerSensitive; |
1239 @HotSpotVMConstant(name = "Method::_caller_sensitive") @Stable public int methodFlagsCallerSensitive; |
1252 @HotSpotVMConstant(name = "Method::_force_inline") @Stable public int methodFlagsForceInline; |
1240 @HotSpotVMConstant(name = "Method::_force_inline") @Stable public int methodFlagsForceInline; |
1253 @HotSpotVMConstant(name = "Method::_dont_inline") @Stable public int methodFlagsDontInline; |
1241 @HotSpotVMConstant(name = "Method::_dont_inline") @Stable public int methodFlagsDontInline; |
1254 @HotSpotVMConstant(name = "Method::_hidden") @Stable public int methodFlagsHidden; |
1242 @HotSpotVMConstant(name = "Method::_hidden") @Stable public int methodFlagsHidden; |
1255 @HotSpotVMConstant(name = "Method::nonvirtual_vtable_index") @Stable public int nonvirtualVtableIndex; |
1243 @HotSpotVMConstant(name = "Method::nonvirtual_vtable_index") @Stable public int nonvirtualVtableIndex; |
1256 @HotSpotVMConstant(name = "Method::invalid_vtable_index") @Stable public int invalidVtableIndex; |
1244 @HotSpotVMConstant(name = "Method::invalid_vtable_index") @Stable public int invalidVtableIndex; |
1257 |
1245 |
|
1246 @HotSpotVMField(name = "MethodCounters::_invocation_counter", type = "InvocationCounter", get = HotSpotVMField.Type.OFFSET) @Stable public int invocationCounterOffset; |
|
1247 @HotSpotVMField(name = "MethodCounters::_backedge_counter", type = "InvocationCounter", get = HotSpotVMField.Type.OFFSET) @Stable public int backedgeCounterOffset; |
|
1248 @HotSpotVMConstant(name = "InvocationCounter::count_increment") @Stable public int invocationCounterIncrement; |
|
1249 @HotSpotVMConstant(name = "InvocationCounter::count_shift") @Stable public int invocationCounterShift; |
|
1250 |
|
1251 @HotSpotVMField(name = "MethodData::_size", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataSize; |
|
1252 @HotSpotVMField(name = "MethodData::_data_size", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataDataSize; |
|
1253 @HotSpotVMField(name = "MethodData::_data[0]", type = "intptr_t", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOopDataOffset; |
|
1254 @HotSpotVMField(name = "MethodData::_trap_hist._array[0]", type = "u1", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOopTrapHistoryOffset; |
|
1255 @HotSpotVMField(name = "MethodData::_jvmci_ir_size", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataIRSizeOffset; |
|
1256 |
|
1257 @HotSpotVMField(name = "nmethod::_verified_entry_point", type = "address", get = HotSpotVMField.Type.OFFSET) @Stable public int nmethodEntryOffset; |
|
1258 @HotSpotVMField(name = "nmethod::_comp_level", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int nmethodCompLevelOffset; |
|
1259 |
|
1260 @HotSpotVMConstant(name = "CompLevel_full_optimization") @Stable public int compilationLevelFullOptimization; |
|
1261 |
1258 @HotSpotVMConstant(name = "InvocationEntryBci") @Stable public int invocationEntryBci; |
1262 @HotSpotVMConstant(name = "InvocationEntryBci") @Stable public int invocationEntryBci; |
1259 |
1263 |
1260 @HotSpotVMField(name = "JVMCIEnv::_task", type = "CompileTask*", get = HotSpotVMField.Type.OFFSET) @Stable public int jvmciEnvTaskOffset; |
1264 @HotSpotVMField(name = "JVMCIEnv::_task", type = "CompileTask*", get = HotSpotVMField.Type.OFFSET) @Stable public int jvmciEnvTaskOffset; |
1261 @HotSpotVMField(name = "JVMCIEnv::_jvmti_can_hotswap_or_post_breakpoint", type = "bool", get = HotSpotVMField.Type.OFFSET) @Stable public int jvmciEnvJvmtiCanHotswapOrPostBreakpointOffset; |
1265 @HotSpotVMField(name = "JVMCIEnv::_jvmti_can_hotswap_or_post_breakpoint", type = "bool", get = HotSpotVMField.Type.OFFSET) @Stable public int jvmciEnvJvmtiCanHotswapOrPostBreakpointOffset; |
1262 @HotSpotVMField(name = "CompileTask::_num_inlined_bytecodes", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int compileTaskNumInlinedBytecodesOffset; |
1266 @HotSpotVMField(name = "CompileTask::_num_inlined_bytecodes", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int compileTaskNumInlinedBytecodesOffset; |
1263 |
1267 |
1264 /** |
1268 @HotSpotVMField(name = "CompilerToVM::Data::Method_extra_stack_entries", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int extraStackEntries; |
1265 * See {@code Method::extra_stack_entries()}. |
|
1266 */ |
|
1267 @HotSpotVMConstant(name = "Method::extra_stack_entries_for_jsr292") @Stable public int extraStackEntries; |
|
1268 |
1269 |
1269 @HotSpotVMField(name = "ConstMethod::_constants", type = "ConstantPool*", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodConstantsOffset; |
1270 @HotSpotVMField(name = "ConstMethod::_constants", type = "ConstantPool*", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodConstantsOffset; |
1270 @HotSpotVMField(name = "ConstMethod::_flags", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodFlagsOffset; |
1271 @HotSpotVMField(name = "ConstMethod::_flags", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodFlagsOffset; |
1271 @HotSpotVMField(name = "ConstMethod::_code_size", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodCodeSizeOffset; |
1272 @HotSpotVMField(name = "ConstMethod::_code_size", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodCodeSizeOffset; |
1272 @HotSpotVMField(name = "ConstMethod::_name_index", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodNameIndexOffset; |
1273 @HotSpotVMField(name = "ConstMethod::_name_index", type = "u2", get = HotSpotVMField.Type.OFFSET) @Stable public int constMethodNameIndexOffset; |
1323 @HotSpotVMConstant(name = "JVM_CONSTANT_InternalMax") @Stable public int jvmConstantInternalMax; |
1324 @HotSpotVMConstant(name = "JVM_CONSTANT_InternalMax") @Stable public int jvmConstantInternalMax; |
1324 |
1325 |
1325 @HotSpotVMConstant(name = "HeapWordSize") @Stable public int heapWordSize; |
1326 @HotSpotVMConstant(name = "HeapWordSize") @Stable public int heapWordSize; |
1326 |
1327 |
1327 @HotSpotVMType(name = "Symbol*", get = HotSpotVMType.Type.SIZE) @Stable public int symbolPointerSize; |
1328 @HotSpotVMType(name = "Symbol*", get = HotSpotVMType.Type.SIZE) @Stable public int symbolPointerSize; |
1328 @HotSpotVMField(name = "Symbol::_length", type = "unsigned short", get = HotSpotVMField.Type.OFFSET) @Stable public int symbolLengthOffset; |
|
1329 @HotSpotVMField(name = "Symbol::_body[0]", type = "jbyte", get = HotSpotVMField.Type.OFFSET) @Stable public int symbolBodyOffset; |
|
1330 |
1329 |
1331 @HotSpotVMField(name = "vmSymbols::_symbols[0]", type = "Symbol*", get = HotSpotVMField.Type.ADDRESS) @Stable public long vmSymbolsSymbols; |
1330 @HotSpotVMField(name = "vmSymbols::_symbols[0]", type = "Symbol*", get = HotSpotVMField.Type.ADDRESS) @Stable public long vmSymbolsSymbols; |
1332 @HotSpotVMConstant(name = "vmSymbols::FIRST_SID") @Stable public int vmSymbolsFirstSID; |
1331 @HotSpotVMConstant(name = "vmSymbols::FIRST_SID") @Stable public int vmSymbolsFirstSID; |
1333 @HotSpotVMConstant(name = "vmSymbols::SID_LIMIT") @Stable public int vmSymbolsSIDLimit; |
1332 @HotSpotVMConstant(name = "vmSymbols::SID_LIMIT") @Stable public int vmSymbolsSIDLimit; |
1334 |
1333 |
1335 @HotSpotVMConstant(name = "JVM_ACC_HAS_FINALIZER") @Stable public int klassHasFinalizerFlag; |
|
1336 |
|
1337 // Modifier.SYNTHETIC is not public so we get it via vmStructs. |
|
1338 @HotSpotVMConstant(name = "JVM_ACC_SYNTHETIC") @Stable public int syntheticFlag; |
|
1339 |
|
1340 /** |
|
1341 * @see HotSpotResolvedObjectTypeImpl#createField |
|
1342 */ |
|
1343 @HotSpotVMConstant(name = "JVM_RECOGNIZED_FIELD_MODIFIERS") @Stable public int recognizedFieldModifiers; |
|
1344 |
|
1345 /** |
1334 /** |
1346 * Bit pattern that represents a non-oop. Neither the high bits nor the low bits of this value |
1335 * Bit pattern that represents a non-oop. Neither the high bits nor the low bits of this value |
1347 * are allowed to look like (respectively) the high or low bits of a real oop. |
1336 * are allowed to look like (respectively) the high or low bits of a real oop. |
1348 */ |
1337 */ |
1349 @HotSpotVMField(name = "Universe::_non_oop_bits", type = "intptr_t", get = HotSpotVMField.Type.VALUE) @Stable public long nonOopBits; |
1338 @HotSpotVMField(name = "CompilerToVM::Data::Universe_non_oop_bits", type = "void*", get = HotSpotVMField.Type.VALUE) @Stable public long nonOopBits; |
1350 |
1339 |
1351 @HotSpotVMField(name = "StubRoutines::_verify_oop_count", type = "jint", get = HotSpotVMField.Type.ADDRESS) @Stable public long verifyOopCounterAddress; |
1340 @HotSpotVMField(name = "StubRoutines::_verify_oop_count", type = "jint", get = HotSpotVMField.Type.ADDRESS) @Stable public long verifyOopCounterAddress; |
1352 @HotSpotVMField(name = "Universe::_verify_oop_mask", type = "uintptr_t", get = HotSpotVMField.Type.VALUE) @Stable public long verifyOopMask; |
1341 @HotSpotVMField(name = "CompilerToVM::Data::Universe_verify_oop_mask", type = "uintptr_t", get = HotSpotVMField.Type.VALUE) @Stable public long verifyOopMask; |
1353 @HotSpotVMField(name = "Universe::_verify_oop_bits", type = "uintptr_t", get = HotSpotVMField.Type.VALUE) @Stable public long verifyOopBits; |
1342 @HotSpotVMField(name = "CompilerToVM::Data::Universe_verify_oop_bits", type = "uintptr_t", get = HotSpotVMField.Type.VALUE) @Stable public long verifyOopBits; |
1354 @HotSpotVMField(name = "Universe::_base_vtable_size", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int universeBaseVtableSize; |
1343 @HotSpotVMField(name = "CompilerToVM::Data::Universe_base_vtable_size", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int universeBaseVtableSize; |
1355 |
1344 |
1356 public final int baseVtableLength() { |
1345 public final int baseVtableLength() { |
1357 return universeBaseVtableSize / vtableEntrySize; |
1346 return universeBaseVtableSize / vtableEntrySize; |
1358 } |
1347 } |
1359 |
1348 |
1360 @HotSpotVMField(name = "CollectedHeap::_barrier_set", type = "BarrierSet*", get = HotSpotVMField.Type.OFFSET) @Stable public int collectedHeapBarrierSetOffset; |
|
1361 |
|
1362 @HotSpotVMField(name = "HeapRegion::LogOfHRGrainBytes", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int logOfHRGrainBytes; |
1349 @HotSpotVMField(name = "HeapRegion::LogOfHRGrainBytes", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int logOfHRGrainBytes; |
1363 |
|
1364 @HotSpotVMField(name = "BarrierSet::_fake_rtti", type = "BarrierSet::FakeRtti", get = HotSpotVMField.Type.OFFSET) @Stable private int barrierSetFakeRttiOffset; |
|
1365 @HotSpotVMConstant(name = "BarrierSet::CardTableModRef") @Stable public int barrierSetCardTableModRef; |
|
1366 @HotSpotVMConstant(name = "BarrierSet::CardTableForRS") @Stable public int barrierSetCardTableForRS; |
|
1367 @HotSpotVMConstant(name = "BarrierSet::CardTableExtension") @Stable public int barrierSetCardTableExtension; |
|
1368 @HotSpotVMConstant(name = "BarrierSet::G1SATBCT") @Stable public int barrierSetG1SATBCT; |
|
1369 @HotSpotVMConstant(name = "BarrierSet::G1SATBCTLogging") @Stable public int barrierSetG1SATBCTLogging; |
|
1370 @HotSpotVMConstant(name = "BarrierSet::ModRef") @Stable public int barrierSetModRef; |
|
1371 |
|
1372 @HotSpotVMField(name = "BarrierSet::FakeRtti::_concrete_tag", type = "BarrierSet::Name", get = HotSpotVMField.Type.OFFSET) @Stable private int fakeRttiConcreteTagOffset; |
|
1373 |
|
1374 @HotSpotVMField(name = "CardTableModRefBS::byte_map_base", type = "jbyte*", get = HotSpotVMField.Type.OFFSET) @Stable private int cardTableModRefBSByteMapBaseOffset; |
|
1375 @HotSpotVMConstant(name = "CardTableModRefBS::card_shift") @Stable public int cardTableModRefBSCardShift; |
|
1376 |
1350 |
1377 @HotSpotVMConstant(name = "CardTableModRefBS::dirty_card") @Stable public byte dirtyCardValue; |
1351 @HotSpotVMConstant(name = "CardTableModRefBS::dirty_card") @Stable public byte dirtyCardValue; |
1378 @HotSpotVMConstant(name = "G1SATBCardTableModRefBS::g1_young_gen") @Stable public byte g1YoungCardValue; |
1352 @HotSpotVMConstant(name = "G1SATBCardTableModRefBS::g1_young_gen") @Stable public byte g1YoungCardValue; |
1379 |
1353 |
1380 private final long cardtableStartAddress; |
1354 @HotSpotVMField(name = "CompilerToVM::Data::cardtable_start_address", type = "jbyte*", get = HotSpotVMField.Type.VALUE) @Stable private long cardtableStartAddress; |
1381 private final int cardtableShift; |
1355 @HotSpotVMField(name = "CompilerToVM::Data::cardtable_shift", type = "int", get = HotSpotVMField.Type.VALUE) @Stable private int cardtableShift; |
1382 |
1356 |
1383 public long cardtableStartAddress() { |
1357 public long cardtableStartAddress() { |
1384 if (cardtableStartAddress == -1) { |
|
1385 throw JVMCIError.shouldNotReachHere(); |
|
1386 } |
|
1387 return cardtableStartAddress; |
1358 return cardtableStartAddress; |
1388 } |
1359 } |
1389 |
1360 |
1390 public int cardtableShift() { |
1361 public int cardtableShift() { |
1391 if (cardtableShift == -1) { |
|
1392 throw JVMCIError.shouldNotReachHere(); |
|
1393 } |
|
1394 return cardtableShift; |
1362 return cardtableShift; |
1395 } |
1363 } |
1396 |
1364 |
1397 @HotSpotVMField(name = "os::_polling_page", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long safepointPollingAddress; |
1365 @HotSpotVMField(name = "os::_polling_page", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long safepointPollingAddress; |
1398 |
1366 |
1419 } |
1387 } |
1420 |
1388 |
1421 @HotSpotVMField(name = "java_lang_Class::_klass_offset", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int klassOffset; |
1389 @HotSpotVMField(name = "java_lang_Class::_klass_offset", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int klassOffset; |
1422 @HotSpotVMField(name = "java_lang_Class::_array_klass_offset", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int arrayKlassOffset; |
1390 @HotSpotVMField(name = "java_lang_Class::_array_klass_offset", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int arrayKlassOffset; |
1423 |
1391 |
1424 @HotSpotVMField(name = "Method::_method_counters", type = "MethodCounters*", get = HotSpotVMField.Type.OFFSET) @Stable public int methodCountersOffset; |
|
1425 @HotSpotVMField(name = "Method::_method_data", type = "MethodData*", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOffset; |
|
1426 @HotSpotVMField(name = "Method::_from_compiled_entry", type = "address", get = HotSpotVMField.Type.OFFSET) @Stable public int methodCompiledEntryOffset; |
|
1427 @HotSpotVMField(name = "Method::_code", type = "nmethod*", get = HotSpotVMField.Type.OFFSET) @Stable public int methodCodeOffset; |
|
1428 |
|
1429 @HotSpotVMField(name = "MethodCounters::_invocation_counter", type = "InvocationCounter", get = HotSpotVMField.Type.OFFSET) @Stable public int invocationCounterOffset; |
|
1430 @HotSpotVMField(name = "MethodCounters::_backedge_counter", type = "InvocationCounter", get = HotSpotVMField.Type.OFFSET) @Stable public int backedgeCounterOffset; |
|
1431 @HotSpotVMConstant(name = "InvocationCounter::count_increment") @Stable public int invocationCounterIncrement; |
|
1432 @HotSpotVMConstant(name = "InvocationCounter::count_shift") @Stable public int invocationCounterShift; |
|
1433 |
|
1434 @HotSpotVMField(name = "MethodData::_size", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataSize; |
|
1435 @HotSpotVMField(name = "MethodData::_data_size", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataDataSize; |
|
1436 @HotSpotVMField(name = "MethodData::_data[0]", type = "intptr_t", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOopDataOffset; |
|
1437 @HotSpotVMField(name = "MethodData::_trap_hist._array[0]", type = "u1", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataOopTrapHistoryOffset; |
|
1438 @HotSpotVMField(name = "MethodData::_jvmci_ir_size", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int methodDataIRSizeOffset; |
|
1439 |
|
1440 @HotSpotVMField(name = "nmethod::_verified_entry_point", type = "address", get = HotSpotVMField.Type.OFFSET) @Stable public int nmethodEntryOffset; |
|
1441 @HotSpotVMField(name = "nmethod::_comp_level", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable public int nmethodCompLevelOffset; |
|
1442 |
|
1443 @HotSpotVMConstant(name = "CompLevel_full_optimization") @Stable public int compilationLevelFullOptimization; |
|
1444 |
|
1445 @HotSpotVMType(name = "BasicLock", get = HotSpotVMType.Type.SIZE) @Stable public int basicLockSize; |
1392 @HotSpotVMType(name = "BasicLock", get = HotSpotVMType.Type.SIZE) @Stable public int basicLockSize; |
1446 @HotSpotVMField(name = "BasicLock::_displaced_header", type = "markOop", get = HotSpotVMField.Type.OFFSET) @Stable public int basicLockDisplacedHeaderOffset; |
1393 @HotSpotVMField(name = "BasicLock::_displaced_header", type = "markOop", get = HotSpotVMField.Type.OFFSET) @Stable public int basicLockDisplacedHeaderOffset; |
1447 |
1394 |
1448 @HotSpotVMField(name = "Thread::_allocated_bytes", type = "jlong", get = HotSpotVMField.Type.OFFSET) @Stable public int threadAllocatedBytesOffset; |
1395 @HotSpotVMField(name = "Thread::_allocated_bytes", type = "jlong", get = HotSpotVMField.Type.OFFSET) @Stable public int threadAllocatedBytesOffset; |
1449 |
1396 |
1450 @HotSpotVMFlag(name = "TLABWasteIncrement") @Stable public int tlabRefillWasteIncrement; |
1397 @HotSpotVMFlag(name = "TLABWasteIncrement") @Stable public int tlabRefillWasteIncrement; |
1451 @HotSpotVMManual(name = "ThreadLocalAllocBuffer::alignment_reserve()") @Stable public int tlabAlignmentReserve; |
|
1452 |
1398 |
1453 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_start", type = "HeapWord*", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferStartOffset; |
1399 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_start", type = "HeapWord*", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferStartOffset; |
1454 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_end", type = "HeapWord*", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferEndOffset; |
1400 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_end", type = "HeapWord*", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferEndOffset; |
1455 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_top", type = "HeapWord*", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferTopOffset; |
1401 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_top", type = "HeapWord*", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferTopOffset; |
1456 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_pf_top", type = "HeapWord*", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferPfTopOffset; |
1402 @HotSpotVMField(name = "ThreadLocalAllocBuffer::_pf_top", type = "HeapWord*", get = HotSpotVMField.Type.OFFSET) @Stable private int threadLocalAllocBufferPfTopOffset; |
1494 |
1440 |
1495 public int threadTlabPfTopOffset() { |
1441 public int threadTlabPfTopOffset() { |
1496 return threadTlabOffset + threadLocalAllocBufferPfTopOffset; |
1442 return threadTlabOffset + threadLocalAllocBufferPfTopOffset; |
1497 } |
1443 } |
1498 |
1444 |
1499 /** |
1445 @HotSpotVMField(name = "CompilerToVM::Data::ThreadLocalAllocBuffer_alignment_reserve", type = "size_t", get = HotSpotVMField.Type.VALUE) @Stable public int tlabAlignmentReserve; |
1500 * See: {@code ThreadLocalAllocBuffer::end_reserve()}. |
|
1501 */ |
|
1502 public final int threadLocalAllocBufferEndReserve() { |
|
1503 final int typeSizeInBytes = roundUp(arrayOopDescLengthOffset() + Integer.BYTES, heapWordSize); |
|
1504 // T_INT arrays need not be 8 byte aligned. |
|
1505 final int reserveSize = typeSizeInBytes / heapWordSize; |
|
1506 return Integer.max(reserveSize, abstractVmVersionReserveForAllocationPrefetch); |
|
1507 } |
|
1508 |
1446 |
1509 @HotSpotVMFlag(name = "TLABStats") @Stable public boolean tlabStats; |
1447 @HotSpotVMFlag(name = "TLABStats") @Stable public boolean tlabStats; |
1510 |
1448 |
1511 // FIXME This is only temporary until the GC code is changed. |
1449 // FIXME This is only temporary until the GC code is changed. |
1512 @HotSpotVMField(name = "CompilerToVM::_supports_inline_contig_alloc", type = "bool", get = HotSpotVMField.Type.VALUE) @Stable public boolean inlineContiguousAllocationSupported; |
1450 @HotSpotVMField(name = "CompilerToVM::Data::_supports_inline_contig_alloc", type = "bool", get = HotSpotVMField.Type.VALUE) @Stable public boolean inlineContiguousAllocationSupported; |
1513 @HotSpotVMField(name = "CompilerToVM::_heap_end_addr", type = "HeapWord**", get = HotSpotVMField.Type.VALUE) @Stable public long heapEndAddress; |
1451 @HotSpotVMField(name = "CompilerToVM::Data::_heap_end_addr", type = "HeapWord**", get = HotSpotVMField.Type.VALUE) @Stable public long heapEndAddress; |
1514 @HotSpotVMField(name = "CompilerToVM::_heap_top_addr", type = "HeapWord**", get = HotSpotVMField.Type.VALUE) @Stable public long heapTopAddress; |
1452 @HotSpotVMField(name = "CompilerToVM::Data::_heap_top_addr", type = "HeapWord**", get = HotSpotVMField.Type.VALUE) @Stable public long heapTopAddress; |
1515 |
1453 |
1516 /** |
1454 /** |
1517 * The DataLayout header size is the same as the cell size. |
1455 * The DataLayout header size is the same as the cell size. |
1518 */ |
1456 */ |
1519 @HotSpotVMConstant(name = "DataLayout::cell_size") @Stable public int dataLayoutHeaderSize; |
1457 @HotSpotVMConstant(name = "DataLayout::cell_size") @Stable public int dataLayoutHeaderSize; |
1540 |
1478 |
1541 @HotSpotVMFlag(name = "BciProfileWidth") @Stable public int bciProfileWidth; |
1479 @HotSpotVMFlag(name = "BciProfileWidth") @Stable public int bciProfileWidth; |
1542 @HotSpotVMFlag(name = "TypeProfileWidth") @Stable public int typeProfileWidth; |
1480 @HotSpotVMFlag(name = "TypeProfileWidth") @Stable public int typeProfileWidth; |
1543 @HotSpotVMFlag(name = "MethodProfileWidth") @Stable public int methodProfileWidth; |
1481 @HotSpotVMFlag(name = "MethodProfileWidth") @Stable public int methodProfileWidth; |
1544 |
1482 |
1545 @HotSpotVMField(name = "CodeBlob::_code_offset", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable private int codeBlobCodeOffsetOffset; |
1483 @HotSpotVMField(name = "CompilerToVM::Data::SharedRuntime_ic_miss_stub", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long inlineCacheMissStub; |
1546 @HotSpotVMField(name = "DeoptimizationBlob::_unpack_offset", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable private int deoptimizationBlobUnpackOffsetOffset; |
1484 @HotSpotVMField(name = "CompilerToVM::Data::SharedRuntime_handle_wrong_method_stub", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long handleWrongMethodStub; |
1547 @HotSpotVMField(name = "DeoptimizationBlob::_uncommon_trap_offset", type = "int", get = HotSpotVMField.Type.OFFSET) @Stable private int deoptimizationBlobUncommonTrapOffsetOffset; |
1485 |
1548 |
1486 @HotSpotVMField(name = "CompilerToVM::Data::SharedRuntime_deopt_blob_unpack", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long handleDeoptStub; |
1549 @HotSpotVMField(name = "SharedRuntime::_ic_miss_blob", type = "RuntimeStub*", get = HotSpotVMField.Type.VALUE) @Stable private long inlineCacheMissBlob; |
1487 @HotSpotVMField(name = "CompilerToVM::Data::SharedRuntime_deopt_blob_uncommon_trap", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long uncommonTrapStub; |
1550 @HotSpotVMField(name = "SharedRuntime::_wrong_method_blob", type = "RuntimeStub*", get = HotSpotVMField.Type.VALUE) @Stable private long wrongMethodBlob; |
|
1551 @HotSpotVMField(name = "SharedRuntime::_deopt_blob", type = "DeoptimizationBlob*", get = HotSpotVMField.Type.VALUE) @Stable private long deoptBlob; |
|
1552 |
|
1553 @HotSpotVMManual(name = "SharedRuntime::get_ic_miss_stub()") public final long inlineCacheMissStub; |
|
1554 @HotSpotVMManual(name = "SharedRuntime::get_handle_wrong_method_stub()") public final long handleWrongMethodStub; |
|
1555 |
|
1556 @HotSpotVMManual(name = "SharedRuntime::deopt_blob()->unpack()") public final long handleDeoptStub; |
|
1557 @HotSpotVMManual(name = "SharedRuntime::deopt_blob()->uncommon_trap()") public final long uncommonTrapStub; |
|
1558 |
1488 |
1559 @HotSpotVMField(name = "CodeCache::_low_bound", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long codeCacheLowBound; |
1489 @HotSpotVMField(name = "CodeCache::_low_bound", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long codeCacheLowBound; |
1560 @HotSpotVMField(name = "CodeCache::_high_bound", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long codeCacheHighBound; |
1490 @HotSpotVMField(name = "CodeCache::_high_bound", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long codeCacheHighBound; |
1561 |
1491 |
1562 @HotSpotVMField(name = "StubRoutines::_aescrypt_encryptBlock", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long aescryptEncryptBlockStub; |
1492 @HotSpotVMField(name = "StubRoutines::_aescrypt_encryptBlock", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long aescryptEncryptBlockStub; |