src/share/vm/runtime/simpleThresholdPolicy.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8150839 Sdiff src/share/vm/runtime

src/share/vm/runtime/simpleThresholdPolicy.cpp

Print this page




 121       tty->print("c2");
 122       need_comma = true;
 123     }
 124     if (!mh->is_not_osr_compilable(CompLevel_full_optimization)) {
 125       if (need_comma) tty->print(",");
 126       tty->print("c2-osr");
 127     }
 128     tty->print(" status=");
 129     if (mh->queued_for_compilation()) {
 130       tty->print("in-queue");
 131     } else tty->print("idle");
 132   }
 133   tty->print_cr("]");
 134 }
 135 
 136 void SimpleThresholdPolicy::initialize() {
 137   if (FLAG_IS_DEFAULT(CICompilerCount)) {
 138     FLAG_SET_DEFAULT(CICompilerCount, 3);
 139   }
 140   int count = CICompilerCount;





 141   if (CICompilerCountPerCPU) {
 142     count = MAX2(log2_intptr(os::active_processor_count()), 1) * 3 / 2;
 143   }

 144   set_c1_count(MAX2(count / 3, 1));
 145   set_c2_count(MAX2(count - c1_count(), 1));
 146   FLAG_SET_ERGO(intx, CICompilerCount, c1_count() + c2_count());
 147 }
 148 
 149 void SimpleThresholdPolicy::set_carry_if_necessary(InvocationCounter *counter) {
 150   if (!counter->carry() && counter->count() > InvocationCounter::count_limit / 2) {
 151     counter->set_carry_flag();
 152   }
 153 }
 154 
 155 // Set carry flags on the counters if necessary
 156 void SimpleThresholdPolicy::handle_counter_overflow(Method* method) {
 157   MethodCounters *mcs = method->method_counters();
 158   if (mcs != NULL) {
 159     set_carry_if_necessary(mcs->invocation_counter());
 160     set_carry_if_necessary(mcs->backedge_counter());
 161   }
 162   MethodData* mdo = method->method_data();
 163   if (mdo != NULL) {




 121       tty->print("c2");
 122       need_comma = true;
 123     }
 124     if (!mh->is_not_osr_compilable(CompLevel_full_optimization)) {
 125       if (need_comma) tty->print(",");
 126       tty->print("c2-osr");
 127     }
 128     tty->print(" status=");
 129     if (mh->queued_for_compilation()) {
 130       tty->print("in-queue");
 131     } else tty->print("idle");
 132   }
 133   tty->print_cr("]");
 134 }
 135 
 136 void SimpleThresholdPolicy::initialize() {
 137   if (FLAG_IS_DEFAULT(CICompilerCount)) {
 138     FLAG_SET_DEFAULT(CICompilerCount, 3);
 139   }
 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.
 146   if (CICompilerCountPerCPU) {
 147     count = MAX2(log2_intptr(os::active_processor_count()), 1) * 3 / 2;
 148   }
 149 #endif
 150   set_c1_count(MAX2(count / 3, 1));
 151   set_c2_count(MAX2(count - c1_count(), 1));
 152   FLAG_SET_ERGO(intx, CICompilerCount, c1_count() + c2_count());
 153 }
 154 
 155 void SimpleThresholdPolicy::set_carry_if_necessary(InvocationCounter *counter) {
 156   if (!counter->carry() && counter->count() > InvocationCounter::count_limit / 2) {
 157     counter->set_carry_flag();
 158   }
 159 }
 160 
 161 // Set carry flags on the counters if necessary
 162 void SimpleThresholdPolicy::handle_counter_overflow(Method* method) {
 163   MethodCounters *mcs = method->method_counters();
 164   if (mcs != NULL) {
 165     set_carry_if_necessary(mcs->invocation_counter());
 166     set_carry_if_necessary(mcs->backedge_counter());
 167   }
 168   MethodData* mdo = method->method_data();
 169   if (mdo != NULL) {


src/share/vm/runtime/simpleThresholdPolicy.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File