luke warm methods?

Tom Rodriguez tom.rodriguez at oracle.com
Thu Apr 29 16:49:45 PDT 2010


On Apr 29, 2010, at 2:02 AM, Ben Evans wrote:

> 
> hotspot-dev-bounces at openjdk.java.net wrote on 22/04/2010 00:42:28:
> 
> > We decay counters periodically since over time counters should only 
> > go up so maybe that's the problem.  If you run with -XX:-
> > UseCounterDecay it will turn it off but all the other flags that 
> > control it aren't available in product mode. This is certainly one 
> > of the pathologies of an invocation counter based system with 
> > relatively high thresholds.  
> 
> Just so I'm clear, this doesn't affect the compiled status of methods, right? 
> 
> What's being discussed here is that if an initial burst of activity results in a method being called say 4096 times (vs a threshold of 10000), then after 1 minute, then that method has had its invocation counter reduced to 1024. 

That's right, it's only the invocation counters that get lowered.  All compiled code stays compiled.  The decay does nothing more than decay the value.  Nothing is directly triggered by this lowering of the value.

> 
> So the usual scenario whereby HotSpot reaches a steady state in terms of compilation activity can be disrupted by a sudden flurry of activity on rarely-used methods (which will be effectively cold due to the decay process), which pushes the invocation counts of these methods above compilation threshold. If these methods then go quiet again, then HS will *not* deoptimize and drop these methods back to interpreted mode, even if their invocation counters subsequently decay below threshold. Correct? 

Correct.  Since counters are only updated by interpreted execution the state of the counter doesn't matter once there's compiled code.

tom

> 
> Thanks, 
> 
> Ben 
> -- 
> Ben Evans
> GFFX Auto Trading
> Deutsche Bank, London
> Office: +44 (0)20 7541 3953 
> 
> ---
> 
> This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
> 
> Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.



More information about the hotspot-dev mailing list