Mercurial > hg > graal-compiler
changeset 3663:8c46cdb684d4
Fixed another possible safepoint in the code installer.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 17 Nov 2011 18:33:33 +0100 |
parents | e0bbc6b1c4a1 |
children | 6e1abd79e7c8 |
files | src/share/vm/graal/graalCodeInstaller.cpp src/share/vm/graal/graalVMEntries.cpp |
diffstat | 2 files changed, 5 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCodeInstaller.cpp Thu Nov 17 18:02:12 2011 +0100 +++ b/src/share/vm/graal/graalCodeInstaller.cpp Thu Nov 17 18:33:33 2011 +0100 @@ -233,17 +233,12 @@ // constructor used to create a method CodeInstaller::CodeInstaller(Handle target_method, nmethod*& nm, bool install_code) { _env = CURRENT_ENV; + GraalCompiler::initialize_buffer_blob(); + CodeBuffer buffer(JavaThread::current()->get_buffer_blob()); + { No_Safepoint_Verifier no_safepoint; initialize_fields(target_method); - } - - // (very) conservative estimate: each site needs a relocation - //CodeBuffer buffer("temp graal method", _total_size, _sites->length() * relocInfo::length_limit); - GraalCompiler::initialize_buffer_blob(); - CodeBuffer buffer(JavaThread::current()->get_buffer_blob()); - { - No_Safepoint_Verifier no_safepoint; initialize_buffer(buffer); process_exception_handlers(); } @@ -381,7 +376,6 @@ _dependencies->assert_leaf_type(type); if (context != type) { assert(context->is_abstract(), ""); - ThreadToNativeFromVM trans(JavaThread::current()); _dependencies->assert_abstract_with_unique_concrete_subtype(context, type); } } @@ -395,10 +389,7 @@ ciMethod* m = (ciMethod*) CURRENT_ENV->get_object(method()); ciMethod* c = (ciMethod*) CURRENT_ENV->get_object(context()); ciKlass* context_klass = c->holder(); - { - ThreadToNativeFromVM trans(JavaThread::current()); - _dependencies->assert_unique_concrete_method(context_klass, m); - } + _dependencies->assert_unique_concrete_method(context_klass, m); } void CodeInstaller::process_exception_handlers() {
--- a/src/share/vm/graal/graalVMEntries.cpp Thu Nov 17 18:02:12 2011 +0100 +++ b/src/share/vm/graal/graalVMEntries.cpp Thu Nov 17 18:33:33 2011 +0100 @@ -236,6 +236,7 @@ if (method_data == NULL || !method_data->is_mature()) { return NULL; } + ResourceMark rm; ProfileData* data = method_data->bci_to_data(bci); if (data != NULL && data->is_ReceiverTypeData()) { ReceiverTypeData* recv = data->as_ReceiverTypeData();