Mercurial > hg > truffle
comparison src/share/vm/runtime/simpleThresholdPolicy.cpp @ 18041:52b4284cb496
Merge with jdk8u20-b26
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 15 Oct 2014 16:02:50 +0200 |
parents | 4ca6dc0799b6 653e11c86c5a |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
17606:45d7b2c7029d | 18041:52b4284cb496 |
---|---|
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(); |
187 nmethod* SimpleThresholdPolicy::event(methodHandle method, methodHandle inlinee, | 188 nmethod* SimpleThresholdPolicy::event(methodHandle method, methodHandle inlinee, |
188 int branch_bci, int bci, CompLevel comp_level, nmethod* nm, JavaThread* thread) { | 189 int branch_bci, int bci, CompLevel comp_level, nmethod* nm, JavaThread* thread) { |
189 if (comp_level == CompLevel_none && | 190 if (comp_level == CompLevel_none && |
190 JvmtiExport::can_post_interpreter_events() && | 191 JvmtiExport::can_post_interpreter_events() && |
191 thread->is_interp_only_mode()) { | 192 thread->is_interp_only_mode()) { |
193 return NULL; | |
194 } | |
195 if (CompileTheWorld || ReplayCompiles) { | |
196 // Don't trigger other compiles in testing mode | |
192 return NULL; | 197 return NULL; |
193 } | 198 } |
194 nmethod *osr_nm = NULL; | 199 nmethod *osr_nm = NULL; |
195 | 200 |
196 handle_counter_overflow(method()); | 201 handle_counter_overflow(method()); |