Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalCompilerToVM.cpp @ 13641:5a9afbf72714
Add a speculation oop for uncommon trap deoptimization. Save it in the SpeculationLog during deoptimization.
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Thu, 12 Dec 2013 15:13:02 +0100 |
parents | b1838411e896 |
children | c3370b2e1cbc |
comparison
equal
deleted
inserted
replaced
13640:bfe7a8c8c3c6 | 13641:5a9afbf72714 |
---|---|
559 #undef set_int | 559 #undef set_int |
560 #undef set_long | 560 #undef set_long |
561 | 561 |
562 C2V_END | 562 C2V_END |
563 | 563 |
564 C2V_VMENTRY(jint, installCode0, (JNIEnv *jniEnv, jobject, jobject compiled_code, jobject installed_code, jobject triggered_deoptimizations)) | 564 C2V_VMENTRY(jint, installCode0, (JNIEnv *jniEnv, jobject, jobject compiled_code, jobject installed_code, jobject speculation_log)) |
565 ResourceMark rm; | 565 ResourceMark rm; |
566 HandleMark hm; | 566 HandleMark hm; |
567 Handle compiled_code_handle = JNIHandles::resolve(compiled_code); | 567 Handle compiled_code_handle = JNIHandles::resolve(compiled_code); |
568 CodeBlob* cb = NULL; | 568 CodeBlob* cb = NULL; |
569 Handle installed_code_handle = JNIHandles::resolve(installed_code); | 569 Handle installed_code_handle = JNIHandles::resolve(installed_code); |
570 Handle triggered_deoptimizations_handle = JNIHandles::resolve(triggered_deoptimizations); | 570 Handle speculation_log_handle = JNIHandles::resolve(speculation_log); |
571 | 571 |
572 CodeInstaller installer; | 572 CodeInstaller installer; |
573 GraalEnv::CodeInstallResult result = installer.install(compiled_code_handle, cb, installed_code_handle, triggered_deoptimizations_handle); | 573 GraalEnv::CodeInstallResult result = installer.install(compiled_code_handle, cb, installed_code_handle, speculation_log_handle); |
574 | 574 |
575 if (PrintCodeCacheOnCompilation) { | 575 if (PrintCodeCacheOnCompilation) { |
576 stringStream s; | 576 stringStream s; |
577 // Dump code cache into a buffer before locking the tty, | 577 // Dump code cache into a buffer before locking the tty, |
578 { | 578 { |
828 #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &(c2v_ ## f)) | 828 #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &(c2v_ ## f)) |
829 | 829 |
830 #define TYPE "Lcom/oracle/graal/api/meta/JavaType;" | 830 #define TYPE "Lcom/oracle/graal/api/meta/JavaType;" |
831 #define METHOD "Lcom/oracle/graal/api/meta/JavaMethod;" | 831 #define METHOD "Lcom/oracle/graal/api/meta/JavaMethod;" |
832 #define FIELD "Lcom/oracle/graal/api/meta/JavaField;" | 832 #define FIELD "Lcom/oracle/graal/api/meta/JavaField;" |
833 #define SPECULATION_LOG "Lcom/oracle/graal/api/code/SpeculationLog;" | |
833 #define STRING "Ljava/lang/String;" | 834 #define STRING "Ljava/lang/String;" |
834 #define OBJECT "Ljava/lang/Object;" | 835 #define OBJECT "Ljava/lang/Object;" |
835 #define CLASS "Ljava/lang/Class;" | 836 #define CLASS "Ljava/lang/Class;" |
836 #define STACK_TRACE_ELEMENT "Ljava/lang/StackTraceElement;" | 837 #define STACK_TRACE_ELEMENT "Ljava/lang/StackTraceElement;" |
837 #define HS_RESOLVED_TYPE "Lcom/oracle/graal/hotspot/meta/HotSpotResolvedObjectType;" | 838 #define HS_RESOLVED_TYPE "Lcom/oracle/graal/hotspot/meta/HotSpotResolvedObjectType;" |
867 {CC"getClassInitializer", CC"("HS_RESOLVED_TYPE")"METASPACE_METHOD, FN_PTR(getClassInitializer)}, | 868 {CC"getClassInitializer", CC"("HS_RESOLVED_TYPE")"METASPACE_METHOD, FN_PTR(getClassInitializer)}, |
868 {CC"hasFinalizableSubclass", CC"("HS_RESOLVED_TYPE")Z", FN_PTR(hasFinalizableSubclass)}, | 869 {CC"hasFinalizableSubclass", CC"("HS_RESOLVED_TYPE")Z", FN_PTR(hasFinalizableSubclass)}, |
869 {CC"getMaxCallTargetOffset", CC"(J)J", FN_PTR(getMaxCallTargetOffset)}, | 870 {CC"getMaxCallTargetOffset", CC"(J)J", FN_PTR(getMaxCallTargetOffset)}, |
870 {CC"getMetaspaceMethod", CC"("CLASS"I)"METASPACE_METHOD, FN_PTR(getMetaspaceMethod)}, | 871 {CC"getMetaspaceMethod", CC"("CLASS"I)"METASPACE_METHOD, FN_PTR(getMetaspaceMethod)}, |
871 {CC"initializeConfiguration", CC"("HS_CONFIG")V", FN_PTR(initializeConfiguration)}, | 872 {CC"initializeConfiguration", CC"("HS_CONFIG")V", FN_PTR(initializeConfiguration)}, |
872 {CC"installCode0", CC"("HS_COMPILED_CODE HS_INSTALLED_CODE"[Z)I", FN_PTR(installCode0)}, | 873 {CC"installCode0", CC"("HS_COMPILED_CODE HS_INSTALLED_CODE SPECULATION_LOG")I", FN_PTR(installCode0)}, |
873 {CC"notifyCompilationStatistics", CC"(I"HS_RESOLVED_METHOD"ZIJJ"HS_INSTALLED_CODE")V", FN_PTR(notifyCompilationStatistics)}, | 874 {CC"notifyCompilationStatistics", CC"(I"HS_RESOLVED_METHOD"ZIJJ"HS_INSTALLED_CODE")V", FN_PTR(notifyCompilationStatistics)}, |
874 {CC"printCompilationStatistics", CC"(ZZ)V", FN_PTR(printCompilationStatistics)}, | 875 {CC"printCompilationStatistics", CC"(ZZ)V", FN_PTR(printCompilationStatistics)}, |
875 {CC"resetCompilationStatistics", CC"()V", FN_PTR(resetCompilationStatistics)}, | 876 {CC"resetCompilationStatistics", CC"()V", FN_PTR(resetCompilationStatistics)}, |
876 {CC"disassembleCodeBlob", CC"(J)"STRING, FN_PTR(disassembleCodeBlob)}, | 877 {CC"disassembleCodeBlob", CC"(J)"STRING, FN_PTR(disassembleCodeBlob)}, |
877 {CC"executeCompiledMethodVarargs", CC"(["OBJECT HS_INSTALLED_CODE")"OBJECT, FN_PTR(executeCompiledMethodVarargs)}, | 878 {CC"executeCompiledMethodVarargs", CC"(["OBJECT HS_INSTALLED_CODE")"OBJECT, FN_PTR(executeCompiledMethodVarargs)}, |