comparison src/share/vm/graal/graalVMExits.cpp @ 3650:0e8a2a629afb

Pass-by compilation broker.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Wed, 16 Nov 2011 21:27:28 +0100
parents c7d4198a9bce
children a31028282e3e
comparison
equal deleted inserted replaced
3649:5a8c44b5fb80 3650:0e8a2a629afb
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();
78 } 76 }
79 77
80 jboolean VMExits::setOption(Handle option) { 78 jboolean VMExits::setOption(Handle option) {
81 assert(!option.is_null(), ""); 79 assert(!option.is_null(), "");
82 KlassHandle compilerKlass = SystemDictionary::resolve_or_null(vmSymbols::com_sun_hotspot_graal_HotSpotOptions(), SystemDictionary::java_system_loader(), NULL, Thread::current()); 80 KlassHandle compilerKlass = SystemDictionary::resolve_or_null(vmSymbols::com_sun_hotspot_graal_HotSpotOptions(), SystemDictionary::java_system_loader(), NULL, Thread::current());
138 args.push_oop(instance()); 136 args.push_oop(instance());
139 JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::startCompiler_name(), vmSymbols::void_method_signature(), &args, THREAD); 137 JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::startCompiler_name(), vmSymbols::void_method_signature(), &args, THREAD);
140 check_pending_exception("Error while calling startCompiler"); 138 check_pending_exception("Error while calling startCompiler");
141 } 139 }
142 140
141 void VMExits::bootstrap() {
142 JavaThread* THREAD = JavaThread::current();
143 JavaValue result(T_VOID);
144 JavaCallArguments args;
145 args.push_oop(instance());
146 JavaCalls::call_interface(&result, vmExitsKlass(), vmSymbols::bootstrap_name(), vmSymbols::void_method_signature(), &args, THREAD);
147 check_pending_exception("Error while calling boostrap");
148 }
149
143 void VMExits::pollJavaQueue() { 150 void VMExits::pollJavaQueue() {
144 JavaThread* THREAD = JavaThread::current(); 151 JavaThread* THREAD = JavaThread::current();
145 JavaValue result(T_VOID); 152 JavaValue result(T_VOID);
146 JavaCallArguments args; 153 JavaCallArguments args;
147 args.push_oop(instance()); 154 args.push_oop(instance());