comparison src/share/vm/graal/graalCompilerToVM.cpp @ 5129:51111665eda6

Support for recording a leaf graph id for each deoptimization point in the debug info.
author Lukas Stadler <lukas.stadler@jku.at>
date Wed, 21 Mar 2012 10:47:02 +0100
parents 5e9f38419819
children ab038e0d6b43
comparison
equal deleted inserted replaced
5128:e2da6471a9a1 5129:51111665eda6
964 vtable_entry_offset = vtable_entry_offset * wordSize + vtableEntry::method_offset_in_bytes(); 964 vtable_entry_offset = vtable_entry_offset * wordSize + vtableEntry::method_offset_in_bytes();
965 965
966 return vtable_entry_offset; 966 return vtable_entry_offset;
967 } 967 }
968 968
969 // public native long[] getDeoptedLeafGraphIds();
970 JNIEXPORT jobject JNICALL Java_com_oracle_graal_hotspot_bridge_CompilerToVMImpl_getDeoptedLeafGraphIds(JNIEnv *, jobject) {
971 TRACE_graal_3("CompilerToVM::getDeoptedLeafGraphIds");
972
973 VM_ENTRY_MARK;
974
975 // the contract for this method is as follows:
976 // returning null: no deopted leaf graphs
977 // returning array (size > 0): the ids of the deopted leaf graphs
978 // returning array (size == 0): there was an overflow, the compiler needs to clear its cache completely
979
980 oop array = GraalCompiler::instance()->dump_deopted_leaf_graphs(CHECK_NULL);
981 return JNIHandles::make_local(array);
982 }
983
969 984
970 #define CC (char*) /*cast a literal from (const char*)*/ 985 #define CC (char*) /*cast a literal from (const char*)*/
971 #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &(Java_com_oracle_graal_hotspot_bridge_CompilerToVMImpl_##f)) 986 #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &(Java_com_oracle_graal_hotspot_bridge_CompilerToVMImpl_##f))
972 987
973 #define PROXY "J" 988 #define PROXY "J"
1027 {CC"installStub", CC"("TARGET_METHOD")"PROXY, FN_PTR(installStub)}, 1042 {CC"installStub", CC"("TARGET_METHOD")"PROXY, FN_PTR(installStub)},
1028 {CC"disassembleNative", CC"([BJ)"STRING, FN_PTR(disassembleNative)}, 1043 {CC"disassembleNative", CC"([BJ)"STRING, FN_PTR(disassembleNative)},
1029 {CC"disassembleJava", CC"("RESOLVED_METHOD")"STRING, FN_PTR(disassembleJava)}, 1044 {CC"disassembleJava", CC"("RESOLVED_METHOD")"STRING, FN_PTR(disassembleJava)},
1030 {CC"executeCompiledMethod", CC"("HS_COMP_METHOD OBJECT OBJECT OBJECT")"OBJECT, FN_PTR(executeCompiledMethod)}, 1045 {CC"executeCompiledMethod", CC"("HS_COMP_METHOD OBJECT OBJECT OBJECT")"OBJECT, FN_PTR(executeCompiledMethod)},
1031 {CC"RiMethod_vtableEntryOffset", CC"("RESOLVED_METHOD")I", FN_PTR(RiMethod_vtableEntryOffset)}, 1046 {CC"RiMethod_vtableEntryOffset", CC"("RESOLVED_METHOD")I", FN_PTR(RiMethod_vtableEntryOffset)},
1047 {CC"getDeoptedLeafGraphIds", CC"()[J", FN_PTR(getDeoptedLeafGraphIds)},
1032 }; 1048 };
1033 1049
1034 int CompilerToVM_methods_count() { 1050 int CompilerToVM_methods_count() {
1035 return sizeof(CompilerToVM_methods) / sizeof(JNINativeMethod); 1051 return sizeof(CompilerToVM_methods) / sizeof(JNINativeMethod);
1036 } 1052 }