Mercurial > hg > graal-compiler
comparison 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 |
comparison
equal
deleted
inserted
replaced
2924:9d4e5b492521 | 2925:b78b4ae0757c |
---|---|
71 check_not_null(compilerImplKlass(), "Couldn't find class com.sun.hotspot.graal.CompilerImpl"); | 71 check_not_null(compilerImplKlass(), "Couldn't find class com.sun.hotspot.graal.CompilerImpl"); |
72 | 72 |
73 JavaValue result(T_VOID); | 73 JavaValue result(T_VOID); |
74 JavaCalls::call_static(&result, compilerImplKlass, vmSymbols::initialize_name(), vmSymbols::void_method_signature(), Thread::current()); | 74 JavaCalls::call_static(&result, compilerImplKlass, vmSymbols::initialize_name(), vmSymbols::void_method_signature(), Thread::current()); |
75 check_pending_exception("Couldn't initialize compiler"); | 75 check_pending_exception("Couldn't initialize compiler"); |
76 | |
77 startCompiler(); | |
76 } | 78 } |
77 | 79 |
78 jboolean VMExits::setOption(Handle option) { | 80 jboolean VMExits::setOption(Handle option) { |
79 assert(!option.is_null(), ""); | 81 assert(!option.is_null(), ""); |
80 KlassHandle compilerKlass = SystemDictionary::resolve_or_null(vmSymbols::com_sun_hotspot_graal_HotSpotOptions(), SystemDictionary::java_system_loader(), NULL, Thread::current()); | 82 KlassHandle compilerKlass = SystemDictionary::resolve_or_null(vmSymbols::com_sun_hotspot_graal_HotSpotOptions(), SystemDictionary::java_system_loader(), NULL, Thread::current()); |
117 args.push_oop(instance()); | 119 args.push_oop(instance()); |
118 JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::shutdownCompiler_name(), vmSymbols::void_method_signature(), &args, THREAD); | 120 JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::shutdownCompiler_name(), vmSymbols::void_method_signature(), &args, THREAD); |
119 check_pending_exception("Error while calling shutdownCompiler"); | 121 check_pending_exception("Error while calling shutdownCompiler"); |
120 } | 122 } |
121 | 123 |
124 void VMExits::startCompiler() { | |
125 JavaThread* THREAD = JavaThread::current(); | |
126 JavaValue result(T_VOID); | |
127 JavaCallArguments args; | |
128 args.push_oop(instance()); | |
129 JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::startCompiler_name(), vmSymbols::void_method_signature(), &args, THREAD); | |
130 check_pending_exception("Error while calling startCompiler"); | |
131 } | |
122 | 132 |
123 oop VMExits::createRiMethodResolved(jlong vmId, Handle name, TRAPS) { | 133 oop VMExits::createRiMethodResolved(jlong vmId, Handle name, TRAPS) { |
124 assert(!name.is_null(), "just checking"); | 134 assert(!name.is_null(), "just checking"); |
125 JavaValue result(T_OBJECT); | 135 JavaValue result(T_OBJECT); |
126 JavaCallArguments args; | 136 JavaCallArguments args; |