I am using -XX:+PrintGCApplicationStoppedTime
and -XX:+PrintGCApplicationConcurrentTime
options to turn on gc logging.
But found that only
Unfortunately PrintGCApplicationStoppedTime
is misleading name for this JVM option.
In fact it prints the time spent inside safepoints. Safepoint pauses occur not only due to Garbage Collection, but for many other reasons:
Safepoints may happen periodically even without a requested VM operation in order to deflate idle monitors, perform certain JIT cleanup and so on.
See -XX:GuaranteedSafepointInterval
VM option (1000 milliseconds by default).
Use -XX:+PrintSafepointStatistics -XX:PrintSafepointStatisticsCount=1
to dump more information about safepoints.