< prev index next >

src/share/vm/compiler/compileBroker.cpp

Print this page
rev 9032 : 8134607: Remove per-compiler performance counters
Reviewed-by: duke

*** 451,495 **** void CompileQueue::print_tty() { ttyLocker ttyl; print(tty); } ! CompilerCounters::CompilerCounters(const char* thread_name, int instance, TRAPS) { ! _current_method[0] = '\0'; _compile_type = CompileBroker::no_compile; - - if (UsePerfData) { - ResourceMark rm; - - // create the thread instance name space string - don't create an - // instance subspace if instance is -1 - keeps the adapterThread - // counters from having a ".0" namespace. - const char* thread_i = (instance == -1) ? thread_name : - PerfDataManager::name_space(thread_name, instance); - - - char* name = PerfDataManager::counter_name(thread_i, "method"); - _perf_current_method = - PerfDataManager::create_string_variable(SUN_CI, name, - cmname_buffer_length, - _current_method, CHECK); - - name = PerfDataManager::counter_name(thread_i, "type"); - _perf_compile_type = PerfDataManager::create_variable(SUN_CI, name, - PerfData::U_None, - (jlong)_compile_type, - CHECK); - - name = PerfDataManager::counter_name(thread_i, "time"); - _perf_time = PerfDataManager::create_counter(SUN_CI, name, - PerfData::U_Ticks, CHECK); - - name = PerfDataManager::counter_name(thread_i, "compiles"); - _perf_compiles = PerfDataManager::create_counter(SUN_CI, name, - PerfData::U_Events, CHECK); - } } // ------------------------------------------------------------------ // CompileBroker::compilation_init // --- 451,463 ---- void CompileQueue::print_tty() { ttyLocker ttyl; print(tty); } ! CompilerCounters::CompilerCounters() { _current_method[0] = '\0'; _compile_type = CompileBroker::no_compile; } // ------------------------------------------------------------------ // CompileBroker::compilation_init //
*** 732,750 **** char name_buffer[256]; const bool compiler_thread = true; for (int i = 0; i < c2_compiler_count; i++) { // Create a name for our thread. sprintf(name_buffer, "C2 CompilerThread%d", i); ! CompilerCounters* counters = new CompilerCounters("compilerThread", i, CHECK); // Shark and C2 make_thread(name_buffer, _c2_compile_queue, counters, _compilers[1], compiler_thread, CHECK); } for (int i = c2_compiler_count; i < compiler_count; i++) { // Create a name for our thread. sprintf(name_buffer, "C1 CompilerThread%d", i); ! CompilerCounters* counters = new CompilerCounters("compilerThread", i, CHECK); // C1 make_thread(name_buffer, _c1_compile_queue, counters, _compilers[0], compiler_thread, CHECK); } if (UsePerfData) { --- 700,718 ---- char name_buffer[256]; const bool compiler_thread = true; for (int i = 0; i < c2_compiler_count; i++) { // Create a name for our thread. sprintf(name_buffer, "C2 CompilerThread%d", i); ! CompilerCounters* counters = new CompilerCounters(); // Shark and C2 make_thread(name_buffer, _c2_compile_queue, counters, _compilers[1], compiler_thread, CHECK); } for (int i = c2_compiler_count; i < compiler_count; i++) { // Create a name for our thread. sprintf(name_buffer, "C1 CompilerThread%d", i); ! CompilerCounters* counters = new CompilerCounters(); // C1 make_thread(name_buffer, _c1_compile_queue, counters, _compilers[0], compiler_thread, CHECK); } if (UsePerfData) {
*** 1434,1447 **** // this helps the compiler to finish up the job. if (CompilerThreadHintNoPreempt) { os::hint_no_preempt(); } - // trace per thread time and compile statistics - CompilerCounters* counters = ((CompilerThread*)thread)->counters(); - PerfTraceTimedEvent(counters->time_counter(), counters->compile_counter()); - // Assign the task to the current thread. Mark this compilation // thread as active for the profiler. CompileTaskWrapper ctw(task); nmethodLocker result_handle; // (handle for the nmethod produced by this task) task->set_code_handle(&result_handle); --- 1402,1411 ----
< prev index next >