Mercurial > hg > truffle
comparison src/share/vm/graal/graalCompilerToVM.cpp @ 5763:a3d71693e0ce
removed bytecode disassembly from CodeCacheRuntime into separate BytecodeDisassembler class
removed VM call for doing bytecode disassembly
added support for explicitly excluding classes from JaCoCo (put '// JaCoCo Exclude' somewhere in the source file)
added node intrinsics to MaterializeNode
added snippets for the UnsignedMath classes
each file opened by CFGPrinter now includes a unique id in its name to avoid a race of multiple threads writing to the same file
the IdealGraphPrinter uses the new BytecodeDisassembler mechanism
teh UnsignedMath class is exclude from JaCoCo processing as it is used in snippets
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 04 Jul 2012 21:57:49 +0200 |
parents | 87e8baf5447c |
children | 2a64cf19ab2a |
comparison
equal
deleted
inserted
replaced
5762:b30cced39597 | 5763:a3d71693e0ce |
---|---|
927 | 927 |
928 Handle result = java_lang_String::create_from_platform_dependent_str(st.as_string(), CHECK_NULL); | 928 Handle result = java_lang_String::create_from_platform_dependent_str(st.as_string(), CHECK_NULL); |
929 return JNIHandles::make_local(result()); | 929 return JNIHandles::make_local(result()); |
930 } | 930 } |
931 | 931 |
932 // public String disassembleJava(HotSpotResolvedJavaMethod method); | |
933 JNIEXPORT jobject JNICALL Java_com_oracle_graal_hotspot_bridge_CompilerToVMImpl_disassembleJava(JNIEnv *env, jobject, jobject hotspot_method) { | |
934 TRACE_graal_3("CompilerToVM::disassembleJava"); | |
935 | |
936 // Important: The bytecode printing functions are all NOT PRODUCT code, so this method returns an empty string for a product VM build. | |
937 | |
938 VM_ENTRY_MARK; | |
939 ResourceMark rm; | |
940 HandleMark hm; | |
941 | |
942 methodHandle method = getMethodFromHotSpotMethod(hotspot_method); | |
943 // Note: cannot use resource-allocated stringStream because print_code_on has its own ResourceMark. | |
944 bufferedStream(st); | |
945 method->print_codes_on(&st); | |
946 | |
947 Handle result = java_lang_String::create_from_platform_dependent_str(st.as_string(), CHECK_NULL); | |
948 return JNIHandles::make_local(result()); | |
949 } | |
950 | |
951 // public StackTraceElement JavaMethod_toStackTraceElement(HotSpotResolvedJavaMethod method, int bci); | 932 // public StackTraceElement JavaMethod_toStackTraceElement(HotSpotResolvedJavaMethod method, int bci); |
952 JNIEXPORT jobject JNICALL Java_com_oracle_graal_hotspot_bridge_CompilerToVMImpl_JavaMethod_1toStackTraceElement(JNIEnv *env, jobject, jobject hotspot_method, int bci) { | 933 JNIEXPORT jobject JNICALL Java_com_oracle_graal_hotspot_bridge_CompilerToVMImpl_JavaMethod_1toStackTraceElement(JNIEnv *env, jobject, jobject hotspot_method, int bci) { |
953 TRACE_graal_3("CompilerToVM::JavaMethod_toStackTraceElement"); | 934 TRACE_graal_3("CompilerToVM::JavaMethod_toStackTraceElement"); |
954 | 935 |
955 VM_ENTRY_MARK; | 936 VM_ENTRY_MARK; |
1133 {CC"getMaxCallTargetOffset", CC"("CI_RUNTIME_CALL")J", FN_PTR(getMaxCallTargetOffset)}, | 1114 {CC"getMaxCallTargetOffset", CC"("CI_RUNTIME_CALL")J", FN_PTR(getMaxCallTargetOffset)}, |
1134 {CC"getType", CC"("CLASS")"TYPE, FN_PTR(getType)}, | 1115 {CC"getType", CC"("CLASS")"TYPE, FN_PTR(getType)}, |
1135 {CC"getConfiguration", CC"()"CONFIG, FN_PTR(getConfiguration)}, | 1116 {CC"getConfiguration", CC"()"CONFIG, FN_PTR(getConfiguration)}, |
1136 {CC"installMethod", CC"("TARGET_METHOD"Z"HS_CODE_INFO")"HS_COMP_METHOD, FN_PTR(installMethod)}, | 1117 {CC"installMethod", CC"("TARGET_METHOD"Z"HS_CODE_INFO")"HS_COMP_METHOD, FN_PTR(installMethod)}, |
1137 {CC"disassembleNative", CC"([BJ)"STRING, FN_PTR(disassembleNative)}, | 1118 {CC"disassembleNative", CC"([BJ)"STRING, FN_PTR(disassembleNative)}, |
1138 {CC"disassembleJava", CC"("RESOLVED_METHOD")"STRING, FN_PTR(disassembleJava)}, | |
1139 {CC"JavaMethod_toStackTraceElement", CC"("RESOLVED_METHOD"I)"STACK_TRACE_ELEMENT, FN_PTR(JavaMethod_1toStackTraceElement)}, | 1119 {CC"JavaMethod_toStackTraceElement", CC"("RESOLVED_METHOD"I)"STACK_TRACE_ELEMENT, FN_PTR(JavaMethod_1toStackTraceElement)}, |
1140 {CC"executeCompiledMethod", CC"("HS_COMP_METHOD OBJECT OBJECT OBJECT")"OBJECT, FN_PTR(executeCompiledMethod)}, | 1120 {CC"executeCompiledMethod", CC"("HS_COMP_METHOD OBJECT OBJECT OBJECT")"OBJECT, FN_PTR(executeCompiledMethod)}, |
1141 {CC"executeCompiledMethodVarargs", CC"("HS_COMP_METHOD "["OBJECT")"OBJECT, FN_PTR(executeCompiledMethodVarargs)}, | 1121 {CC"executeCompiledMethodVarargs", CC"("HS_COMP_METHOD "["OBJECT")"OBJECT, FN_PTR(executeCompiledMethodVarargs)}, |
1142 {CC"JavaMethod_vtableEntryOffset", CC"("RESOLVED_METHOD")I", FN_PTR(JavaMethod_vtableEntryOffset)}, | 1122 {CC"JavaMethod_vtableEntryOffset", CC"("RESOLVED_METHOD")I", FN_PTR(JavaMethod_vtableEntryOffset)}, |
1143 {CC"getDeoptedLeafGraphIds", CC"()[J", FN_PTR(getDeoptedLeafGraphIds)}, | 1123 {CC"getDeoptedLeafGraphIds", CC"()[J", FN_PTR(getDeoptedLeafGraphIds)}, |