RFR: 7164841: Improvements to the GC log file rotation

Yumin Qi yumin.qi at oracle.com
Wed Aug 28 03:26:55 UTC 2013

Hi, Bernd

On 8/27/2013 10:27 AM, Bernd Eckenfels wrote:
> Hello,
> no matter what you decide (for example configurable pattern like J9 is 
> doing it) please add enough header informatiomn to the logfile that it 
> answers common gc diagnostic questions (version, command line 
> settings, ram/swap size) and the start wallclock of the segment (for 
> calculating abolute times without using the datestamp option).
The log file will log what ever the gc logging is currently writing to 
the file. In this fix, there is no changes to such information. The only 
additional information added to the log file is that at rotation moment, 
file name and create time information is logged to head of file for new 
file, like:

2013-08-27 12:04:13 GC log file created test-pid27685-2013-08-27_12-02-15.1
117.334: [GC (Allocation Failure) 117.334: [ParNew: 17305K->2K(19648K), 
0.0040920 secs] 98474K->81171K(182528K), 0.0044070 secs] [Times: 
user=0.01 sys=0.00, real=0.01 secs]
117.342: [GC (Allocation Failure) 117.342: [ParNew: 17305K->2K(19648K), 
0.0038690 secs] 98474K->81171K(182528K), 0.0041920 secs] [Times: 
user=0.01 sys=0.00, real=0.00 secs]

You can see that at the beginning, wall clock of the file create time 
and file name are logged.

For tail:

117.318: [GC (Allocation Failure) 117.318: [ParNew: 17305K->2K(19648K), 
0.0038870 secs] 98474K->81171K(182528K), 0.0042070 secs] [Times: 
user=0.01 sys=0.00, real=0.00 secs]
117.326: [GC (Allocation Failure) 117.326: [ParNew: 17305K->2K(19648K), 
0.0040940 secs] 98474K->81171K(182528K), 0.0044230 secs] [Times: 
user=0.01 sys=0.00, real=0.01 secs]
2013-08-27 12:04:13 GC log file has reached the maximum size. Saved as 

This is previous log file.


> Greetings
> Bernd

More information about the hotspot-gc-dev mailing list