I'm running a Java program and I need to get how much time each it spent garbage collecting.
I found these 2 JVM flags:
-XX:+PrintGCApplicationConcurrentTime
-XX:+PrintGCApplicationStoppedTime
but I'm not being able to find information about it.
I suppose that PrintGCApplicationStoppedTime
prints for how long the application time was in a STW, however I am not sure about -XX:+PrintGCApplicationConcurrentTime
. Does it print for how long the application was executing concurrently with collection threads?
Thanks in advance.
The names of these flags are not very accurate.
PrintGCApplicationStoppedTime
shows how much time the application was stopped at safepoint. Most often safepoints are caused by stop-the-world phases of garbage collection, however, many other reasons exist.
PrintGCApplicationConcurrentTime
is how much time the application worked without stopping, i.e. the time between two successive safepoints.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With