<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Poonam,<br>
    <br>
      thanks.<br>
    <br>
    On 4/13/2011 7:16 PM, Poonam Bajaj wrote:
    <blockquote cite="mid:4DA65910.40507@oracle.com" type="cite">
      <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
      <pre><span class="new">Hello Yumin,

Comments inline:

globals.hpp:

</span><span class="new">2337   product(uintx, MaxGCLogFileNumbers, 1,                                    \</span>
<span class="new">2338           "Maximum number of gclog file roration "                          \</span>
<span class="new">2339           "Default rotate in 1 file")                                       \</span>
<span class="new">2340                                                                             \</span>
<span class="new">2341   product(uintx, GCLogFileSize, 10*M,                                       \</span>
<span class="new">2342           "Default log size 10 Megabytes "                                  \</span>
<span class="new">2343           "only used when UseGCLogFileRotation set")                        \</span>
<span class="new">2344           

Here I agree with Jesper that the option names and comments need to be changed for clear understanding. Some suggestons
</span><span class="new"> o </span><span class="new"></span><span class="new">MaxGCLogFileNumbers can be named as </span><span class="new">MaxGCLogFiles or </span>MaxGCLogNumberOfFiles<span class="new">.</span><span class="new">
 o line 2338 can be worded as </span><span class="new">"Maximum number of rotating gc log files. Deafult is 1 "  </span>
 o line 2343 should be <span class="new">"only used when UseGCLogFileRotation is set") </span>

</pre>
    </blockquote>
    changed as pointed by Jesper. <br>
    <blockquote cite="mid:4DA65910.40507@oracle.com" type="cite">
      <pre><span class="new"></span>
arguments.cpp:
<span class="new">+       if (_gc_log_filename == NULL) {</span>
<span class="new">+         jio_fprintf(defaultStream::error_stream(),</span>
<span class="new">+                     "-XX:+UseGCLogRotaion must be with -Xloggc:filename in front\n");</span>

<span class="new">should be: </span><span class="new">"-XX:+</span><span class="new">UseGCLogFileRotation </span><span class="new">must be used with -Xloggc:<filename>\n"</span>
<span class="new">

</span></pre>
    </blockquote>
    Good catch.<br>
    <blockquote cite="mid:4DA65910.40507@oracle.com" type="cite">
      <pre><span class="new">osstream.cpp:

</span><span class="changed"> 835     if (UseGCLogFileRotation) {</span>
<span class="changed"> 836       gclogStream* rot_tty = new(ResourceObj::C_HEAP)</span>
<span class="changed"> 837                                   gclogStream();</span>
<span class="changed"> 838       if (rot_tty->is_open()) {</span>
<span class="changed"> 839         // now we update the time stamp of the GC log to be synced up with tty.</span>
<span class="changed"> 840         rot_tty->time_stamp().update_to(tty->time_stamp().ticks());</span>
<span class="changed"> 841       }</span>
<span class="changed"> 842       gclog_or_tty = rot_tty;</span>
<span class="changed"> 843     }</span>
<span class="changed"> 844     else {</span>
<span class="changed"> 845       fileStream* gc_tty  = new(ResourceObj::C_HEAP)</span>
 846                                  fileStream(Arguments::gc_log_filename());
<span class="changed"> 847       if (gc_tty->is_open()) {</span>
<span class="changed"> 848         // now we update the time stamp of the GC log to be synced up with tty.</span>
<span class="changed"> 849         gc_tty->time_stamp().update_to(tty->time_stamp().ticks());</span>


 850       }
<span class="new"> 851       gclog_or_tty = gc_tty;</span>
 852     }
<span class="new"> 853   }</span>
<span class="new"></span>
 </pre>
       o here, we are refering to log file so the variable names should
      be
      rot_gclog and gclog respectively.<br>
       o why is the line at 851 out of 'if' block ? gclog_or_tty should
      be set to gclog file only if it is open and the same holds for the
      rotating gc log file.<br>
      <br>
    </blockquote>
    I think the code here is if file already open, put a time stamp or
    just assign gclog_or_tty a choice. I may change the code using same
    fileStream --- doing modification now. Since the flag will be an
    external flag, so it will respond to the change request from outside
    tool. <br>
    <blockquote cite="mid:4DA65910.40507@oracle.com" type="cite">
      <br>
      Thanks,<br>
      Poonam<br>
      <br>
      <br>
      <br>
      On 4/13/2011 12:11 AM, <a moz-do-not-send="true"
        class="moz-txt-link-abbreviated"
        href="mailto:yumin.qi@oracle.com">yumin.qi@oracle.com</a> wrote:
      <blockquote cite="mid:4DA49CE7.7020104@oracle.com" type="cite"> <a
          moz-do-not-send="true" class="moz-txt-link-freetext"
          href="http://cr.openjdk.java.net/%7Eminqi/6941923/webrev.00/">http://cr.openjdk.java.net/~minqi/6941923/webrev.00/</a>
        <a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
          href="http://cr.openjdk.java.net/%7Eminqi/6941923/webrev.00/"><http://cr.openjdk.java.net/%7Eminqi/6941923/webrev.00/></a>
        <br>
        <br>
        Summary: <br>
        <br>
        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. <br>
        In the implementation, supply three JVM options <br>
        1) -XX:+UseGCLogFileRotation   must be used with -Xloggc:file <br>
        2) -XX:MaxGCLogFileNumbers=  set limit of rotation file numbers,
        default to 1, maximum set to 1024. <br>
        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. <br>
        <br>
        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, ... <br>
        Check if rotation needed at safepoint ending. <br>
        <br>
        Tested with multiple GC choices. <br>
        <br>
        Thanks <br>
        Yumin <br>
        <br>
        <br>
        <br>
      </blockquote>
      <br>
      <div class="moz-signature">-- <br>
        Best regards, Poonam
        <p><img src="cid:part1.00070209.01090900@oracle.com" alt="Sun,
            an Oracle company" border="0" height="70" width="110"><br>
          Sun, an Oracle Company<br>
          <font size="2" color="#666666" face="Verdana, Arial,
            Helvetica, sans-serif">Poonam Bajaj | Staff Engineer<br>
            Phone: <a moz-do-not-send="true" href="tel:+66937451">+66937451</a>
            | Mobile: <a moz-do-not-send="true" href="tel:+9844511366">+9844511366</a>
            <br>
            JVM Sustaining Engineering<br>
            | Bangalore </font>
          <br>
          <a moz-do-not-send="true"
            href="http://www.oracle.com/commitment" target="_blank"><img
              src="cid:part2.09010700.03080606@oracle.com" alt="Green
              Oracle" align="absmiddle" border="0" height="28"
              width="44"></a>
          <font size="1" color="#4b7d42" face="Verdana, Arial,
            Helvetica, sans-serif">Oracle is committed to developing
            practices and products that
            help protect the environment</font>
          <!-- This signature was generated by the MyDesktop Oracle Business Signature utility version 3.8.5 --></p>
      </div>
    </blockquote>
  </body>
</html>