Mercurial > hg > graal-compiler
diff src/share/vm/graal/graalCompiler.cpp @ 3651:a31028282e3e
Support blocking compilation.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Wed, 16 Nov 2011 23:35:03 +0100 |
parents | 0e8a2a629afb |
children | 6aef50c6d967 |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompiler.cpp Wed Nov 16 21:27:28 2011 +0100 +++ b/src/share/vm/graal/graalCompiler.cpp Wed Nov 16 23:35:03 2011 +0100 @@ -81,11 +81,11 @@ } } VMExits::startCompiler(); - } - _initialized = true; - if (BootstrapGraal) { - VMExits::bootstrap(); + _initialized = true; + if (BootstrapGraal) { + VMExits::bootstrap(); + } } } @@ -104,32 +104,28 @@ } } -void GraalCompiler::compile_method(methodHandle method, int entry_bci) { +void GraalCompiler::compile_method(methodHandle method, int entry_bci, jboolean blocking) { EXCEPTION_CONTEXT - if (!_initialized) return; + if (!_initialized) { + method->clear_queued_for_compilation(); + method->invocation_counter()->reset(); + method->backedge_counter()->reset(); + return; + } assert(_initialized, "must already be initialized"); ResourceMark rm; ciEnv* current_env = JavaThread::current()->env(); JavaThread::current()->set_env(NULL); JavaThread::current()->set_compiling(true); Handle hotspot_method = GraalCompiler::createHotSpotMethodResolved(method, CHECK); - VMExits::compileMethod(hotspot_method, entry_bci); + VMExits::compileMethod(hotspot_method, entry_bci, blocking); JavaThread::current()->set_compiling(false); JavaThread::current()->set_env(current_env); } // Compilation entry point for methods void GraalCompiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci) { - VM_ENTRY_MARK; - ResourceMark rm; - HandleMark hm; - - TRACE_graal_2("GraalCompiler::compile_method"); - - - compile_method((methodOop)target->get_oop(), entry_bci); - - TRACE_graal_2("GraalCompiler::compile_method exit"); + ShouldNotReachHere(); } void GraalCompiler::exit() {