[PATCH] D45454: Make __gcov_flush visible outside a shared library

Marco Castelluccio via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 26 14:08:38 PDT 2018


Wouldn't it be better to keep compatibility with GCC and make
__gcov_flush have default visibility?

- Marco.


Il 26/06/2018 00:21, Xinliang David Li ha scritto:
> I don't have an objection having another interface which is just a
> simple wrapper to __gcov_flush but with default visibility. Also
> clearly document its usage and behavior.
>
> David
>
> On Mon, Jun 25, 2018 at 10:12 AM, Chih-Hung Hsieh via Phabricator via
> llvm-commits <llvm-commits at lists.llvm.org
> <mailto:llvm-commits at lists.llvm.org>> wrote:
>
>     chh added a comment.
>
>     In https://reviews.llvm.org/D45454#1142197
>     <https://reviews.llvm.org/D45454#1142197>, @marco-c wrote:
>
>     > In https://reviews.llvm.org/D45454#1070884
>     <https://reviews.llvm.org/D45454#1070884>, @belleyb wrote:
>     >
>     > > @chh I had a chance to try out your proposed changes. It's not
>     causing us any trouble. In fact, `__gcov_flush()` is not even used
>     at all (at least in LLVM 5.0.1).. I can recompile llvm,
>     compiler_rt and clang and re-run all the tests with `__gcov_flush`
>     commented out! No problem.
>     > >
>     > > I would suggest adding a bit more documentation to
>     `__gcov_flush()`, thus describing what those "special cases" are...
>     >
>     >
>     > __gcov_flush is only used if you actually call it (it's needed
>     for example if you want to profile only part of your program).
>     >
>     > In GCC, __gcov_flush is not hidden, so perhaps we should do the
>     same to keep the same behavior? I've also submitted
>     https://reviews.llvm.org/D48538 <https://reviews.llvm.org/D48538>,
>     which is making __gcov_flush flush counters for all shared
>     libraries (like GCC does, with the same caveat:
>     https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83879
>     <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83879>).
>
>
>     I have no problem keeping these functions compatible with GCC.
>     My earlier proposal and David's comment in the mailing list seemed
>     to be lost and not showing here.
>     So, let me summarize the case here. This change should make
>     `__gcov_flush` not hidden as before in GCC,
>     but earlier change made it hidden as well as other `llvm_gov_*`
>     functions.
>     Could we have both `__gov_flush` and `llvm_gov_flush` functions,
>     one unhidden and one hidden?
>
>
>     https://reviews.llvm.org/D45454 <https://reviews.llvm.org/D45454>
>
>
>
>     _______________________________________________
>     llvm-commits mailing list
>     llvm-commits at lists.llvm.org <mailto:llvm-commits at lists.llvm.org>
>     http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>     <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180626/ec46c78e/attachment.html>


More information about the llvm-commits mailing list