Usage:
This option disables method inlining in the JVM.
Since:
Starting from JDK 6.
Examples:
This will instruct JVM to disable inlining:
-XX:-Inline
Description:
inlining is a way to optimize compiled source code at runtime by replacing the invocations of the most often executed methods with its bodies.
Although there's compilation involved, it's not performed by the traditional javac compiler, but by the JVM itself. To be more precise, it's the responsibility of the Just-In-Time (JIT) compiler, which is a part of the JVM; javac only produces a bytecode and lets JIT do the magic and optimize the source code.
One of the most important consequences of this approach is that if we compile the code using old Java, the same .class file will be faster on newer JVMs. This way we don’t need to recompile the source code, but only update Java.
The option “Inline” allows the optimization of the Java compiler that essentially replaces a method call by its content.
Default Value:
This option is enabled by default to increase performance.
Arguments related:
InlineSmallCode, FreqInlineSize and MaxInlineSize
Related Posts:
Edit your Comment