Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meaning of "callee is too large" in jvm +LogCompilation output

So in the output of +LogCompilation there are messages printed

callee is too large

and

too big

associated with specific methods (and the decision by the compiler not to inline).

But isn't the "callee" the method itself? What else could it mean? And if so, what's the difference between "callee too large" and "too big" - wouldn't they mean the same thing (maybe it's just a legacy log message, 2 engineers using different language for the same thing?)

Or is it possible that "callee" really means "caller"?
Either reason would be legitimate for not inlining. I'm a bit embarrassed that I don't understand this.

like image 875
igaz Avatar asked Oct 01 '17 01:10

igaz


1 Answers

HotSpot JVM has two JIT compilers: C1 and C2. They work together in Tiered mode (the default). The inlining strategy is not quite trivial, but the most simple factor is the size of the callee method in bytecodes.

  • "callee is too large" message is printed by C1 when the size in bytecodes of the method being inlined is larger than MaxInlineSize (35) multiplied by NestedInliningSizeRatio (90%) on each next level of inlining.
  • "too big" and "hot method too big" messages are printed by C2 when the size of the method being inlined is larger than MaxInlineSize (35) or FreqInlineSize (325) respectively.

So, both messages mean approximately the same, but on different tiers of compilation.

like image 180
apangin Avatar answered Sep 28 '22 22:09

apangin