Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JVM PrintGCApplicationConcurrentTime and PrintGCApplicationStoppedTime flags

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.

like image 936
franco Avatar asked Mar 07 '16 19:03

franco


1 Answers

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.

like image 194
apangin Avatar answered Sep 28 '22 09:09

apangin