Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalCompilerToVM.cpp @ 10475:3489047ffea2
Restructure the handling of HotSpotInstalledCode and their link to nmethods.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 21 Jun 2013 18:26:52 +0200 |
parents | 8b22524df53b |
children | cd68d6902328 |
comparison
equal
deleted
inserted
replaced
10474:55827d611da7 | 10475:3489047ffea2 |
---|---|
1002 methodHandle method = asMethod(metaspace_method); | 1002 methodHandle method = asMethod(metaspace_method); |
1003 oop element = java_lang_StackTraceElement::create(method, bci, CHECK_NULL); | 1003 oop element = java_lang_StackTraceElement::create(method, bci, CHECK_NULL); |
1004 return JNIHandles::make_local(element); | 1004 return JNIHandles::make_local(element); |
1005 C2V_END | 1005 C2V_END |
1006 | 1006 |
1007 C2V_VMENTRY(jobject, executeCompiledMethodVarargs, (JNIEnv *env, jobject, jobject args, jlong nmethodValue)) | 1007 C2V_VMENTRY(jobject, executeCompiledMethodVarargs, (JNIEnv *env, jobject, jobject args, jobject hotspotInstalledCode)) |
1008 ResourceMark rm; | 1008 ResourceMark rm; |
1009 HandleMark hm; | 1009 HandleMark hm; |
1010 | 1010 |
1011 jlong nmethodValue = HotSpotInstalledCode::codeBlob(hotspotInstalledCode); | |
1011 nmethod* nm = (nmethod*) (address) nmethodValue; | 1012 nmethod* nm = (nmethod*) (address) nmethodValue; |
1012 methodHandle mh = nm->method(); | 1013 methodHandle mh = nm->method(); |
1013 Symbol* signature = mh->signature(); | 1014 Symbol* signature = mh->signature(); |
1014 JavaCallArguments jca(mh->size_of_parameters()); | 1015 JavaCallArguments jca(mh->size_of_parameters()); |
1015 | 1016 |
1201 #define HS_METHOD "Lcom/oracle/graal/hotspot/meta/HotSpotMethod;" | 1202 #define HS_METHOD "Lcom/oracle/graal/hotspot/meta/HotSpotMethod;" |
1202 #define HS_INSTALLED_CODE "Lcom/oracle/graal/hotspot/meta/HotSpotInstalledCode;" | 1203 #define HS_INSTALLED_CODE "Lcom/oracle/graal/hotspot/meta/HotSpotInstalledCode;" |
1203 #define METHOD_DATA "Lcom/oracle/graal/hotspot/meta/HotSpotMethodData;" | 1204 #define METHOD_DATA "Lcom/oracle/graal/hotspot/meta/HotSpotMethodData;" |
1204 #define METASPACE_METHOD "J" | 1205 #define METASPACE_METHOD "J" |
1205 #define METASPACE_METHOD_DATA "J" | 1206 #define METASPACE_METHOD_DATA "J" |
1206 #define NMETHOD "J" | |
1207 | 1207 |
1208 JNINativeMethod CompilerToVM_methods[] = { | 1208 JNINativeMethod CompilerToVM_methods[] = { |
1209 {CC"initializeBytecode", CC"("METASPACE_METHOD"[B)[B", FN_PTR(initializeBytecode)}, | 1209 {CC"initializeBytecode", CC"("METASPACE_METHOD"[B)[B", FN_PTR(initializeBytecode)}, |
1210 {CC"getSignature", CC"("METASPACE_METHOD")"STRING, FN_PTR(getSignature)}, | 1210 {CC"getSignature", CC"("METASPACE_METHOD")"STRING, FN_PTR(getSignature)}, |
1211 {CC"initializeExceptionHandlers", CC"("METASPACE_METHOD EXCEPTION_HANDLERS")"EXCEPTION_HANDLERS, FN_PTR(initializeExceptionHandlers)}, | 1211 {CC"initializeExceptionHandlers", CC"("METASPACE_METHOD EXCEPTION_HANDLERS")"EXCEPTION_HANDLERS, FN_PTR(initializeExceptionHandlers)}, |
1241 {CC"getJavaField", CC"("REFLECT_FIELD")"HS_RESOLVED_FIELD, FN_PTR(getJavaField)}, | 1241 {CC"getJavaField", CC"("REFLECT_FIELD")"HS_RESOLVED_FIELD, FN_PTR(getJavaField)}, |
1242 {CC"initializeConfiguration", CC"("HS_CONFIG")V", FN_PTR(initializeConfiguration)}, | 1242 {CC"initializeConfiguration", CC"("HS_CONFIG")V", FN_PTR(initializeConfiguration)}, |
1243 {CC"installCode0", CC"("HS_COMPILED_CODE HS_INSTALLED_CODE"[Z)I", FN_PTR(installCode0)}, | 1243 {CC"installCode0", CC"("HS_COMPILED_CODE HS_INSTALLED_CODE"[Z)I", FN_PTR(installCode0)}, |
1244 {CC"getCode", CC"(J)[B", FN_PTR(getCode)}, | 1244 {CC"getCode", CC"(J)[B", FN_PTR(getCode)}, |
1245 {CC"disassembleCodeBlob", CC"(J)"STRING, FN_PTR(disassembleCodeBlob)}, | 1245 {CC"disassembleCodeBlob", CC"(J)"STRING, FN_PTR(disassembleCodeBlob)}, |
1246 {CC"executeCompiledMethodVarargs", CC"(["OBJECT NMETHOD")"OBJECT, FN_PTR(executeCompiledMethodVarargs)}, | 1246 {CC"executeCompiledMethodVarargs", CC"(["OBJECT HS_INSTALLED_CODE")"OBJECT, FN_PTR(executeCompiledMethodVarargs)}, |
1247 {CC"getDeoptedLeafGraphIds", CC"()[J", FN_PTR(getDeoptedLeafGraphIds)}, | 1247 {CC"getDeoptedLeafGraphIds", CC"()[J", FN_PTR(getDeoptedLeafGraphIds)}, |
1248 {CC"getLineNumberTable", CC"("HS_RESOLVED_METHOD")[J", FN_PTR(getLineNumberTable)}, | 1248 {CC"getLineNumberTable", CC"("HS_RESOLVED_METHOD")[J", FN_PTR(getLineNumberTable)}, |
1249 {CC"getLocalVariableTable", CC"("HS_RESOLVED_METHOD")["LOCAL, FN_PTR(getLocalVariableTable)}, | 1249 {CC"getLocalVariableTable", CC"("HS_RESOLVED_METHOD")["LOCAL, FN_PTR(getLocalVariableTable)}, |
1250 {CC"getFileName", CC"("HS_RESOLVED_JAVA_TYPE")"STRING, FN_PTR(getFileName)}, | 1250 {CC"getFileName", CC"("HS_RESOLVED_JAVA_TYPE")"STRING, FN_PTR(getFileName)}, |
1251 {CC"reprofile", CC"("METASPACE_METHOD")V", FN_PTR(reprofile)}, | 1251 {CC"reprofile", CC"("METASPACE_METHOD")V", FN_PTR(reprofile)}, |