RFR: 7164841: Improvements to the GC log file rotation
yumin.qi at oracle.com
Wed Aug 21 22:43:47 UTC 2013
This is second version after feedback from first round.
The changes are:
1) file name will be based on gc log file name (-Xloggc:filename),
pid (process id) and time when the first rotation file created:
2) If rotate in same file, file name is as in 1), if rotate in
multiple files, .<i> will append to above file name.
3) every time file rotated, file name and time when file created will
be logged to head/tail, this is same as first version.
4) current file has name
This is similar to first version.
By adapting such name format we will never loss logs in case
apps stops and restart, the log files will not be overwritten since time
stamp in file names.
5) If open file failed, turn off gc log rotation.
If due to some reason, file operation failed (such as
permission changed etc), with log file opened, logging still works, but at
saving and renaming, the file operation will fail, this will
lead not all files saved.
Tested with jtreg, JPRT.
On 8/15/2013 8:35 AM, Yumin Qi wrote:
> Can I have your review for this small changes?
> This is for a enhancement to add head/tail message to the logging
> files to assist reading GC output.
> 1. modified prompt message if invalid arguments used for log rotating;
> 2. add time and file name message to log file head/tail.
> 3. for easily identify which log file is current, use file name
> like <filename>.n.current, after it reaches maximum size, rename it to
> On Windows, there is no F_OK (existing test) definition, F_OK
> is defined as "0" and for _access of VC++, it just describes:
> Checks file for
> Existence only
> Read and write
> The definition are consistent with unistd.h.
> Test: JPRT and jtreg.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-gc-dev