Profile Image
vishnupriya

What is Java application monitoring: -XX:PreserveFramePointer?

What is Java application monitoring: -XX:PreserveFramePointer? 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-preserveframepointer

  • x-preserveframepointer

  • Java application monitoring

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky

Usage:                                                    

 

To enable support for mixed-mode profilers use:

 

-XX:PreserveFramePointer

 

Description:

 

Since JDK 8. Previously, Java developers had to use system profilers such as perf command in Linux, together with JVM profilers such as hprof, to get the full picture of their application performance. System profilers only trace system code paths, whereas JVM profilers trace only the Java code paths. The reason profilers could not generate “mixed-mode” profiles (i.e., profile information from both system code path and Java code paths)  was a result  of how JVM Just In Time (JIT) compilers were implemented. To support mixed-mode profilers, the JVM has added support for the “-XX:+PreserveFramePointer” option. It allows generating flames graphs in mixed-mode (default mode for JVM). Flame graphs are a visualization of hierarchical data, created to visualize stack traces of profiled software so that the most frequent code-paths to be identified quickly and accurately. We can create them for CPU, memory, off-CPU etc. When this option is provided, the JVM will abide by the frame pointer intended semantics and not use it as a general purpose register. Because this option disables a compiler optimization, there could be a small performance hit when this option is turned on.  However, since this option is disabled by default, there is no performance impact for the default configuration of the JVM.

 

Default Value:

 

By default, it is set to false.

 

Errors:

 

None

 

Arguments related:

 

TODO link Xint

 

Related Posts:

NOTE:

 

If you have additional comments, interesting experiences or even point of disagreement with this JVM argument description, please leave a comment. Your insights will help the entire 10+ million java developer community to develop one standard source of documentation for all the JVM arguments.

Got something else on mind? Post Your Question

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

  • xx-preserveframepointer

  • x-preserveframepointer

  • Java application monitoring