Ways to get gc stats programatically or logged?

Christine Flood chf at redhat.com
Tue Sep 23 22:17:30 UTC 2014


Hey Derek, how are you?


If you are willing to use -XX:+UseSerialGC, 
-XX:+TraceGen0Time and -XX:+TraceGen1Time are available in product builds and 
give you some of what you are looking for.

[Accumulated GC generation 0 time 0.0965850 secs, 3 GC's, avg GC time 0.0321950]
[Accumulated GC generation 1 time 2.0486370 secs, 12 GC's, avg GC time 0.1707197]



Christine


----- Original Message -----
> From: "Derek White" <derek.white at oracle.com>
> To: hotspot-gc-dev at openjdk.java.net
> Sent: Tuesday, September 23, 2014 5:22:26 PM
> Subject: Ways to get gc stats programatically or logged?
> 
> Hi All,
> 
> I'm doing a writeup on a soft real-time system (robots for the FIRST
> Robotics Competition) and I'm looking for ways to get gc stats like max
> pause time and total gc time. I can sum up verbosegc numbers but I'd
> like to make this easy for some customers to run.
> 
> I'd like to get these numbers in a production build, and both logged and
> display in some slick tool like visualvm.
> 
> Any ideas?
> 
> Thanks,
>   - Derek
> 
> 



More information about the hotspot-gc-dev mailing list