Odd inlining failure

Vitaly Davidovich vitalyd at gmail.com
Mon Sep 26 17:23:01 UTC 2016


Hi guys,

I'm trying to understand some "odd" inlining output from PrintInlining -
hoping someone can explain/confirm.

I have the following call graph:
a()
------> b()
--------------> c()

So a() calls b() (and some other methods that aren't relevant here).  b()
calls c() and d() internally.  a() gets hot, and is queued up for
compilation (C2, tiered is disabled).

b() is large (> MaxInlineSize) but less than FreqInlineSize - it gets
inlined with "inline (hot)" in the log.  c() is similar -- it's large, but
< FreqInlineSize.  However, the inlining output says "too big", and c()
isn't inlined.  Now, c() is *always* called when b() is called - it's a
helper method (ironically, contains code moved out of b() to make b()
smaller).  b() is also the only caller of c().

So, if b() is "hot", why is c() not? Is it because compilation, and
therefore inlining, started top-down here? CompileThreshold is the default
here - 10000.  Is it the case that b() reaches 10k, but c() is at 9999
still and is therefore not inlined?

Let me know if something's not clear in the above description.

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160926/c79ae72b/attachment-0001.html>


More information about the hotspot-compiler-dev mailing list