[PATCH] D36078: [XRay][compiler-rt] Remove use of std::mutex and std::shared_ptr from global scope.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 1 07:49:16 PDT 2017


On Mon, Jul 31, 2017 at 11:18 PM Dean Michael Berris via Phabricator <
reviews at reviews.llvm.org> wrote:

> dberris added a comment.
>
> In https://reviews.llvm.org/D36078#826962, @kpw wrote:
>
> > What's the primary motivation? Are we trying to avoid the upfront cost
> of global initialization? The unspecified destructor ordering with
> multithreaded programs?
>
>
> The primary motivation is to avoid the initialization of atomics at
> initialization time. This has caused some issues in the past with dynamic
> linking and relocations.
>

Correctness issues? Performance issues? Seems like it'd be good to have the
issues described more fully here (and/or in the commit(s) for
posterity/clarity)


>
> It also allows us to start removing the dependencies on the C++ standard
> library in the implementation. Using raw pointers gets us there, and not
> using std::mutex gets us there closer.
>
>
> https://reviews.llvm.org/D36078
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170801/288b686a/attachment.html>


More information about the llvm-commits mailing list