Request for review: 6941923: RFE: Handling large log files produced by long running Java Applications

yumin.qi at oracle.com yumin.qi at oracle.com
Tue Apr 12 11:41:43 PDT 2011


  http://cr.openjdk.java.net/~minqi/6941923/webrev.00/ 
<http://cr.openjdk.java.net/%7Eminqi/6941923/webrev.00/>

Summary:

This is a RFE request for having a GC log rotation to prevent Java 
application from over flooding disk with GC output running for long time.
In the implementation, supply three JVM options
1) -XX:+UseGCLogFileRotation   must be used with -Xloggc:file
2) -XX:MaxGCLogFileNumbers=  set limit of rotation file numbers, default 
to 1, maximum set to 1024.
3) -XX:GCLogFileSize=  can be configured by user how big the file size 
should be. Default to 10M. Minimum set to 512K if given from option is 
less than 512K.

If MaxGCLogFileNumbers=1, rotating output in same file, i.e write from 
beginning of the file when reach cap of the file; with 
MaxGCLogFileNumbers > 1 rotating files sequentially after reach cap in 
file, file.1, file.2, ..., file.<MaxGCLogFileNumbers-1> then back to 
file, file.1, ...
Check if rotation needed at safepoint ending.

Tested with multiple GC choices.

Thanks
Yumin





More information about the hotspot-runtime-dev mailing list