CompileThreshold & BackEdgeThreshold question(s)

Kirk Pepperdine kirk at kodewerk.com
Fri Aug 3 11:38:35 PDT 2012


On 2012-08-03, at 8:34 PM, Igor Veresov <iggy.veresov at gmail.com> wrote:

> Each method has two counters in a methodOop. One that counts invocations (method entries), the other one counts the number of backward branches taken within this method (loop iterations).

what happens if the method contains two (or more) loops? They both use the same counter? I guess for an OSR it doesn't matter which loop is holding things up.

> For non-tiered policy a method is compiled if the inv_count > CompileThreshold, an OSR will happen if inv_count + bb_count > BackEdgeThreshold on a backward branch. Profiling will start at 33% of these values (InterpreterProfilePercentage).
> 
> Also keep in mind that for non-tiered policy all these counters are decayed at each safepoint. So there's an invocation frequency limit below which a method will never get compiled.
> 
> For tiered it's a bit more complicated. ;)

oh then don't stop there.... :-)

Kirk



More information about the hotspot-compiler-dev mailing list