InlineSmallCode is too low by default
iggy.veresov at gmail.com
Mon Apr 23 20:48:00 PDT 2012
That's precisely the problem. Currently inlining happens during parsing and when you're trying to decide whether to inline or not you haven't seen the callsites down the line yet.
On Apr 23, 2012, at 5:20 PM, Ulf Zibis wrote:
> I think, inline heuristic should not only measure the code size, but additionally count, how many callsites would be affected.
> E.g. 2 times inlining 200 bytes should be preferred over 10 times inlining 100 bytes.
> Am 23.04.2012 23:29, schrieb Coleen Phillimore:
>> I'm resending this to the compiler development alias.
>> On 4/23/2012 12:50 PM, Rémi Forax wrote:
>>> InlineSmallCode is set to 1000 on x86 by default if tiered mode
>>> is not enabled and 2000 if tiered mode is enabled.
>>> I wonder if there is a reason for that inconsistency.
>>> InlineSmallCode is the threshold used by the inlining heuristic
>>> to know if a method is too big or not to be inlined multiple times,
>>> on my dynamic language runtime, setting it to 2000 is very important
>>> because otherwise most of the high order functions (function that
>>> takes a function as argument) are not compiled with their callsite
>>> so escape analysis can't work.
>>> I suppose it's also the case for users that use libraries like
>>> Google guava or Goldman Sachs's gs-collection that exhibit the same patterns.
>>> that why I propose to bump InlineSmallCode to 2000 for x86 and
>>> 2500 for sparc by default (the defaults in tiered mode).
More information about the hotspot-compiler-dev