Mercurial > hg > graal-jvmci-8
diff src/share/vm/graal/graalCompilerToVM.cpp @ 4534:6dda62bf5be4
Merge.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 09 Feb 2012 10:03:21 +0100 |
parents | 818757f088d3 3a309467fc8e |
children | a7a16015e47f |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompilerToVM.cpp Thu Feb 09 10:03:00 2012 +0100 +++ b/src/share/vm/graal/graalCompilerToVM.cpp Thu Feb 09 10:03:21 2012 +0100 @@ -239,6 +239,13 @@ return getMethodFromHotSpotMethod(hotspot_method)->has_compiled_code(); } +// public native int RiMethod_getCompiledCodeSize(HotSpotMethodResolved method); +JNIEXPORT jint JNICALL Java_com_oracle_max_graal_hotspot_bridge_CompilerToVMImpl_RiMethod_1getCompiledCodeSize(JNIEnv *env, jobject, jobject hotspot_method) { + TRACE_graal_3("CompilerToVM::RiMethod_getCompiledCodeSize"); + nmethod* code = getMethodFromHotSpotMethod(hotspot_method)->code(); + return code == NULL ? 0 : code->insts_size(); +} + // public RiType RiSignature_lookupType(String returnType, HotSpotTypeResolved accessingClass); JNIEXPORT jobject JNICALL Java_com_oracle_max_graal_hotspot_bridge_CompilerToVMImpl_RiSignature_1lookupType(JNIEnv *env, jobject, jstring jname, jobject accessingClass, jboolean eagerResolve) { TRACE_graal_3("CompilerToVM::RiSignature_lookupType"); @@ -947,6 +954,7 @@ {CC"HotSpotMethodData_isMature", CC"("METHOD_DATA")Z", FN_PTR(HotSpotMethodData_1isMature)}, {CC"RiMethod_invocationCount", CC"("RESOLVED_METHOD")I", FN_PTR(RiMethod_1invocationCount)}, {CC"RiMethod_hasCompiledCode", CC"("RESOLVED_METHOD")Z", FN_PTR(RiMethod_1hasCompiledCode)}, + {CC"RiMethod_getCompiledCodeSize", CC"("RESOLVED_METHOD")I", FN_PTR(RiMethod_1getCompiledCodeSize)}, {CC"RiSignature_lookupType", CC"("STRING RESOLVED_TYPE"Z)"TYPE, FN_PTR(RiSignature_1lookupType)}, {CC"RiConstantPool_lookupConstant", CC"("RESOLVED_TYPE"I)"OBJECT, FN_PTR(RiConstantPool_1lookupConstant)}, {CC"RiConstantPool_lookupMethod", CC"("RESOLVED_TYPE"IB)"METHOD, FN_PTR(RiConstantPool_1lookupMethod)},