diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2014-08-05 18:45:02 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2014-08-05 18:45:02 +0000 |
commit | f31ccc97cdeccd15470ff98bf8d436df72a1760e (patch) | |
tree | 8e7a3ba0224bf49b5a616dcccd7744f39d7c9071 /lib/sanitizer_common/sanitizer_thread_registry.h | |
parent | 0a71bbee3352ed2b0bec6af55d40393b02e0aa25 (diff) |
tsan: allocate vector clocks using slab allocator
Vector clocks is the most actively allocated object in tsan runtime.
Current internal allocator is not scalable enough to handle allocation
of clocks in scalable way (too small caches). This changes transforms
clocks to 2-level array with 512-byte blocks. Since all blocks are of
the same size, it's possible to cache them more efficiently in per-thread caches.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@214912 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_thread_registry.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_thread_registry.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_thread_registry.h b/lib/sanitizer_common/sanitizer_thread_registry.h index 8bb7ff384..e364c21f6 100644 --- a/lib/sanitizer_common/sanitizer_thread_registry.h +++ b/lib/sanitizer_common/sanitizer_thread_registry.h @@ -68,6 +68,7 @@ class ThreadContextBase { virtual void OnStarted(void *arg) {} virtual void OnCreated(void *arg) {} virtual void OnReset() {} + virtual void OnDetached(void *arg) {} }; typedef ThreadContextBase* (*ThreadContextFactory)(u32 tid); @@ -111,6 +112,7 @@ class ThreadRegistry { void SetThreadName(u32 tid, const char *name); void SetThreadNameByUserId(uptr user_id, const char *name); void DetachThread(u32 tid); + void DetachThread(u32 tid, void *arg); void JoinThread(u32 tid, void *arg); void FinishThread(u32 tid); void StartThread(u32 tid, uptr os_id, void *arg); |