Mercurial > hg > graal-compiler
diff src/share/vm/graal/graalCompilerToVM.cpp @ 13630:b1838411e896
Use compile ids assigned by hotspot
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Tue, 14 Jan 2014 10:14:31 -0800 |
parents | d8143c431d63 |
children | 5a9afbf72714 |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompilerToVM.cpp Tue Jan 14 10:14:28 2014 -0800 +++ b/src/share/vm/graal/graalCompilerToVM.cpp Tue Jan 14 10:14:31 2014 -0800 @@ -815,6 +815,15 @@ return (jlongArray) JNIHandles::make_local(arrayOop); C2V_END +C2V_VMENTRY(int, allocateCompileId, (JNIEnv *env, jobject, jobject hotspot_method, int entry_bci)) + HandleMark hm; + ResourceMark rm; + Method* method = getMethodFromHotSpotMethod(JNIHandles::resolve(hotspot_method)); + MutexLocker locker(MethodCompileQueue_lock, thread); + return CompileBroker::assign_compile_id(method, entry_bci); +C2V_END + + #define CC (char*) /*cast a literal from (const char*)*/ #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &(c2v_ ## f)) @@ -875,6 +884,7 @@ {CC"readUnsafeUncompressedPointer", CC"("OBJECT"J)"OBJECT, FN_PTR(readUnsafeUncompressedPointer)}, {CC"readUnsafeKlassPointer", CC"("OBJECT")J", FN_PTR(readUnsafeKlassPointer)}, {CC"collectCounters", CC"()[J", FN_PTR(collectCounters)}, + {CC"allocateCompileId", CC"("HS_RESOLVED_METHOD"I)I", FN_PTR(allocateCompileId)}, }; int CompilerToVM_methods_count() {