comparison src/share/vm/runtime/simpleThresholdPolicy.cpp @ 17906:7150b16fda52

8029436: CICompilerCount is not updated when the number of compiler threads is adjusted to the number of CPUs Summary: CICompilerCount is updated in AdvancedThresholdPolicy::initialize, SimpleThresholdPolicy::initialize and NonTieredCompPolicy::initialize. A warning is printed if the usersets both, CICompilerCount and CICompilerCountPerCPU. Reviewed-by: kvn, twisti Contributed-by: Tobias Hartmann <tobias.hartmann@oracle.com>
author anoll
date Mon, 14 Apr 2014 08:24:28 +0200
parents 487d442ef257
children 653e11c86c5a
comparison
equal deleted inserted replaced
17905:4e03f6196358 17906:7150b16fda52
140 int count = CICompilerCount; 140 int count = CICompilerCount;
141 if (CICompilerCountPerCPU) { 141 if (CICompilerCountPerCPU) {
142 count = MAX2(log2_intptr(os::active_processor_count()), 1) * 3 / 2; 142 count = MAX2(log2_intptr(os::active_processor_count()), 1) * 3 / 2;
143 } 143 }
144 set_c1_count(MAX2(count / 3, 1)); 144 set_c1_count(MAX2(count / 3, 1));
145 set_c2_count(MAX2(count - count / 3, 1)); 145 set_c2_count(MAX2(count - c1_count(), 1));
146 FLAG_SET_ERGO(intx, CICompilerCount, c1_count() + c2_count());
146 } 147 }
147 148
148 void SimpleThresholdPolicy::set_carry_if_necessary(InvocationCounter *counter) { 149 void SimpleThresholdPolicy::set_carry_if_necessary(InvocationCounter *counter) {
149 if (!counter->carry() && counter->count() > InvocationCounter::count_limit / 2) { 150 if (!counter->carry() && counter->count() > InvocationCounter::count_limit / 2) {
150 counter->set_carry_flag(); 151 counter->set_carry_flag();