< prev index next >

src/share/vm/compiler/compileBroker.cpp

Print this page




 666              PerfDataManager::create_variable(SUN_CI, "lastFailedType",
 667                                               PerfData::U_None,
 668                                               (jlong)CompileBroker::no_compile,
 669                                               CHECK);
 670 
 671     _perf_last_invalidated_type =
 672          PerfDataManager::create_variable(SUN_CI, "lastInvalidatedType",
 673                                           PerfData::U_None,
 674                                           (jlong)CompileBroker::no_compile,
 675                                           CHECK);
 676   }
 677 
 678   _initialized = true;
 679 }
 680 
 681 
 682 JavaThread* CompileBroker::make_thread(const char* name, CompileQueue* queue, CompilerCounters* counters,
 683                                        AbstractCompiler* comp, bool compiler_thread, TRAPS) {
 684   JavaThread* thread = NULL;
 685   Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_Thread(), true, CHECK_0);
 686   instanceKlassHandle klass (THREAD, k);
 687   instanceHandle thread_oop = klass->allocate_instance_handle(CHECK_0);
 688   Handle string = java_lang_String::create_from_str(name, CHECK_0);
 689 
 690   // Initialize thread_oop to put it into the system threadGroup
 691   Handle thread_group (THREAD,  Universe::system_thread_group());
 692   JavaValue result(T_VOID);
 693   JavaCalls::call_special(&result, thread_oop,
 694                        klass,
 695                        vmSymbols::object_initializer_name(),
 696                        vmSymbols::threadgroup_string_void_signature(),
 697                        thread_group,
 698                        string,
 699                        CHECK_0);
 700 
 701   {
 702     MutexLocker mu(Threads_lock, THREAD);
 703     if (compiler_thread) {
 704       thread = new CompilerThread(queue, counters);
 705     } else {
 706       thread = new CodeCacheSweeperThread();




 666              PerfDataManager::create_variable(SUN_CI, "lastFailedType",
 667                                               PerfData::U_None,
 668                                               (jlong)CompileBroker::no_compile,
 669                                               CHECK);
 670 
 671     _perf_last_invalidated_type =
 672          PerfDataManager::create_variable(SUN_CI, "lastInvalidatedType",
 673                                           PerfData::U_None,
 674                                           (jlong)CompileBroker::no_compile,
 675                                           CHECK);
 676   }
 677 
 678   _initialized = true;
 679 }
 680 
 681 
 682 JavaThread* CompileBroker::make_thread(const char* name, CompileQueue* queue, CompilerCounters* counters,
 683                                        AbstractCompiler* comp, bool compiler_thread, TRAPS) {
 684   JavaThread* thread = NULL;
 685   Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_Thread(), true, CHECK_0);
 686   InstanceKlass* klass = InstanceKlass::cast(k);
 687   instanceHandle thread_oop = klass->allocate_instance_handle(CHECK_0);
 688   Handle string = java_lang_String::create_from_str(name, CHECK_0);
 689 
 690   // Initialize thread_oop to put it into the system threadGroup
 691   Handle thread_group (THREAD,  Universe::system_thread_group());
 692   JavaValue result(T_VOID);
 693   JavaCalls::call_special(&result, thread_oop,
 694                        klass,
 695                        vmSymbols::object_initializer_name(),
 696                        vmSymbols::threadgroup_string_void_signature(),
 697                        thread_group,
 698                        string,
 699                        CHECK_0);
 700 
 701   {
 702     MutexLocker mu(Threads_lock, THREAD);
 703     if (compiler_thread) {
 704       thread = new CompilerThread(queue, counters);
 705     } else {
 706       thread = new CodeCacheSweeperThread();


< prev index next >