Mercurial > hg > graal-compiler
comparison 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 |
comparison
equal
deleted
inserted
replaced
13629:5348da19751d | 13630:b1838411e896 |
---|---|
812 C2V_VMENTRY(jlongArray, collectCounters, (JNIEnv *env, jobject)) | 812 C2V_VMENTRY(jlongArray, collectCounters, (JNIEnv *env, jobject)) |
813 typeArrayOop arrayOop = oopFactory::new_longArray(GRAAL_COUNTERS_SIZE, CHECK_NULL); | 813 typeArrayOop arrayOop = oopFactory::new_longArray(GRAAL_COUNTERS_SIZE, CHECK_NULL); |
814 JavaThread::collect_counters(arrayOop); | 814 JavaThread::collect_counters(arrayOop); |
815 return (jlongArray) JNIHandles::make_local(arrayOop); | 815 return (jlongArray) JNIHandles::make_local(arrayOop); |
816 C2V_END | 816 C2V_END |
817 | |
818 C2V_VMENTRY(int, allocateCompileId, (JNIEnv *env, jobject, jobject hotspot_method, int entry_bci)) | |
819 HandleMark hm; | |
820 ResourceMark rm; | |
821 Method* method = getMethodFromHotSpotMethod(JNIHandles::resolve(hotspot_method)); | |
822 MutexLocker locker(MethodCompileQueue_lock, thread); | |
823 return CompileBroker::assign_compile_id(method, entry_bci); | |
824 C2V_END | |
825 | |
817 | 826 |
818 #define CC (char*) /*cast a literal from (const char*)*/ | 827 #define CC (char*) /*cast a literal from (const char*)*/ |
819 #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &(c2v_ ## f)) | 828 #define FN_PTR(f) CAST_FROM_FN_PTR(void*, &(c2v_ ## f)) |
820 | 829 |
821 #define TYPE "Lcom/oracle/graal/api/meta/JavaType;" | 830 #define TYPE "Lcom/oracle/graal/api/meta/JavaType;" |
873 {CC"reprofile", CC"("METASPACE_METHOD")V", FN_PTR(reprofile)}, | 882 {CC"reprofile", CC"("METASPACE_METHOD")V", FN_PTR(reprofile)}, |
874 {CC"invalidateInstalledCode", CC"("HS_INSTALLED_CODE")V", FN_PTR(invalidateInstalledCode)}, | 883 {CC"invalidateInstalledCode", CC"("HS_INSTALLED_CODE")V", FN_PTR(invalidateInstalledCode)}, |
875 {CC"readUnsafeUncompressedPointer", CC"("OBJECT"J)"OBJECT, FN_PTR(readUnsafeUncompressedPointer)}, | 884 {CC"readUnsafeUncompressedPointer", CC"("OBJECT"J)"OBJECT, FN_PTR(readUnsafeUncompressedPointer)}, |
876 {CC"readUnsafeKlassPointer", CC"("OBJECT")J", FN_PTR(readUnsafeKlassPointer)}, | 885 {CC"readUnsafeKlassPointer", CC"("OBJECT")J", FN_PTR(readUnsafeKlassPointer)}, |
877 {CC"collectCounters", CC"()[J", FN_PTR(collectCounters)}, | 886 {CC"collectCounters", CC"()[J", FN_PTR(collectCounters)}, |
887 {CC"allocateCompileId", CC"("HS_RESOLVED_METHOD"I)I", FN_PTR(allocateCompileId)}, | |
878 }; | 888 }; |
879 | 889 |
880 int CompilerToVM_methods_count() { | 890 int CompilerToVM_methods_count() { |
881 return sizeof(CompilerToVM_methods) / sizeof(JNINativeMethod); | 891 return sizeof(CompilerToVM_methods) / sizeof(JNINativeMethod); |
882 } | 892 } |