programmatic query of time spent doing GC

Mario Mendez-Lojo marioml at ices.utexas.edu
Wed Jun 17 11:19:13 PDT 2009


First of all, thank you all for your amazing response to previous questions!

I have a question: I want to programmatically measure the time spent by the JVM 
in the *application* I'm running - i.e., I would like to substract any time 
spent in garbage collection. I already maximized the heap in order to avoid GC, 
but there is still some GC activity.

Is there any programmatic way of figuring out what that time is? I can always 
verbose the GC statistics, and do the calculations manually, but is obviously 
more painful.



More information about the hotspot-dev mailing list