Profile Image
vishnupriya

What is Java Profiling Support (Obsolete): -Xprof?

What is Java Profiling Support (Obsolete): -Xpro? Have you used this JVM argument before? What are the pros & cons of using this Java argument? Can you share your perspective/experience in using this JVM argument?

  • jvm-argument

  • xprof

  • prof

  • Java Profiling Support

  • obsolete

Please Sign In or to post your comment or answer

Profile Image

Pavel Khodakovsky

Usage:


• -Xprof


This feature was removed in Java 10.

 

Description:


The -Xprof argument enables profiling of CPU data from the JVM. Data are
printed to the standard output of the process after the JVM has completed
running with a section for each thread followed by a global summary, for example:


Flat profile of 0.52 secs (41 total ticks): main
Interpreted + native Method
7.9% 1 + 2 java.lang.ClassLoader.defineClass1
2.6% 0 + 1 java.util.zip.ZipFile.open
2.6% 1 + 0 java.io.ObjectInputStream.readObject
2.6% 1 + 0 java.util.zip.ZipFile.freeEntry
2.6% 0 + 1 sun.misc.Unsafe.defineAnonymousClass
2.6% 0 + 1 sun.nio.fs.UnixNativeDispatcher.rename0
2.6% 0 + 1 sun.nio.fs.UnixCopyFile.transfer
2.6% 0 + 1 sun.misc.Unsafe.getIntVolatile
...
73.7% 18 + 10 Total interpreted (including elided)
Compiled + native Method
2.6% 0 + 1 java.lang.reflect.Field.set
2.6% 0 + 1 Total compiled
Stub + native Method
7.9% 0 + 3 java.lang.System.arraycopy
5.3% 0 + 2 java.lang.Class.isPrimitive
2.6% 0 + 1 java.util.zip.ZipFile.getEntry
2.6% 0 + 1 java.util.zip.ZipFile.read
2.6% 0 + 1 java.lang.Object.clone
21.1% 0 + 8 Total stub
Thread-local ticks:
7.3% 3 Blocked (of total)
2.6% 1 Class loader
Global summary of 0.52 seconds:
100.0% 41 Received ticks
1
124.4% 51 Compilation
2.4% 1 Class loader
This profiling feature is rarely used and containe bugs that were known to
interfere with garbage collection, therefore it was removed in Java 10. When the
-Xprof option is used in Java 10 or above, a warning is printed at startup of
the JVM and no profiling output is produced.
As an alternative, the JVisualVM tool can be used

 

Default Value:


-Xprof is off by default.


Errors:


When -Xprof is used on Java 10 or higher, the following warning is printed:
OpenJDK 64-Bit Server VM warning: Ignoring option -Xprof; support was removed in 10.0
Arguments Related to -Xprof


Related Posts:


• JVisualVM Profiling Tool.


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
  • jvm-argument

  • xprof

  • prof

  • Java Profiling Support

  • obsolete