<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi, all<br>
<br>
This is second version after feedback from first round.<br>
The changes are:<br>
<br>
1) file name will be based on gc log file name (-Xloggc:filename),
pid (process id) and time when the first rotation file created:<br>
<filename>-pid<pid>-YYYY-MM-DD_HH-MM-SS<br>
2) If rotate in same file, file name is as in 1), if rotate in
multiple files, .<i> will append to above file name.<br>
3) every time file rotated, file name and time when file created
will be logged to head/tail, this is same as first version.<br>
4) current file has name
<filename>-pid<pid>-YYYY-MM-DD_HH-MM-SS.<i>.current<br>
This is similar to first version.<br>
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.<br>
5) If open file failed, turn off gc log rotation. <br>
If due to some reason, file operation failed (such as
permission changed etc), with log file opened, logging still works,
but at <br>
saving and renaming, the file operation will fail, this will
lead not all files saved.<br>
<br>
<a class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/%7Eminqi/7164841/webrev01">http://cr.openjdk.java.net/~minqi/7164841/webrev01</a><br>
<br>
Tested with jtreg, JPRT.<br>
<br>
Thanks<br>
Yumin<br>
<br>
<div class="moz-cite-prefix">On 8/15/2013 8:35 AM, Yumin Qi wrote:<br>
</div>
<blockquote cite="mid:520CF52B.6050000@oracle.com" type="cite">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
Hi, <br>
<br>
Can I have your review for this small changes?<br>
<a moz-do-not-send="true"
href="http://cr.openjdk.java.net/%7Eminqi/7164841/webrev00/">http://cr.openjdk.java.net/~minqi/7164841/webrev00/</a><br>
<br>
This is for a enhancement to add head/tail message to the
logging files to assist reading GC output.<br>
1. modified prompt message if invalid arguments used for log
rotating;<br>
2. add time and file name message to log file head/tail.<br>
3. for easily identify which log file is current, use file name
like <filename>.n.current, after it reaches maximum size,
rename it to <filename>.n<br>
On Windows, there is no F_OK (existing test) definition,
F_OK is defined as "0" and for _access of VC++, it just describes:<br>
<br>
<table style="border-collapse: collapse; padding: 0px; width:
1306px; border: 1px solid rgb(187, 187, 187); color: rgb(0, 0,
0); font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial,
Helvetica, sans-serif; font-size: 13px; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing:
normal; line-height: 17px; orphans: auto; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width:
0px;">
<tbody>
<tr>
<th style="border: 1px solid rgb(187, 187, 187); margin:
10px; padding: 10px 8px; background-color: rgb(237, 237,
237); color: rgb(112, 112, 112); text-align: left;">
<p style="color: rgb(42, 42, 42); margin-top: 0px;
margin-bottom: 0px; padding-bottom: 0px; line-height:
18px;"><span class="parameter" style="font-style:
italic;">mode</span><span
class="Apple-converted-space"> </span>value</p>
</th>
<th style="border: 1px solid rgb(187, 187, 187); margin:
10px; padding: 10px 8px; background-color: rgb(237, 237,
237); color: rgb(112, 112, 112); text-align: left;">
<p style="color: rgb(42, 42, 42); margin-top: 0px;
margin-bottom: 0px; padding-bottom: 0px; line-height:
18px;">Checks file for</p>
</th>
</tr>
<tr>
<td style="border: 1px solid rgb(187, 187, 187); margin:
10px; padding: 10px 8px; color: rgb(42, 42, 42);
vertical-align: top;">
<p style="color: rgb(42, 42, 42); margin-top: 0px;
margin-bottom: 0px; padding-bottom: 0px; line-height:
18px;">00</p>
</td>
<td style="border: 1px solid rgb(187, 187, 187); margin:
10px; padding: 10px 8px; color: rgb(42, 42, 42);
vertical-align: top;">
<p style="color: rgb(42, 42, 42); margin-top: 0px;
margin-bottom: 0px; padding-bottom: 0px; line-height:
18px;">Existence only</p>
</td>
</tr>
<tr>
<td style="border: 1px solid rgb(187, 187, 187); margin:
10px; padding: 10px 8px; color: rgb(42, 42, 42);
vertical-align: top;">
<p style="color: rgb(42, 42, 42); margin-top: 0px;
margin-bottom: 0px; padding-bottom: 0px; line-height:
18px;">02</p>
</td>
<td style="border: 1px solid rgb(187, 187, 187); margin:
10px; padding: 10px 8px; color: rgb(42, 42, 42);
vertical-align: top;">
<p style="color: rgb(42, 42, 42); margin-top: 0px;
margin-bottom: 0px; padding-bottom: 0px; line-height:
18px;">Write-only</p>
</td>
</tr>
<tr>
<td style="border: 1px solid rgb(187, 187, 187); margin:
10px; padding: 10px 8px; color: rgb(42, 42, 42);
vertical-align: top;">
<p style="color: rgb(42, 42, 42); margin-top: 0px;
margin-bottom: 0px; padding-bottom: 0px; line-height:
18px;">04</p>
</td>
<td style="border: 1px solid rgb(187, 187, 187); margin:
10px; padding: 10px 8px; color: rgb(42, 42, 42);
vertical-align: top;">
<p style="color: rgb(42, 42, 42); margin-top: 0px;
margin-bottom: 0px; padding-bottom: 0px; line-height:
18px;">Read-only</p>
</td>
</tr>
<tr>
<td style="border: 1px solid rgb(187, 187, 187); margin:
10px; padding: 10px 8px; color: rgb(42, 42, 42);
vertical-align: top;">
<p style="color: rgb(42, 42, 42); margin-top: 0px;
margin-bottom: 0px; padding-bottom: 0px; line-height:
18px;">06</p>
</td>
<td style="border: 1px solid rgb(187, 187, 187); margin:
10px; padding: 10px 8px; color: rgb(42, 42, 42);
vertical-align: top;">
<p style="color: rgb(42, 42, 42); margin-top: 0px;
margin-bottom: 0px; padding-bottom: 0px; line-height:
18px;">Read and write</p>
</td>
</tr>
</tbody>
</table>
<br>
<a moz-do-not-send="true"
href="http://msdn.microsoft.com/en-us/library/1w06ktdy.aspx">http://msdn.microsoft.com/en-us/library/1w06ktdy.aspx</a><br>
The definition are consistent with unistd.h. <br>
<br>
Test: JPRT and jtreg.<br>
<br>
Thanks<br>
Yumin<br>
</blockquote>
<br>
</body>
</html>