UseFastEmptyMethods/UseFastAccessorMethods considered harmful

Gary Benson gbenson at
Mon Apr 4 01:23:21 PDT 2011

Tom Rodriguez wrote:
> On Apr 1, 2011, at 2:39 AM, Gary Benson wrote:
> > I just spotted that UseFastEmptyMethods and UseFastAccessorMethods
> > are now off by default.  Zero and Shark both benefit hugely from
> > having these on, especially for accessors.  Would it be possible
> > to make it platform-specific somehow?
> I had considered turning them on in interpreter only mode but that
> wouldn't help Shark.  Maybe I should restore the default and just
> turn them off in Arguments::set_mode_flags for COMPILER1 ||
> COMPILER2.  Otherwise we'd need to made them product_pd which is
> kind of a pain.  I'll send out an updated review.

Thanks Tom.  FWIW the deal with Shark and inlining is that in Shark
will attempt to inline any method below a certain size, regardless of
hotness, and accessors easily fally below that threshold.  It's not a
full inliner as such, but any inlining is useful for Shark as method
calls have a lot of overhead.  Also, the code generation phase (ie in
LLVM) takes much longer than the IR generation phase (it's like 90%+
of each compile) so Shark can afford to do some fairly involved
analysis for relatively little penalty.



More information about the hotspot-compiler-dev mailing list