/external/compiler-rt/lib/tsan/rtl/ |
D | tsan_rtl_mutex.cc | 26 void ReportDeadlock(ThreadState *thr, uptr pc, DDReport *r); 29 ThreadState *thr; member 32 Callback(ThreadState *thr, uptr pc) in Callback() 33 : thr(thr) in Callback() 35 DDCallback::pt = thr->proc()->dd_pt; in Callback() 36 DDCallback::lt = thr->dd_lt; in Callback() 39 u32 Unwind() override { return CurrentStackId(thr, pc); } in Unwind() 40 int UniqueTid() override { return thr->unique_id; } in UniqueTid() 43 void DDMutexInit(ThreadState *thr, uptr pc, SyncVar *s) { in DDMutexInit() argument 44 Callback cb(thr, pc); in DDMutexInit() [all …]
|
D | tsan_rtl_thread.cc | 27 , thr() in ThreadContext() 49 ThreadState *thr; member 54 thr = 0; in OnCreated() 58 if (!args->thr) // GCD workers don't have a parent thread. in OnCreated() 60 args->thr->fast_state.IncrementEpoch(); in OnCreated() 62 TraceAddEvent(args->thr, args->thr->fast_state, EventTypeMop, 0); in OnCreated() 63 ReleaseImpl(args->thr, 0, &sync); in OnCreated() 64 creation_stack_id = CurrentStackId(args->thr, args->pc); in OnCreated() 66 StatInc(args->thr, StatThreadMaxTid); in OnCreated() 81 ThreadState *thr; member [all …]
|
D | tsan_fd.cc | 50 static FdSync *allocsync(ThreadState *thr, uptr pc) { in allocsync() argument 51 FdSync *s = (FdSync*)user_alloc(thr, pc, sizeof(FdSync), kDefaultAlignment, in allocsync() 63 static void unref(ThreadState *thr, uptr pc, FdSync *s) { in unref() argument 69 user_free(thr, pc, s, false); in unref() 74 static FdDesc *fddesc(ThreadState *thr, uptr pc, int fd) { in fddesc() argument 82 void *p = user_alloc(thr, pc, size, kDefaultAlignment, false); in fddesc() 84 MemoryResetRange(thr, (uptr)&fddesc, (uptr)p, size); in fddesc() 88 user_free(thr, pc, p, false); in fddesc() 94 static void init(ThreadState *thr, uptr pc, int fd, FdSync *s, in init() argument 96 FdDesc *d = fddesc(thr, pc, fd); in init() [all …]
|
D | tsan_rtl.cc | 308 void Initialize(ThreadState *thr) { in Initialize() argument 336 ProcWire(proc, thr); in Initialize() 365 int tid = ThreadCreate(thr, 0, 0, true); in Initialize() 367 ThreadStart(thr, tid, internal_getpid()); in Initialize() 387 int Finalize(ThreadState *thr) { in Finalize() argument 390 if (flags()->atexit_sleep_ms > 0 && ThreadCount(thr) > 1) in Finalize() 403 ThreadFinalize(thr); in Finalize() 430 StatAggregate(ctx->stat, thr->stat); in Finalize() 438 void ForkBefore(ThreadState *thr, uptr pc) { in ForkBefore() argument 443 void ForkParentAfter(ThreadState *thr, uptr pc) { in ForkParentAfter() argument [all …]
|
D | tsan_mman.cc | 83 ThreadState *thr = cur_thread(); in ScopedGlobalProcessor() local 84 if (thr->proc()) in ScopedGlobalProcessor() 101 ProcWire(gp->proc, thr); in ScopedGlobalProcessor() 106 ThreadState *thr = cur_thread(); in ~ScopedGlobalProcessor() local 107 if (thr->proc() != gp->proc) in ~ScopedGlobalProcessor() 109 ProcUnwire(gp->proc, thr); in ~ScopedGlobalProcessor() 135 static void SignalUnsafeCall(ThreadState *thr, uptr pc) { in SignalUnsafeCall() argument 136 if (atomic_load_relaxed(&thr->in_signal_handler) == 0 || in SignalUnsafeCall() 140 ObtainCurrentStack(thr, pc, &stack); in SignalUnsafeCall() 146 OutputReport(thr, rep); in SignalUnsafeCall() [all …]
|
D | tsan_interceptors.cc | 241 static ThreadSignalContext *SigCtx(ThreadState *thr) { in SigCtx() argument 242 ThreadSignalContext *ctx = (ThreadSignalContext*)thr->signal_ctx; in SigCtx() 243 if (ctx == 0 && !thr->is_dead) { in SigCtx() 245 MemoryResetRange(thr, (uptr)&SigCtx, (uptr)ctx, sizeof(*ctx)); in SigCtx() 246 thr->signal_ctx = ctx; in SigCtx() 255 ScopedInterceptor::ScopedInterceptor(ThreadState *thr, const char *fname, in ScopedInterceptor() argument 257 : thr_(thr) in ScopedInterceptor() 260 Initialize(thr); in ScopedInterceptor() 264 FuncEntry(thr, pc); in ScopedInterceptor() 312 #define READ_STRING_OF_LEN(thr, pc, s, len, n) \ argument [all …]
|
D | tsan_rtl.h | 337 ThreadState *thr; // currently wired thread, or nullptr member 464 ThreadState *thr; variable 591 void ObtainCurrentStack(ThreadState *thr, uptr toppc, StackTraceTy *stack) { in ObtainCurrentStack() argument 592 uptr size = thr->shadow_stack_pos - thr->shadow_stack; in ObtainCurrentStack() 598 stack->Init(&thr->shadow_stack[start], size, toppc); in ObtainCurrentStack() 607 void ALWAYS_INLINE StatInc(ThreadState *thr, StatType typ, u64 n = 1) { 609 thr->stat[typ] += n; 612 void ALWAYS_INLINE StatSet(ThreadState *thr, StatType typ, u64 n) { in StatSet() argument 614 thr->stat[typ] = n; in StatSet() 626 void ForkBefore(ThreadState *thr, uptr pc); [all …]
|
D | tsan_interface_java.cc | 41 ScopedJavaFunc(ThreadState *thr, uptr pc) in ScopedJavaFunc() argument 42 : thr_(thr) { in ScopedJavaFunc() 44 FuncEntry(thr, pc); in ScopedJavaFunc() 62 ThreadState *thr = cur_thread(); \ 66 ScopedJavaFunc scoped(thr, caller_pc); \ 71 DPrintf("#%d: java_init(%p, %p)\n", thr->tid, heap_begin, heap_size); in __tsan_java_init() 83 DPrintf("#%d: java_fini()\n", thr->tid); in __tsan_java_fini() 86 int status = Finalize(thr); in __tsan_java_fini() 87 DPrintf("#%d: java_fini() = %d\n", thr->tid, status); in __tsan_java_fini() 93 DPrintf("#%d: java_alloc(%p, %p)\n", thr->tid, ptr, size); in __tsan_java_alloc() [all …]
|
D | tsan_fd.h | 42 void FdAcquire(ThreadState *thr, uptr pc, int fd); 43 void FdRelease(ThreadState *thr, uptr pc, int fd); 44 void FdAccess(ThreadState *thr, uptr pc, int fd); 45 void FdClose(ThreadState *thr, uptr pc, int fd, bool write = true); 46 void FdFileCreate(ThreadState *thr, uptr pc, int fd); 47 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write); 48 void FdPipeCreate(ThreadState *thr, uptr pc, int rfd, int wfd); 49 void FdEventCreate(ThreadState *thr, uptr pc, int fd); 50 void FdSignalCreate(ThreadState *thr, uptr pc, int fd); 51 void FdInotifyCreate(ThreadState *thr, uptr pc, int fd); [all …]
|
D | tsan_rtl_proc.cc | 25 proc->thr = nullptr; in ProcCreate() 35 CHECK_EQ(proc->thr, nullptr); in ProcDestroy() 47 void ProcWire(Processor *proc, ThreadState *thr) { in ProcWire() argument 48 CHECK_EQ(thr->proc1, nullptr); in ProcWire() 49 CHECK_EQ(proc->thr, nullptr); in ProcWire() 50 thr->proc1 = proc; in ProcWire() 51 proc->thr = thr; in ProcWire() 54 void ProcUnwire(Processor *proc, ThreadState *thr) { in ProcUnwire() argument 55 CHECK_EQ(thr->proc1, proc); in ProcUnwire() 56 CHECK_EQ(proc->thr, thr); in ProcUnwire() [all …]
|
D | tsan_interface_atomic.cc | 223 static T AtomicLoad(ThreadState *thr, uptr pc, const volatile T *a, in AtomicLoad() argument 229 MemoryReadAtomic(thr, pc, (uptr)a, SizeLog<T>()); in AtomicLoad() 232 SyncVar *s = ctx->metamap.GetOrCreateAndLock(thr, pc, (uptr)a, false); in AtomicLoad() 233 AcquireImpl(thr, pc, &s->clock); in AtomicLoad() 236 MemoryReadAtomic(thr, pc, (uptr)a, SizeLog<T>()); in AtomicLoad() 253 static void AtomicStore(ThreadState *thr, uptr pc, volatile T *a, T v, in AtomicStore() argument 256 MemoryWriteAtomic(thr, pc, (uptr)a, SizeLog<T>()); in AtomicStore() 266 SyncVar *s = ctx->metamap.GetOrCreateAndLock(thr, pc, (uptr)a, true); in AtomicStore() 267 thr->fast_state.IncrementEpoch(); in AtomicStore() 269 TraceAddEvent(thr, thr->fast_state, EventTypeMop, 0); in AtomicStore() [all …]
|
D | tsan_rtl_report.cc | 231 ThreadState *thr = tctx->thr; in IsInStackOrTls() local 232 CHECK(thr); in IsInStackOrTls() 233 return ((addr >= thr->stk_addr && addr < thr->stk_addr + thr->stk_size) || in IsInStackOrTls() 234 (addr >= thr->tls_addr && addr < thr->tls_addr + thr->tls_size)); in IsInStackOrTls() 244 ThreadState *thr = tctx->thr; in IsThreadStackOrTls() local 245 CHECK(thr); in IsThreadStackOrTls() 246 *is_stack = (addr >= thr->stk_addr && addr < thr->stk_addr + thr->stk_size); in IsThreadStackOrTls() 434 static bool HandleRacyStacks(ThreadState *thr, VarSizeStackTrace traces[2], in HandleRacyStacks() argument 480 static void AddRacyStacks(ThreadState *thr, VarSizeStackTrace traces[2], in AddRacyStacks() argument 495 bool OutputReport(ThreadState *thr, const ScopedReport &srep) { in OutputReport() argument [all …]
|
D | tsan_update_shadow_word_inl.h | 17 StatInc(thr, StatShadowProcessed); 22 StatInc(thr, StatShadowZero); 31 StatInc(thr, StatShadowSameSize); 34 StatInc(thr, StatShadowSameThread); 39 StatInc(thr, StatShadowAnotherThread); 40 if (HappensBefore(old, thr)) { 51 StatInc(thr, StatShadowIntersect); 53 StatInc(thr, StatShadowSameThread); 56 StatInc(thr, StatShadowAnotherThread); 59 if (HappensBefore(old, thr)) [all …]
|
D | tsan_libdispatch_mac.cc | 80 static tsan_block_context_t *AllocContext(ThreadState *thr, uptr pc, in AllocContext() argument 85 (tsan_block_context_t *)user_alloc(thr, pc, sizeof(tsan_block_context_t)); in AllocContext() 106 Acquire(thr, pc, submit_sync); in dispatch_callback_wrap() 107 Acquire(thr, pc, serial_sync); in dispatch_callback_wrap() 108 if (serial_task) Acquire(thr, pc, concurrent_sync); in dispatch_callback_wrap() 114 Release(thr, pc, serial_task ? serial_sync : concurrent_sync); in dispatch_callback_wrap() 115 if (context->submitted_synchronously) Release(thr, pc, submit_sync); in dispatch_callback_wrap() 117 if (context->free_context_in_callback) user_free(thr, pc, context); in dispatch_callback_wrap() 138 AllocContext(thr, pc, q, heap_block, &invoke_and_release_block); \ 140 Release(thr, pc, (uptr)new_context); \ [all …]
|
D | tsan_symbolize.cc | 26 ThreadState *thr = cur_thread(); in EnterSymbolizer() local 27 CHECK(!thr->in_symbolizer); in EnterSymbolizer() 28 thr->in_symbolizer = true; in EnterSymbolizer() 29 thr->ignore_interceptors++; in EnterSymbolizer() 33 ThreadState *thr = cur_thread(); in ExitSymbolizer() local 34 CHECK(thr->in_symbolizer); in ExitSymbolizer() 35 thr->in_symbolizer = false; in ExitSymbolizer() 36 thr->ignore_interceptors--; in ExitSymbolizer()
|
/external/compiler-rt/lib/tsan/go/ |
D | tsan_go.cc | 135 ThreadState *thr = (ThreadState*)internal_alloc(MBlockThreadContex, in AllocGoroutine() local 137 internal_memset(thr, 0, sizeof(*thr)); in AllocGoroutine() 138 return thr; in AllocGoroutine() 144 ThreadState *thr = AllocGoroutine(); in __tsan_init() local 145 main_thr = *thrp = thr; in __tsan_init() 146 Initialize(thr); in __tsan_init() 147 *procp = thr->proc1; in __tsan_init() 153 ThreadState *thr = main_thr; in __tsan_fini() local 154 int res = Finalize(thr); in __tsan_fini() 162 void __tsan_read(ThreadState *thr, void *addr, void *pc) { in __tsan_read() argument [all …]
|
D | test.c | 17 void __tsan_init(void **thr, void **proc, void (*cb)(long, void*)); 20 void __tsan_go_start(void *thr, void **chthr, void *pc); 21 void __tsan_go_end(void *thr); 24 void __tsan_proc_wire(void *proc, void *thr); 25 void __tsan_proc_unwire(void *proc, void *thr); 26 void __tsan_read(void *thr, void *addr, void *pc); 27 void __tsan_write(void *thr, void *addr, void *pc); 28 void __tsan_func_enter(void *thr, void *pc); 29 void __tsan_func_exit(void *thr); 30 void __tsan_malloc(void *thr, void *pc, void *p, unsigned long sz); [all …]
|
/external/compiler-rt/lib/tsan/dd/ |
D | dd_rtl.cc | 22 static u32 CurrentStackTrace(Thread *thr, uptr skip) { in CurrentStackTrace() argument 24 thr->ignore_interceptors = true; in CurrentStackTrace() 26 thr->ignore_interceptors = false; in CurrentStackTrace() 32 static void PrintStackTrace(Thread *thr, u32 stk) { in PrintStackTrace() argument 34 thr->ignore_interceptors = true; in PrintStackTrace() 36 thr->ignore_interceptors = false; in PrintStackTrace() 39 static void ReportDeadlock(Thread *thr, DDReport *rep) { in ReportDeadlock() argument 48 PrintStackTrace(thr, rep->loop[i].stk[1]); in ReportDeadlock() 52 PrintStackTrace(thr, rep->loop[i].stk[0]); in ReportDeadlock() 58 Callback::Callback(Thread *thr) in Callback() argument [all …]
|
D | dd_interceptors.cc | 19 static __thread Thread *thr; variable 29 if (thr != 0) in InitThread() 36 thr = (Thread*)InternalAlloc(sizeof(*thr)); in InitThread() 37 internal_memset(thr, 0, sizeof(*thr)); in InitThread() 38 ThreadInit(thr); in InitThread() 45 MutexDestroy(thr, (uptr)m); in INTERCEPTOR() 51 MutexBeforeLock(thr, (uptr)m, true); in INTERCEPTOR() 53 MutexAfterLock(thr, (uptr)m, true, false); in INTERCEPTOR() 61 MutexAfterLock(thr, (uptr)m, true, true); in INTERCEPTOR() 67 MutexBeforeUnlock(thr, (uptr)m, true); in INTERCEPTOR() [all …]
|
D | dd_rtl.h | 35 Thread *thr; member 37 Callback(Thread *thr); 58 void ThreadInit(Thread *thr); 59 void ThreadDestroy(Thread *thr); 61 void MutexBeforeLock(Thread *thr, uptr m, bool writelock); 62 void MutexAfterLock(Thread *thr, uptr m, bool writelock, bool trylock); 63 void MutexBeforeUnlock(Thread *thr, uptr m, bool writelock); 64 void MutexDestroy(Thread *thr, uptr m);
|
/external/compiler-rt/lib/tsan/tests/unit/ |
D | tsan_mman_test.cc | 38 ThreadState *thr = cur_thread(); in TEST() local 40 char *p = (char*)user_alloc(thr, pc, 10); in TEST() 42 char *p2 = (char*)user_alloc(thr, pc, 20); in TEST() 47 user_free(thr, pc, p); in TEST() 48 user_free(thr, pc, p2); in TEST() 52 ThreadState *thr = cur_thread(); in TEST() local 55 void *p = user_realloc(thr, pc, 0, 0); in TEST() 61 void *p = user_realloc(thr, pc, 0, 100); in TEST() 64 user_free(thr, pc, p); in TEST() 67 void *p = user_alloc(thr, pc, 100); in TEST() [all …]
|
D | tsan_stack_test.cc | 22 ThreadState thr(0, 0, 0, 0, 0, 0, 0, 0, 0); in TestStackTrace() local 24 thr.shadow_stack = &stack[0]; in TestStackTrace() 25 thr.shadow_stack_pos = &stack[0]; in TestStackTrace() 26 thr.shadow_stack_end = &stack[128]; in TestStackTrace() 28 ObtainCurrentStack(&thr, 0, trace); in TestStackTrace() 31 ObtainCurrentStack(&thr, 42, trace); in TestStackTrace() 35 *thr.shadow_stack_pos++ = 100; in TestStackTrace() 36 *thr.shadow_stack_pos++ = 101; in TestStackTrace() 37 ObtainCurrentStack(&thr, 0, trace); in TestStackTrace() 42 ObtainCurrentStack(&thr, 42, trace); in TestStackTrace() [all …]
|
D | tsan_sync_test.cc | 20 ThreadState *thr = cur_thread(); in TEST() local 23 m->AllocBlock(thr, 0, (uptr)&block[0], 1 * sizeof(u64)); in TEST() 27 EXPECT_EQ(mb->tid, thr->tid); in TEST() 28 uptr sz = m->FreeBlock(thr->proc(), (uptr)&block[0]); in TEST() 35 ThreadState *thr = cur_thread(); in TEST() local 38 m->AllocBlock(thr, 0, (uptr)&block[0], 1 * sizeof(u64)); in TEST() 39 m->AllocBlock(thr, 0, (uptr)&block[1], 3 * sizeof(u64)); in TEST() 44 m->FreeRange(thr->proc(), (uptr)&block[0], 4 * sizeof(u64)); in TEST() 52 ThreadState *thr = cur_thread(); in TEST() local 55 m->AllocBlock(thr, 0, (uptr)&block[0], 4 * sizeof(u64)); in TEST() [all …]
|
/external/libaom/libaom/av1/encoder/x86/ |
D | av1_quantize_avx2.c | 47 __m256i *thr, __m256i *qp) { in init_qp() argument 66 *thr = _mm256_srai_epi16(qp[2], 1 + log_scale); in init_qp() 69 static INLINE void update_qp(int log_scale, __m256i *thr, __m256i *qp) { in update_qp() argument 73 *thr = _mm256_srai_epi16(qp[2], 1 + log_scale); in update_qp() 107 static INLINE void quantize(const __m256i *thr, const __m256i *qp, __m256i *c, in quantize() argument 111 __m256i mask = _mm256_cmpgt_epi16(abs_coeff, *thr); in quantize() 112 mask = _mm256_or_si256(mask, _mm256_cmpeq_epi16(abs_coeff, *thr)); in quantize() 148 __m256i coeff, thr; in av1_quantize_fp_avx2() local 151 init_qp(round_ptr, quant_ptr, dequant_ptr, log_scale, &thr, qp); in av1_quantize_fp_avx2() 155 quantize(&thr, qp, &coeff, iscan_ptr, qcoeff_ptr, dqcoeff_ptr, &eob); in av1_quantize_fp_avx2() [all …]
|
/external/compiler-rt/test/asan/TestCases/Windows/ |
D | thread_stack_reuse.cc | 22 HANDLE thr = NULL; in main() local 24 thr = CreateThread(NULL, 0, thread_proc_1, NULL, 0, NULL); in main() 25 if (thr == 0) in main() 27 if (WAIT_OBJECT_0 != WaitForSingleObject(thr, INFINITE)) in main() 30 thr = CreateThread(NULL, 0, thread_proc_2, NULL, 0, NULL); in main() 31 if (thr == 0) in main() 33 if (WAIT_OBJECT_0 != WaitForSingleObject(thr, INFINITE)) in main() 35 CloseHandle(thr); in main()
|