<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - writeout and flush functions are redundant"
   href="https://bugs.llvm.org/show_bug.cgi?id=38064">38064</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>writeout and flush functions are redundant
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>profile
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mcastelluccio@mozilla.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>We currently have writeout functions and flush functions, where the difference
is just that the flush function is also resetting the counters to 0.
At exit, instead of calling __llvm_gcov_writeout, we could call
__llvm_gcov_flush. Since we are at exit, the fact that we reset the counters to
0 for the current module doesn't matter (as the module is not usable anymore
after that).
At exit we would still call __llvm_gcov_flush only for the module that is
exiting, at __gcov_flush we would call __llvm_gcov_flush for all modules.

The benefit is simplifying the code a bit. The drawback is that atexit will be
a bit slower (as it will have to reset the counters).</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>