United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6385687 UseFastEmptyMethods/UseFastAccessorMethods considered harmful
JDK-6385687 : UseFastEmptyMethods/UseFastAccessorMethods considered harmful

Details
Type:
Bug
Submit Date:
2006-02-14
Status:
Closed
Updated Date:
2011-04-24
Project Name:
JDK
Resolved Date:
2011-04-24
Component:
hotspot
OS:
solaris_9,generic
Sub-Component:
compiler
CPU:
sparc,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
hs21 (b09)

Related Reports
Backport:
Relates:

Sub Tasks

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
EVALUATION

This should be off by default if !CORE
                                     
2006-02-14
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.
                                     
2006-04-20
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/c2323e2ea62b
                                     
2011-04-01
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.
                                     
2011-04-06



Hardware and Software, Engineered to Work Together