[XRay][compiler-rt] Avoid InternalAlloc(...) in Profiling Mode
authorDean Michael Berris <dberris@google.com>
Fri, 17 Aug 2018 01:57:42 +0000 (01:57 +0000)
committerDean Michael Berris <dberris@google.com>
Fri, 17 Aug 2018 01:57:42 +0000 (01:57 +0000)
commit21d4a1eec73df24e2cd2795b4821301ce3545a40
tree0604ed3a38d7e60d16cf2d33361b9f174d6fbbb0
parent973a557338ffce924d361a98979c1af10dc8d581
[XRay][compiler-rt] Avoid InternalAlloc(...) in Profiling Mode

Summary:
We avoid using dynamic memory allocated with the internal allocator in
the profile collection service used by profiling mode. We use aligned
storage for globals and in-struct storage of objects we dynamically
initialize.

We also remove the dependency on `Vector<...>` which also internally
uses the dynamic allocator in sanitizer_common (InternalAlloc) in favour
of the XRay allocator and segmented array implementation.

This change addresses llvm.org/PR38577.

Reviewers: eizan

Reviewed By: eizan

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D50782

llvm-svn: 339978
compiler-rt/lib/xray/xray_profile_collector.cc
compiler-rt/lib/xray/xray_segmented_array.h