[llvm-bugs] [Bug 38064] New: writeout and flush functions are redundant

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 5 03:35:07 PDT 2018


https://bugs.llvm.org/show_bug.cgi?id=38064

            Bug ID: 38064
           Summary: writeout and flush functions are redundant
           Product: compiler-rt
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: profile
          Assignee: unassignedbugs at nondot.org
          Reporter: mcastelluccio at mozilla.com
                CC: llvm-bugs at lists.llvm.org

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).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180705/04889578/attachment.html>


More information about the llvm-bugs mailing list