# HG changeset patch # User Thomas Wuerthinger # Date 1322056372 -3600 # Node ID f8d7ab42c4790fe1f48a0924088bcd3d404d689c # Parent 9878f53ebe09e6cf0f8e3eab5a9577e7905cc90b Call NMethodSweeper::possibly_sweep() before registering a method. diff -r 9878f53ebe09 -r f8d7ab42c479 src/share/vm/graal/graalCodeInstaller.cpp --- a/src/share/vm/graal/graalCodeInstaller.cpp Tue Nov 22 11:48:41 2011 +0100 +++ b/src/share/vm/graal/graalCodeInstaller.cpp Wed Nov 23 14:52:52 2011 +0100 @@ -265,7 +265,7 @@ methodHandle method = getMethodFromHotSpotMethod(HotSpotTargetMethod::method(JNIHandles::resolve(target_method_obj))); { nm = GraalEnv::register_method(method, -1, &_offsets, _custom_stack_area_offset, &buffer, stack_slots, _debug_recorder->_oopmaps, &_exception_handler_table, - &_implicit_exception_table, GraalCompiler::instance(), _debug_recorder, _dependencies, NULL, -1, false, false, install_code); + &_implicit_exception_table, GraalCompiler::instance(), _debug_recorder, _dependencies, NULL, -1, true, false, install_code); } method->clear_queued_for_compilation(); } diff -r 9878f53ebe09 -r f8d7ab42c479 src/share/vm/graal/graalEnv.cpp --- a/src/share/vm/graal/graalEnv.cpp Tue Nov 22 11:48:41 2011 +0100 +++ b/src/share/vm/graal/graalEnv.cpp Wed Nov 23 14:52:52 2011 +0100 @@ -27,6 +27,7 @@ #include "classfile/systemDictionary.hpp" #include "classfile/vmSymbols.hpp" #include "code/scopeDesc.hpp" +#include "runtime/sweeper.hpp" #include "compiler/compileBroker.hpp" #include "compiler/compileLog.hpp" #include "compiler/compilerOracle.hpp" @@ -447,6 +448,7 @@ bool has_unsafe_access, bool install_code) { EXCEPTION_CONTEXT; + NMethodSweeper::possibly_sweep(); nmethod* nm = NULL; int comp_level = CompLevel_simple; {