Question

I am trying to use the '-XX:-CITime' flag (documentation) for hotspot JVM, but I have some questions:

  1. If I want to enable printing compilation time, then do I type '-XX:-CITime' (with a minus) or '-XX:+CITime' (with a plus)?

  2. Where does it output the compilation time information?

  3. What does is the output supposed to look like?

Was it helpful?

Solution

  1. Use -XX:+CITime. The -XX:-CITime in documentation means that this flag is disabled by default. Try using it with -server -XX:+PrintCompilation flags
  2. the standard output (System.out)
  3. sample output:
Accumulated compiler times (for compiled methods only)
------------------------------------------------
Total compilation time   :  0.179 s
Standard compilation   :  0.128 s, Average : 0.004
On stack replacement   :  0.047 s, Average : 0.024

Check this article about JIT diagnostics.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top