summaryrefslogtreecommitdiff
path: root/lib/interception
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2018-07-18 01:53:39 +0000
committerDean Michael Berris <dberris@google.com>2018-07-18 01:53:39 +0000
commit1d40550d23737645acb8d9f4fd90472b52328906 (patch)
tree8a46145b7b54ff6ec7d8cf75963a36465b2da312 /lib/interception
parentf8e9626b112c22014212116b8d53dcc0d2c657d1 (diff)
[XRay][compiler-rt] Simplify Allocator Implementation
Summary: This change simplifies the XRay Allocator implementation to self-manage an mmap'ed memory segment instead of using the internal allocator implementation in sanitizer_common. We've found through benchmarks and profiling these benchmarks in D48879 that using the internal allocator in sanitizer_common introduces a bottleneck on allocating memory through a central spinlock. This change allows thread-local allocators to eliminate contention on the centralized allocator. To get the most benefit from this approach, we also use a managed allocator for the chunk elements used by the segmented array implementation. This gives us the chance to amortize the cost of allocating memory when creating these internal segmented array data structures. We also took the opportunity to remove the preallocation argument from the allocator API, simplifying the usage of the allocator throughout the profiling implementation. In this change we also tweak some of the flag values to reduce the amount of maximum memory we use/need for each thread, when requesting memory through mmap. Depends on D48956. Reviewers: kpw, eizan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49217 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337342 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/interception')
0 files changed, 0 insertions, 0 deletions