# HG changeset patch # User Thomas Wuerthinger # Date 1321551213 -3600 # Node ID 8c46cdb684d45b596afa1749e548ce7e4ce62026 # Parent e0bbc6b1c4a175a7844b574acbc27b41bccb2841 Fixed another possible safepoint in the code installer. diff -r e0bbc6b1c4a1 -r 8c46cdb684d4 src/share/vm/graal/graalCodeInstaller.cpp --- 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() { diff -r e0bbc6b1c4a1 -r 8c46cdb684d4 src/share/vm/graal/graalVMEntries.cpp --- 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();