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

Xinliang David Li via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 25 16:21:11 PDT 2018


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> wrote:

> chh added a comment.
>
> In https://reviews.llvm.org/D45454#1142197, @marco-c wrote:
>
> > In 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, 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).
>
>
> 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
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180625/6645f7ef/attachment.html>


More information about the cfe-commits mailing list