< prev index next >

src/share/vm/runtime/advancedThresholdPolicy.cpp

Print this page




  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_int(os::active_processor_count());
  51     int loglog_cpu = log2_int(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 - c1_count(), 1));
  57   FLAG_SET_ERGO(intx, CICompilerCount, c1_count() + c2_count());
  58 
  59   // Some inlining tuning
  60 #ifdef X86
  61   if (FLAG_IS_DEFAULT(InlineSmallCode)) {
  62     FLAG_SET_DEFAULT(InlineSmallCode, 2000);
  63   }
  64 #endif
  65 
  66 #ifdef SPARC
  67   if (FLAG_IS_DEFAULT(InlineSmallCode)) {
  68     FLAG_SET_DEFAULT(InlineSmallCode, 2500);
  69   }
  70 #endif
  71 
  72   set_increase_threshold_at_ratio();
  73   set_start_time(os::javaTimeMillis());
  74 }
  75 
  76 // update_rate() is called from select_task() while holding a compile queue lock.
  77 void AdvancedThresholdPolicy::update_rate(jlong t, Method* m) {
  78   // Skip update if counters are absent.
  79   // Can't allocate them since we are holding compile queue lock.
  80   if (m->method_counters() == NULL)  return;




  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_int(os::active_processor_count());
  51     int loglog_cpu = log2_int(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 - c1_count(), 1));
  57   FLAG_SET_ERGO(intx, CICompilerCount, c1_count() + c2_count());
  58 
  59   // Some inlining tuning
  60 #if defined(X86) || defined(AARCH64)
  61   if (FLAG_IS_DEFAULT(InlineSmallCode)) {
  62     FLAG_SET_DEFAULT(InlineSmallCode, 2000);
  63   }
  64 #endif
  65 
  66 #ifdef SPARC
  67   if (FLAG_IS_DEFAULT(InlineSmallCode)) {
  68     FLAG_SET_DEFAULT(InlineSmallCode, 2500);
  69   }
  70 #endif
  71 
  72   set_increase_threshold_at_ratio();
  73   set_start_time(os::javaTimeMillis());
  74 }
  75 
  76 // update_rate() is called from select_task() while holding a compile queue lock.
  77 void AdvancedThresholdPolicy::update_rate(jlong t, Method* m) {
  78   // Skip update if counters are absent.
  79   // Can't allocate them since we are holding compile queue lock.
  80   if (m->method_counters() == NULL)  return;


< prev index next >