Mercurial > hg > truffle
comparison src/share/vm/graal/graalCompilerToVM.cpp @ 9654:18632807db02
RuntimeStub installation support is now more distinct from normal nmethod installation
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 13 May 2013 11:21:24 +0200 |
parents | dd62ccda1849 |
children | fe9a18fbb15e |
comparison
equal
deleted
inserted
replaced
9653:36e12fbbefdf | 9654:18632807db02 |
---|---|
870 C2V_VMENTRY(jint, installCode0, (JNIEnv *jniEnv, jobject, jobject compResult, jobject installed_code, jobject triggered_deoptimizations)) | 870 C2V_VMENTRY(jint, installCode0, (JNIEnv *jniEnv, jobject, jobject compResult, jobject installed_code, jobject triggered_deoptimizations)) |
871 ResourceMark rm; | 871 ResourceMark rm; |
872 HandleMark hm; | 872 HandleMark hm; |
873 Handle compResultHandle = JNIHandles::resolve(compResult); | 873 Handle compResultHandle = JNIHandles::resolve(compResult); |
874 CodeBlob* cb = NULL; | 874 CodeBlob* cb = NULL; |
875 methodHandle method = getMethodFromHotSpotMethod(HotSpotCompilationResult::method(compResult)); | |
876 Handle installed_code_handle = JNIHandles::resolve(installed_code); | 875 Handle installed_code_handle = JNIHandles::resolve(installed_code); |
877 Handle triggered_deoptimizations_handle = JNIHandles::resolve(triggered_deoptimizations); | 876 Handle triggered_deoptimizations_handle = JNIHandles::resolve(triggered_deoptimizations); |
878 GraalEnv::CodeInstallResult result; | 877 GraalEnv::CodeInstallResult result; |
879 | 878 |
880 CodeInstaller installer(compResultHandle, method, result, cb, installed_code_handle, triggered_deoptimizations_handle); | 879 CodeInstaller installer(compResultHandle, result, cb, installed_code_handle, triggered_deoptimizations_handle); |
881 | 880 |
882 if (PrintCodeCacheOnCompilation) { | 881 if (PrintCodeCacheOnCompilation) { |
883 stringStream s; | 882 stringStream s; |
884 // Dump code cache into a buffer before locking the tty, | 883 // Dump code cache into a buffer before locking the tty, |
885 { | 884 { |
896 if (!installed_code_handle.is_null()) { | 895 if (!installed_code_handle.is_null()) { |
897 assert(installed_code_handle->is_a(HotSpotInstalledCode::klass()), "wrong type"); | 896 assert(installed_code_handle->is_a(HotSpotInstalledCode::klass()), "wrong type"); |
898 HotSpotInstalledCode::set_codeBlob(installed_code_handle, (jlong) cb); | 897 HotSpotInstalledCode::set_codeBlob(installed_code_handle, (jlong) cb); |
899 HotSpotInstalledCode::set_method(installed_code_handle, HotSpotCompilationResult::method(compResult)); | 898 HotSpotInstalledCode::set_method(installed_code_handle, HotSpotCompilationResult::method(compResult)); |
900 HotSpotInstalledCode::set_start(installed_code_handle, (jlong) cb->code_begin()); | 899 HotSpotInstalledCode::set_start(installed_code_handle, (jlong) cb->code_begin()); |
901 HotSpotInstalledCode::set_isNmethod(installed_code_handle, cb->is_nmethod()); | |
902 nmethod* nm = cb->as_nmethod_or_null(); | 900 nmethod* nm = cb->as_nmethod_or_null(); |
903 assert(nm == NULL || !installed_code_handle->is_scavengable() || nm->on_scavenge_root_list(), "nm should be scavengable if installed_code is scavengable"); | 901 assert(nm == NULL || !installed_code_handle->is_scavengable() || nm->on_scavenge_root_list(), "nm should be scavengable if installed_code is scavengable"); |
904 } | 902 } |
905 } | 903 } |
906 return result; | 904 return result; |