Mercurial > hg > truffle
comparison src/share/vm/graal/graalCompilerToVM.cpp @ 6367:cc402f4396f4
deleted caching of initial mark word in HotSpotResolvedJavaType. This value is modified by the biased locking mechanism and so it not constant for a Klass
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 12 Sep 2012 23:50:37 +0200 |
parents | a73fcf1639fc |
children | e957c9ff0bda a718f153b9f2 |
comparison
equal
deleted
inserted
replaced
6366:67ee6f880ef3 | 6367:cc402f4396f4 |
---|---|
549 assert(JNIHandles::resolve(klass) != NULL, ""); | 549 assert(JNIHandles::resolve(klass) != NULL, ""); |
550 return JNIHandles::make_local(GraalCompiler::get_JavaType(element_type, THREAD)()); | 550 return JNIHandles::make_local(GraalCompiler::get_JavaType(element_type, THREAD)()); |
551 } | 551 } |
552 | 552 |
553 // public JavaType JavaType_superType(HotSpotResolvedType klass); | 553 // public JavaType JavaType_superType(HotSpotResolvedType klass); |
554 JNIEXPORT jlong JNICALL Java_com_oracle_graal_hotspot_bridge_CompilerToVMImpl_JavaType_initialMarkWord(JNIEnv *, jobject, jobject klass) { | |
555 TRACE_graal_3("CompilerToVM::JavaType_superType"); | |
556 VM_ENTRY_MARK; | |
557 KlassHandle klass_handle(java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(klass))); | |
558 if (klass_handle->oop_is_array()) { | |
559 return (int32_t)(intptr_t) markOopDesc::prototype(); | |
560 } else { | |
561 return (jlong) (intptr_t) klass_handle->prototype_header(); | |
562 } | |
563 } | |
564 | |
565 // public JavaType JavaType_superType(HotSpotResolvedType klass); | |
554 JNIEXPORT jobject JNICALL Java_com_oracle_graal_hotspot_bridge_CompilerToVMImpl_JavaType_1superType(JNIEnv *, jobject, jobject klass) { | 566 JNIEXPORT jobject JNICALL Java_com_oracle_graal_hotspot_bridge_CompilerToVMImpl_JavaType_1superType(JNIEnv *, jobject, jobject klass) { |
555 TRACE_graal_3("CompilerToVM::JavaType_superType"); | 567 TRACE_graal_3("CompilerToVM::JavaType_superType"); |
556 VM_ENTRY_MARK; | 568 VM_ENTRY_MARK; |
557 KlassHandle klass_handle(java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(klass))); | 569 KlassHandle klass_handle(java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(klass))); |
558 klassOop k; | 570 klassOop k; |
722 set_int(env, config, "codeEntryAlignment", CodeEntryAlignment); | 734 set_int(env, config, "codeEntryAlignment", CodeEntryAlignment); |
723 set_int(env, config, "vmPageSize", os::vm_page_size()); | 735 set_int(env, config, "vmPageSize", os::vm_page_size()); |
724 set_int(env, config, "stackShadowPages", StackShadowPages); | 736 set_int(env, config, "stackShadowPages", StackShadowPages); |
725 set_int(env, config, "hubOffset", oopDesc::klass_offset_in_bytes()); | 737 set_int(env, config, "hubOffset", oopDesc::klass_offset_in_bytes()); |
726 set_int(env, config, "markOffset", oopDesc::mark_offset_in_bytes()); | 738 set_int(env, config, "markOffset", oopDesc::mark_offset_in_bytes()); |
739 set_int(env, config, "initialMarkWordOffset", in_bytes(Klass::prototype_header_offset())); | |
727 set_int(env, config, "superCheckOffsetOffset", in_bytes(Klass::super_check_offset_offset())); | 740 set_int(env, config, "superCheckOffsetOffset", in_bytes(Klass::super_check_offset_offset())); |
728 set_int(env, config, "secondarySuperCacheOffset", in_bytes(Klass::secondary_super_cache_offset())); | 741 set_int(env, config, "secondarySuperCacheOffset", in_bytes(Klass::secondary_super_cache_offset())); |
729 set_int(env, config, "secondarySupersOffset", in_bytes(Klass::secondary_supers_offset())); | 742 set_int(env, config, "secondarySupersOffset", in_bytes(Klass::secondary_supers_offset())); |
730 set_int(env, config, "arrayLengthOffset", arrayOopDesc::length_offset_in_bytes()); | 743 set_int(env, config, "arrayLengthOffset", arrayOopDesc::length_offset_in_bytes()); |
731 set_int(env, config, "klassStateOffset", in_bytes(instanceKlass::init_state_offset())); | 744 set_int(env, config, "klassStateOffset", in_bytes(instanceKlass::init_state_offset())); |
732 set_int(env, config, "klassStateFullyInitialized", (int)instanceKlass::fully_initialized); | 745 set_int(env, config, "klassStateFullyInitialized", (int)instanceKlass::fully_initialized); |
733 set_int(env, config, "threadTlabTopOffset", in_bytes(JavaThread::tlab_top_offset())); | 746 set_int(env, config, "threadTlabTopOffset", in_bytes(JavaThread::tlab_top_offset())); |
734 set_int(env, config, "threadTlabEndOffset", in_bytes(JavaThread::tlab_end_offset())); | 747 set_int(env, config, "threadTlabEndOffset", in_bytes(JavaThread::tlab_end_offset())); |
735 set_int(env, config, "threadObjectOffset", in_bytes(JavaThread::threadObj_offset())); | 748 set_int(env, config, "threadObjectOffset", in_bytes(JavaThread::threadObj_offset())); |
736 set_int(env, config, "instanceHeaderPrototypeOffset", in_bytes(Klass::prototype_header_offset())); | |
737 set_int(env, config, "threadExceptionOopOffset", in_bytes(JavaThread::exception_oop_offset())); | 749 set_int(env, config, "threadExceptionOopOffset", in_bytes(JavaThread::exception_oop_offset())); |
738 set_int(env, config, "threadExceptionPcOffset", in_bytes(JavaThread::exception_pc_offset())); | 750 set_int(env, config, "threadExceptionPcOffset", in_bytes(JavaThread::exception_pc_offset())); |
739 set_int(env, config, "threadMultiNewArrayStorageOffset", in_bytes(JavaThread::graal_multinewarray_storage_offset())); | 751 set_int(env, config, "threadMultiNewArrayStorageOffset", in_bytes(JavaThread::graal_multinewarray_storage_offset())); |
740 set_long(env, config, "safepointPollingAddress", (jlong)(os::get_polling_page() + (SafepointPollOffset % os::vm_page_size()))); | 752 set_long(env, config, "safepointPollingAddress", (jlong)(os::get_polling_page() + (SafepointPollOffset % os::vm_page_size()))); |
741 set_boolean(env, config, "isPollingPageFar", Assembler::is_polling_page_far()); | 753 set_boolean(env, config, "isPollingPageFar", Assembler::is_polling_page_far()); |
1033 {CC"JavaType_isSubtypeOf", CC"("RESOLVED_TYPE TYPE")Z", FN_PTR(JavaType_2isSubtypeOf)}, | 1045 {CC"JavaType_isSubtypeOf", CC"("RESOLVED_TYPE TYPE")Z", FN_PTR(JavaType_2isSubtypeOf)}, |
1034 {CC"JavaType_leastCommonAncestor", CC"("RESOLVED_TYPE RESOLVED_TYPE")"TYPE, FN_PTR(JavaType_2leastCommonAncestor)}, | 1046 {CC"JavaType_leastCommonAncestor", CC"("RESOLVED_TYPE RESOLVED_TYPE")"TYPE, FN_PTR(JavaType_2leastCommonAncestor)}, |
1035 {CC"JavaType_componentType", CC"("RESOLVED_TYPE")"TYPE, FN_PTR(JavaType_1componentType)}, | 1047 {CC"JavaType_componentType", CC"("RESOLVED_TYPE")"TYPE, FN_PTR(JavaType_1componentType)}, |
1036 {CC"JavaType_uniqueConcreteSubtype", CC"("RESOLVED_TYPE")"TYPE, FN_PTR(JavaType_1uniqueConcreteSubtype)}, | 1048 {CC"JavaType_uniqueConcreteSubtype", CC"("RESOLVED_TYPE")"TYPE, FN_PTR(JavaType_1uniqueConcreteSubtype)}, |
1037 {CC"JavaType_superType", CC"("RESOLVED_TYPE")"TYPE, FN_PTR(JavaType_1superType)}, | 1049 {CC"JavaType_superType", CC"("RESOLVED_TYPE")"TYPE, FN_PTR(JavaType_1superType)}, |
1050 {CC"JavaType_initialMarkWord", CC"("RESOLVED_TYPE")J", FN_PTR(JavaType_initialMarkWord)}, | |
1038 {CC"JavaType_arrayOf", CC"("RESOLVED_TYPE")"TYPE, FN_PTR(JavaType_1arrayOf)}, | 1051 {CC"JavaType_arrayOf", CC"("RESOLVED_TYPE")"TYPE, FN_PTR(JavaType_1arrayOf)}, |
1039 {CC"JavaType_fields", CC"("RESOLVED_TYPE")["RESOLVED_FIELD, FN_PTR(JavaType_1fields)}, | 1052 {CC"JavaType_fields", CC"("RESOLVED_TYPE")["RESOLVED_FIELD, FN_PTR(JavaType_1fields)}, |
1040 {CC"JavaType_isInitialized", CC"("RESOLVED_TYPE")Z", FN_PTR(JavaType_1isInitialized)}, | 1053 {CC"JavaType_isInitialized", CC"("RESOLVED_TYPE")Z", FN_PTR(JavaType_1isInitialized)}, |
1041 {CC"getPrimitiveArrayType", CC"("KIND")"TYPE, FN_PTR(getPrimitiveArrayType)}, | 1054 {CC"getPrimitiveArrayType", CC"("KIND")"TYPE, FN_PTR(getPrimitiveArrayType)}, |
1042 {CC"getMaxCallTargetOffset", CC"("RUNTIME_CALL")J", FN_PTR(getMaxCallTargetOffset)}, | 1055 {CC"getMaxCallTargetOffset", CC"("RUNTIME_CALL")J", FN_PTR(getMaxCallTargetOffset)}, |