Mercurial > hg > graal-compiler
diff src/share/vm/graal/graalVMExits.cpp @ 2925:b78b4ae0757c
Also call Compiler shutdown hook in case of System.exit call. Draft VMExits.Sandbox class.
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Thu, 09 Jun 2011 14:42:24 +0200 |
parents | c3faf3b842bb |
children | 0c0e407faa39 |
line wrap: on
line diff
--- a/src/share/vm/graal/graalVMExits.cpp Thu Jun 09 14:02:28 2011 +0200 +++ b/src/share/vm/graal/graalVMExits.cpp Thu Jun 09 14:42:24 2011 +0200 @@ -73,6 +73,8 @@ JavaValue result(T_VOID); JavaCalls::call_static(&result, compilerImplKlass, vmSymbols::initialize_name(), vmSymbols::void_method_signature(), Thread::current()); check_pending_exception("Couldn't initialize compiler"); + + startCompiler(); } jboolean VMExits::setOption(Handle option) { @@ -119,6 +121,14 @@ check_pending_exception("Error while calling shutdownCompiler"); } +void VMExits::startCompiler() { + JavaThread* THREAD = JavaThread::current(); + JavaValue result(T_VOID); + JavaCallArguments args; + args.push_oop(instance()); + JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::startCompiler_name(), vmSymbols::void_method_signature(), &args, THREAD); + check_pending_exception("Error while calling startCompiler"); +} oop VMExits::createRiMethodResolved(jlong vmId, Handle name, TRAPS) { assert(!name.is_null(), "just checking");