src/hotspot/share/compiler/compileBroker.cpp
changeset 50217 843fc56f4686
parent 50113 caf115bb98ad
child 50515 1ce463f497ad
equal deleted inserted replaced
50216:f4fd580dd7d1 50217:843fc56f4686
   726 void CompileBroker::compilation_init_phase2() {
   726 void CompileBroker::compilation_init_phase2() {
   727   _initialized = true;
   727   _initialized = true;
   728 }
   728 }
   729 
   729 
   730 Handle CompileBroker::create_thread_oop(const char* name, TRAPS) {
   730 Handle CompileBroker::create_thread_oop(const char* name, TRAPS) {
   731   Klass* k = SystemDictionary::find(vmSymbols::java_lang_Thread(), Handle(), Handle(), CHECK_NH);
       
   732   assert(k != NULL, "must be initialized");
       
   733   InstanceKlass* klass = InstanceKlass::cast(k);
       
   734   instanceHandle thread_handle = klass->allocate_instance_handle(CHECK_NH);
       
   735   Handle string = java_lang_String::create_from_str(name, CHECK_NH);
   731   Handle string = java_lang_String::create_from_str(name, CHECK_NH);
   736 
       
   737   // Initialize thread_oop to put it into the system threadGroup
       
   738   Handle thread_group(THREAD, Universe::system_thread_group());
   732   Handle thread_group(THREAD, Universe::system_thread_group());
   739   JavaValue result(T_VOID);
   733   return JavaCalls::construct_new_instance(
   740   JavaCalls::call_special(&result, thread_handle,
   734                        SystemDictionary::Thread_klass(),
   741                        klass,
       
   742                        vmSymbols::object_initializer_name(),
       
   743                        vmSymbols::threadgroup_string_void_signature(),
   735                        vmSymbols::threadgroup_string_void_signature(),
   744                        thread_group,
   736                        thread_group,
   745                        string,
   737                        string,
   746                        CHECK_NH);
   738                        CHECK_NH);
   747 
       
   748   return thread_handle;
       
   749 }
   739 }
   750 
   740 
   751 
   741 
   752 JavaThread* CompileBroker::make_thread(jobject thread_handle, CompileQueue* queue,
   742 JavaThread* CompileBroker::make_thread(jobject thread_handle, CompileQueue* queue,
   753                                        AbstractCompiler* comp, bool compiler_thread, TRAPS) {
   743                                        AbstractCompiler* comp, bool compiler_thread, TRAPS) {