review for 6385687: UseFastEmptyMethods/UseFastAccessorMethods considered harmful

Tom Rodriguez tom.rodriguez at oracle.com
Mon Apr 4 10:24:27 PDT 2011


>> 6385687: UseFastEmptyMethods/UseFastAccessorMethods considered harmful
>> Reviewed-by:
>> 
>> While running various benchmarks, it was noticed that the use of
>> UseFastEmptyMethods/UseFastAccessorMethods can cause us to skip
>> compiling these methods because the fast versions don't have
>> invocation counters.  This can create severe performance anomalies if
>> the empty or accessor methods don't get inlined since we'll always
>> transition to the interpreter to execute this trivial code.  This
>> commonly occurs at call sites that are truly polymorphic.  We could
>> conceivably add invocation counter updates to these methods but that
>> simply makes them less fast and requires more changes.  So it's more
>> straightforward to simply disable them by default.  We could turn them
>> on for -Xint mode or we could delete the fast accessor machinery
>> completely.  It really only helps with raw interpreter performance.
>> Tested with jbb and grindermark.
> 
> 
> 
> If these options really only help raw interpreter performance and they 
> will soon be disabled by default, is there any reason NOT to disable them
> now
> for performance-oriented (i.e. -server C2) application code running
> under JDK6? 

It's really just a performance anomaly that we're trying to avoid.  If you are hitting this problem then by all means use the flag but don't bother if you aren't.  My general recommendation is not to be too flag happy, even though it's sometimes required for tuning.  Use the flags you need and no more.

tom

> 
> 
> Thank you,
> 
> David
> 
> 



More information about the hotspot-compiler-dev mailing list