35 else tty->print("%f", mh->rate()); 36 37 tty->print(" k=%.2lf,%.2lf", threshold_scale(CompLevel_full_profile, Tier3LoadFeedback), 38 threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback)); 39 40 } 41 42 void AdvancedThresholdPolicy::initialize() { 43 // Turn on ergonomic compiler count selection 44 if (FLAG_IS_DEFAULT(CICompilerCountPerCPU) && FLAG_IS_DEFAULT(CICompilerCount)) { 45 FLAG_SET_DEFAULT(CICompilerCountPerCPU, true); 46 } 47 int count = CICompilerCount; 48 if (CICompilerCountPerCPU) { 49 // Simple log n seems to grow too slowly for tiered, try something faster: log n * log log n 50 int log_cpu = log2_intptr(os::active_processor_count()); 51 int loglog_cpu = log2_intptr(MAX2(log_cpu, 1)); 52 count = MAX2(log_cpu * loglog_cpu, 1) * 3 / 2; 53 } 54 55 set_c1_count(MAX2(count / 3, 1)); 56 set_c2_count(MAX2(count - count / 3, 1)); 57 58 // Some inlining tuning 59 #ifdef X86 60 if (FLAG_IS_DEFAULT(InlineSmallCode)) { 61 FLAG_SET_DEFAULT(InlineSmallCode, 2000); 62 } 63 #endif 64 65 #ifdef SPARC 66 if (FLAG_IS_DEFAULT(InlineSmallCode)) { 67 FLAG_SET_DEFAULT(InlineSmallCode, 2500); 68 } 69 #endif 70 71 set_increase_threshold_at_ratio(); 72 set_start_time(os::javaTimeMillis()); 73 } 74 75 // update_rate() is called from select_task() while holding a compile queue lock. 76 void AdvancedThresholdPolicy::update_rate(jlong t, Method* m) { | 35 else tty->print("%f", mh->rate()); 36 37 tty->print(" k=%.2lf,%.2lf", threshold_scale(CompLevel_full_profile, Tier3LoadFeedback), 38 threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback)); 39 40 } 41 42 void AdvancedThresholdPolicy::initialize() { 43 // Turn on ergonomic compiler count selection 44 if (FLAG_IS_DEFAULT(CICompilerCountPerCPU) && FLAG_IS_DEFAULT(CICompilerCount)) { 45 FLAG_SET_DEFAULT(CICompilerCountPerCPU, true); 46 } 47 int count = CICompilerCount; 48 if (CICompilerCountPerCPU) { 49 // Simple log n seems to grow too slowly for tiered, try something faster: log n * log log n 50 int log_cpu = log2_intptr(os::active_processor_count()); 51 int loglog_cpu = log2_intptr(MAX2(log_cpu, 1)); 52 count = MAX2(log_cpu * loglog_cpu, 1) * 3 / 2; 53 } 54 55 assert ((c1_count() == 0) && (c2_count() == 0), "Must be initialized to 0"); 56 // Set number of compiler threads only if we also use the compiler 57 if (Arguments::mode() != Arguments::_int) { 58 set_c1_count(MAX2(count / 3, 1)); 59 set_c2_count(MAX2(count - count / 3, 1)); 60 } 61 62 // Some inlining tuning 63 #ifdef X86 64 if (FLAG_IS_DEFAULT(InlineSmallCode)) { 65 FLAG_SET_DEFAULT(InlineSmallCode, 2000); 66 } 67 #endif 68 69 #ifdef SPARC 70 if (FLAG_IS_DEFAULT(InlineSmallCode)) { 71 FLAG_SET_DEFAULT(InlineSmallCode, 2500); 72 } 73 #endif 74 75 set_increase_threshold_at_ratio(); 76 set_start_time(os::javaTimeMillis()); 77 } 78 79 // update_rate() is called from select_task() while holding a compile queue lock. 80 void AdvancedThresholdPolicy::update_rate(jlong t, Method* m) { |