Does C2 disable incremental inlining for methods without @ForceInline?

Liu, Xin xxinliu at amazon.com
Wed Jan 22 07:47:49 UTC 2020


Hi, Roland, 

Thank you to fill me the background.  I read your title of 8005071 again and it is for JSR 292. 
I ran some benchmarks in dacapo with my patch and indeed got nothing. 

Thanks, 
--lx

On 1/21/20, 12:46 AM, "Roland Westrelin" <rwestrel at redhat.com> wrote:

    
    Hi lx,
    
    > If I understand correctly, C2 has actually disabled incremental
    > inlining for almost all methods without @ForceInline.  Is it
    > intentional?
    
    Incremental inlining was implemented to help with method
    handle/invokedynamic and dynamic languages performance (nashorn at the
    time). The problem there is that inlining through a method handle invoke
    causes the inlining budget to be exhausted quickly both because the
    graph grows fast and the inlining budget estimate C2 uses (number of
    nodes in the graph estimated during parsing as number of nodes added to
    the graph) is especially inaccurate for method invoke handle because the
    graph at the call optimizes well. So the idea is that once the inlining
    budget is exhausted, we run a pass of IGVN to clean the graph, count the
    number of actual live nodes to have an accurate estimate of the graph
    size and resume inlining with incremental inlining if the inlining
    budget allows it.
    
    There was no attempt at using incremental inlining for "regular" java
    programs eventhough with lambdas, java code relies on invokedynamic and
    so should trigger incremental inlining.
    
    Roland.
    
    



More information about the hotspot-compiler-dev mailing list