hotspot/src/share/vm/runtime/simpleThresholdPolicy.cpp
changeset 36556 7f092a7ce938
parent 35547 0ee84aa8e705
child 37281 c4e7456d6ae1
equal deleted inserted replaced
36555:4f37fd7a5a09 36556:7f092a7ce938
   136 void SimpleThresholdPolicy::initialize() {
   136 void SimpleThresholdPolicy::initialize() {
   137   if (FLAG_IS_DEFAULT(CICompilerCount)) {
   137   if (FLAG_IS_DEFAULT(CICompilerCount)) {
   138     FLAG_SET_DEFAULT(CICompilerCount, 3);
   138     FLAG_SET_DEFAULT(CICompilerCount, 3);
   139   }
   139   }
   140   int count = CICompilerCount;
   140   int count = CICompilerCount;
       
   141 #ifdef _LP64
       
   142   // On 64-bit systems, scale the number of compiler threads with
       
   143   // the number of cores available on the system. Scaling is not
       
   144   // performed on 32-bit systems because it can lead to exhaustion
       
   145   // of the virtual memory address space available to the JVM.
   141   if (CICompilerCountPerCPU) {
   146   if (CICompilerCountPerCPU) {
   142     count = MAX2(log2_intptr(os::active_processor_count()), 1) * 3 / 2;
   147     count = MAX2(log2_intptr(os::active_processor_count()), 1) * 3 / 2;
   143   }
   148   }
       
   149 #endif
   144   set_c1_count(MAX2(count / 3, 1));
   150   set_c1_count(MAX2(count / 3, 1));
   145   set_c2_count(MAX2(count - c1_count(), 1));
   151   set_c2_count(MAX2(count - c1_count(), 1));
   146   FLAG_SET_ERGO(intx, CICompilerCount, c1_count() + c2_count());
   152   FLAG_SET_ERGO(intx, CICompilerCount, c1_count() + c2_count());
   147 }
   153 }
   148 
   154