[PATCH] D45454: Add llvm_gcov_flush to be called outside a shared library

David Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 29 11:34:44 PDT 2018


davidxl added a comment.

With the current gcov_flush implementation in LLVM, making gcov_flush's visibility to be default will simply lead to wrong behavior.   GCC libgcov's implementation is more elaborate -- it allows gcov_flush to dump gcda data for all dynamic objects while making sure gcov_exit only dumps the gcda files from the same dynamic module (otherwise, there will be wrong profile merging). This is done via two levels of linked list.

The patch https://reviews.llvm.org/D48538 is in the right direction, but not complete yet.


https://reviews.llvm.org/D45454





More information about the cfe-commits mailing list