CompileThreshold & BackEdgeThreshold question(s)

Igor Veresov iggy.veresov at gmail.com
Fri Aug 3 11:34:43 PDT 2012


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).
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. ;)

igor 

On Aug 3, 2012, at 10:28 AM, Charlie Hunt wrote:

> Could someone offer a "10,000 ft" explanation of CompileThreshold and BackEdgeThreshold, how they relate to each other, (if at all), and how they differ?
> 
> For the Server compiler, of course. ;-)
> 
> thanks,
> 
> charlie



More information about the hotspot-compiler-dev mailing list