comparison src/share/vm/graal/graalCompilerToVM.cpp @ 10056:a323a9e20f9d

Fixed a few race conditions in the compilation queue.
author Christian Haeubl <haeubl@ssw.jku.at>
date Fri, 14 Jun 2013 19:12:56 +0200
parents 2beeb916aa31
children abb9d3a26025
comparison
equal deleted inserted replaced
10055:9469034773b2 10056:a323a9e20f9d
712 set_int("constMethodMaxStackOffset", in_bytes(ConstMethod::max_stack_offset())); 712 set_int("constMethodMaxStackOffset", in_bytes(ConstMethod::max_stack_offset()));
713 set_int("constMethodConstantsOffset", in_bytes(ConstMethod::constants_offset())); 713 set_int("constMethodConstantsOffset", in_bytes(ConstMethod::constants_offset()));
714 set_int("constantPoolHolderOffset", ConstantPool::pool_holder_offset_in_bytes()); 714 set_int("constantPoolHolderOffset", ConstantPool::pool_holder_offset_in_bytes());
715 set_int("extraStackEntries", Method::extra_stack_entries()); 715 set_int("extraStackEntries", Method::extra_stack_entries());
716 set_int("methodAccessFlagsOffset", in_bytes(Method::access_flags_offset())); 716 set_int("methodAccessFlagsOffset", in_bytes(Method::access_flags_offset()));
717 set_int("methodQueuedForCompilationBit", (int) JVM_ACC_QUEUED);
717 set_int("methodIntrinsicIdOffset", Method::intrinsic_id_offset_in_bytes()); 718 set_int("methodIntrinsicIdOffset", Method::intrinsic_id_offset_in_bytes());
718 set_int("klassHasFinalizerFlag", JVM_ACC_HAS_FINALIZER); 719 set_int("klassHasFinalizerFlag", JVM_ACC_HAS_FINALIZER);
719 set_int("threadExceptionOopOffset", in_bytes(JavaThread::exception_oop_offset())); 720 set_int("threadExceptionOopOffset", in_bytes(JavaThread::exception_oop_offset()));
720 set_int("threadExceptionPcOffset", in_bytes(JavaThread::exception_pc_offset())); 721 set_int("threadExceptionPcOffset", in_bytes(JavaThread::exception_pc_offset()));
721 #ifdef TARGET_ARCH_x86 722 #ifdef TARGET_ARCH_x86
937 nmethod* nm = cb->as_nmethod_or_null(); 938 nmethod* nm = cb->as_nmethod_or_null();
938 assert(nm == NULL || !installed_code_handle->is_scavengable() || nm->on_scavenge_root_list(), "nm should be scavengable if installed_code is scavengable"); 939 assert(nm == NULL || !installed_code_handle->is_scavengable() || nm->on_scavenge_root_list(), "nm should be scavengable if installed_code is scavengable");
939 } 940 }
940 } 941 }
941 return result; 942 return result;
942 C2V_END
943
944 C2V_VMENTRY(void, clearQueuedForCompilation, (JNIEnv *jniEnv, jobject, jobject resolvedMethod))
945 methodHandle method = getMethodFromHotSpotMethod(JNIHandles::resolve(resolvedMethod));
946 method->clear_queued_for_compilation();
947 C2V_END 943 C2V_END
948 944
949 C2V_VMENTRY(jobject, getCode, (JNIEnv *jniEnv, jobject, jlong codeBlob)) 945 C2V_VMENTRY(jobject, getCode, (JNIEnv *jniEnv, jobject, jlong codeBlob))
950 ResourceMark rm; 946 ResourceMark rm;
951 HandleMark hm; 947 HandleMark hm;
1245 {CC"executeCompiledMethodVarargs", CC"(["OBJECT NMETHOD")"OBJECT, FN_PTR(executeCompiledMethodVarargs)}, 1241 {CC"executeCompiledMethodVarargs", CC"(["OBJECT NMETHOD")"OBJECT, FN_PTR(executeCompiledMethodVarargs)},
1246 {CC"getDeoptedLeafGraphIds", CC"()[J", FN_PTR(getDeoptedLeafGraphIds)}, 1242 {CC"getDeoptedLeafGraphIds", CC"()[J", FN_PTR(getDeoptedLeafGraphIds)},
1247 {CC"getLineNumberTable", CC"("HS_RESOLVED_METHOD")[J", FN_PTR(getLineNumberTable)}, 1243 {CC"getLineNumberTable", CC"("HS_RESOLVED_METHOD")[J", FN_PTR(getLineNumberTable)},
1248 {CC"getLocalVariableTable", CC"("HS_RESOLVED_METHOD")["LOCAL, FN_PTR(getLocalVariableTable)}, 1244 {CC"getLocalVariableTable", CC"("HS_RESOLVED_METHOD")["LOCAL, FN_PTR(getLocalVariableTable)},
1249 {CC"getFileName", CC"("HS_RESOLVED_JAVA_TYPE")"STRING, FN_PTR(getFileName)}, 1245 {CC"getFileName", CC"("HS_RESOLVED_JAVA_TYPE")"STRING, FN_PTR(getFileName)},
1250 {CC"clearQueuedForCompilation", CC"("HS_RESOLVED_METHOD")V", FN_PTR(clearQueuedForCompilation)},
1251 {CC"reprofile", CC"("METASPACE_METHOD")V", FN_PTR(reprofile)}, 1246 {CC"reprofile", CC"("METASPACE_METHOD")V", FN_PTR(reprofile)},
1252 {CC"invalidateInstalledCode", CC"(J)V", FN_PTR(invalidateInstalledCode)}, 1247 {CC"invalidateInstalledCode", CC"(J)V", FN_PTR(invalidateInstalledCode)},
1253 {CC"isInstalledCodeValid", CC"(J)Z", FN_PTR(isInstalledCodeValid)}, 1248 {CC"isInstalledCodeValid", CC"(J)Z", FN_PTR(isInstalledCodeValid)},
1254 }; 1249 };
1255 1250