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: [email protected]
          Reporter: [email protected]
                CC: [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to