RFR(XS): 8160548: Inconsistent inlining behavior with CompileOnly
nils.eliasson at oracle.com
Fri Nov 10 12:57:42 UTC 2017
This patch fixes a problem with inconsistent inlining behavior when
using CompileCommand compileonly flag.
InlineTree::check_can_parse(ciMethod* callee) checks the
callee->can_be_compiled(), which is a wrapper of ciMethod
_is_c1_compilable/_is_c2_compilable boolean fields. Those fields are set
1) by Compilecommands that prohibit compilation (compileonly and
exclude) at first compilation, or 2) by a compiler when a method is
Because of this, a method may be inlinable before it is has been
compiled itself, but not after. This can cause unexpected problems in
test that rely on compilecommands for inlining and compilation decisions.
But... there are two sides too this:
1) It is incorrect since a method may still be inlined even though it
shouldn't be compiled.
2) It is correct, because we don't want to inline methods that failed an
In this patch I have settled with solving problem description (1) while
noting that it may cause some extra compilations that bailout because of
(2), but will still function correctly.
More information about the hotspot-compiler-dev