diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2016-02-26 18:26:48 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2016-02-26 18:26:48 +0000 |
commit | d7dd5fc8457724232353da5d0209952dd9c9f966 (patch) | |
tree | 6ab79994991c07fe537475a5e8ca2124da1a53ee /lib/tsan/rtl/tsan_rtl.h | |
parent | 9f1a781323756a455a053f2401cbb3fbe5ecf1c4 (diff) |
tsan: revert r262037
Broke aarch64 and darwin bots.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@262046 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan/rtl/tsan_rtl.h')
-rw-r--r-- | lib/tsan/rtl/tsan_rtl.h | 35 |
1 files changed, 7 insertions, 28 deletions
diff --git a/lib/tsan/rtl/tsan_rtl.h b/lib/tsan/rtl/tsan_rtl.h index 6e812c496..0b59a507c 100644 --- a/lib/tsan/rtl/tsan_rtl.h +++ b/lib/tsan/rtl/tsan_rtl.h @@ -325,26 +325,6 @@ struct JmpBuf { uptr *shadow_stack_pos; }; -// A Processor represents a physical thread, or a P for Go. -// It is used to store internal resources like allocate cache, and does not -// participate in race-detection logic (invisible to end user). -// In C++ it is tied to an OS thread just like ThreadState, however ideally -// it should be tied to a CPU (this way we will have fewer allocator caches). -// In Go it is tied to a P, so there are significantly fewer Processor's than -// ThreadState's (which are tied to Gs). -// A ThreadState must be wired with a Processor to handle events. -struct Processor { - ThreadState *thr; // currently wired thread, or nullptr -#ifndef SANITIZER_GO - AllocatorCache alloc_cache; - InternalAllocatorCache internal_alloc_cache; -#endif - DenseSlabAllocCache block_cache; - DenseSlabAllocCache sync_cache; - DenseSlabAllocCache clock_cache; - DDPhysicalThread *dd_pt; -}; - // This struct is stored in TLS. struct ThreadState { FastState fast_state; @@ -380,6 +360,8 @@ struct ThreadState { MutexSet mset; ThreadClock clock; #ifndef SANITIZER_GO + AllocatorCache alloc_cache; + InternalAllocatorCache internal_alloc_cache; Vector<JmpBuf> jmp_bufs; int ignore_interceptors; #endif @@ -403,14 +385,16 @@ struct ThreadState { #if SANITIZER_DEBUG && !SANITIZER_GO InternalDeadlockDetector internal_deadlock_detector; #endif + DDPhysicalThread *dd_pt; DDLogicalThread *dd_lt; - // Current wired Processor, or nullptr. Required to handle any events. - Processor *proc; - atomic_uintptr_t in_signal_handler; ThreadSignalContext *signal_ctx; + DenseSlabAllocCache block_cache; + DenseSlabAllocCache sync_cache; + DenseSlabAllocCache clock_cache; + #ifndef SANITIZER_GO u32 last_sleep_stack_id; ThreadClock last_sleep_clock; @@ -699,11 +683,6 @@ void ThreadSetName(ThreadState *thr, const char *name); int ThreadCount(ThreadState *thr); void ProcessPendingSignals(ThreadState *thr); -Processor *ProcCreate(); -void ProcDestroy(Processor *proc); -void ProcWire(Processor *proc, ThreadState *thr); -void ProcUnwire(Processor *proc, ThreadState *thr); - void MutexCreate(ThreadState *thr, uptr pc, uptr addr, bool rw, bool recursive, bool linker_init); void MutexDestroy(ThreadState *thr, uptr pc, uptr addr); |