Profile Image
vishnupriya

What is JVM startup parameter: -XX:-Inline?

What is JVM startup parameter: -XX:-Inline? Have you used this JVM arguement before? What are the pros & cons of using this Java argument? Can you share your perspective/experience in using this JVM argument?

  • jvmargument

  • xx-inline

  • x-inline

  • JVM startup parameter

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky

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:

 

Got something else on mind? Post Your Question

Not the answer you're looking for? Browse other questions tagged
  • jvmargument

  • xx-inline

  • x-inline

  • JVM startup parameter