JDK-6385687 : UseFastEmptyMethods/UseFastAccessorMethods considered harmful
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,solaris_9
  • CPU: generic,sparc
  • Submitted: 2006-02-14
  • Updated: 2011-04-24
  • Resolved: 2011-04-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 Other
7Fixed hs21Fixed
Related Reports
Relates :  
Description
While benchmarking grindermark is 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.

Comments
SUGGESTED FIX An alternative fix is to make special purpose i2c2i adapters for accessors that call the normal interpreted entry instead of fast accessor entry when dispatching the c2i path. This would cause any non-inlined paths to the accessors to increment the invocation counter normally so we'd only compile the accessors we really need to instead of compiling all the hot ones. I think all it would take is a special set of adapters for each return type including void.
06-04-2011

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/c2323e2ea62b
01-04-2011

SUGGESTED FIX I suppose these tiny methods should be compiled eagerly. Maybe the right hook is to queue a compile whenever compiled code calls one.
20-04-2006

EVALUATION This should be off by default if !CORE
14-02-2006