Lines Matching refs:thr

37     for (auto *&thr : threads) {  in ThreadArray()  local
38 thr = static_cast<ThreadState *>( in ThreadArray()
42 ProcWire(proc, thr); in ThreadArray()
43 ThreadStart(thr, tid, 0, ThreadType::Fiber); in ThreadArray()
55 auto *thr = threads[i]; in Finish() local
57 Processor *proc = thr->proc(); in Finish()
58 ThreadFinish(thr); in Finish()
59 ProcUnwire(proc, thr); in Finish()
61 UnmapOrDie(thr, sizeof(ThreadState)); in Finish()
74 ThreadArray<1> thr; in TRACE_TEST() local
75 TraceFunc(thr, 0x1000); in TRACE_TEST()
76 TraceFunc(thr, 0x1001); in TRACE_TEST()
77 TraceMutexLock(thr, EventType::kLock, 0x4000, 0x5000, 0x6000); in TRACE_TEST()
78 TraceMutexLock(thr, EventType::kLock, 0x4001, 0x5001, 0x6001); in TRACE_TEST()
79 TraceMutexUnlock(thr, 0x5000); in TRACE_TEST()
80 TraceFunc(thr); in TRACE_TEST()
81 CHECK(TryTraceMemoryAccess(thr, 0x2001, 0x3001, 8, kAccessRead)); in TRACE_TEST()
82 TraceMutexLock(thr, EventType::kRLock, 0x4002, 0x5002, 0x6002); in TRACE_TEST()
83 TraceFunc(thr, 0x1002); in TRACE_TEST()
84 CHECK(TryTraceMemoryAccess(thr, 0x2000, 0x3000, 8, kAccessRead)); in TRACE_TEST()
88 CHECK(TryTraceMemoryAccess(thr, 0x2002, 0x3000, 8, kAccessRead)); in TRACE_TEST()
89 Lock slot_lock(&ctx->slots[static_cast<uptr>(thr->fast_state.sid())].mtx); in TRACE_TEST()
96 bool res = RestoreStack(EventType::kAccessExt, thr->fast_state.sid(), in TRACE_TEST()
97 thr->fast_state.epoch(), 0x3000, 8, kAccessRead, &tid, in TRACE_TEST()
100 CHECK_EQ(tid, thr->tid); in TRACE_TEST()
129 ThreadArray<1> thr; in TRACE_TEST() local
132 TraceFunc(thr, 0x1000); in TRACE_TEST()
136 CHECK(TryTraceMemoryAccess(thr, 0x2000, 0x3000, params.access_size, in TRACE_TEST()
141 CHECK(TryTraceMemoryAccess(thr, 0x2000000, 0x3000, params.access_size, in TRACE_TEST()
145 TraceMemoryAccessRange(thr, 0x2000000, 0x3000, params.access_size, in TRACE_TEST()
149 Lock slot_lock(&ctx->slots[static_cast<uptr>(thr->fast_state.sid())].mtx); in TRACE_TEST()
157 RestoreStack(EventType::kAccessExt, thr->fast_state.sid(), in TRACE_TEST()
158 thr->fast_state.epoch(), 0x3000 + params.offset, in TRACE_TEST()
172 ThreadArray<1> thr; in TRACE_TEST() local
173 TraceFunc(thr, 0x1000); in TRACE_TEST()
174 TraceMutexLock(thr, EventType::kLock, 0x4000, 0x5000, 0x6000); in TRACE_TEST()
175 TraceMutexLock(thr, EventType::kRLock, 0x4001, 0x5001, 0x6001); in TRACE_TEST()
176 TraceMutexLock(thr, EventType::kRLock, 0x4002, 0x5001, 0x6002); in TRACE_TEST()
177 Lock slot_lock(&ctx->slots[static_cast<uptr>(thr->fast_state.sid())].mtx); in TRACE_TEST()
184 bool res = RestoreStack(EventType::kLock, thr->fast_state.sid(), in TRACE_TEST()
185 thr->fast_state.epoch(), 0x5001, 0, 0, &tid, &stk, in TRACE_TEST()
202 ThreadArray<1> thr; in TRACE_TEST() local
203 FuncEntry(thr, 0x1000); in TRACE_TEST()
204 FuncEntry(thr, 0x2000); in TRACE_TEST()
205 MutexPreLock(thr, 0x4000, 0x5000, 0); in TRACE_TEST()
206 MutexPostLock(thr, 0x4000, 0x5000, 0); in TRACE_TEST()
207 MutexPreLock(thr, 0x4000, 0x5000, 0); in TRACE_TEST()
208 MutexPostLock(thr, 0x4000, 0x5000, 0); in TRACE_TEST()
211 FuncEntry(thr, 0x3000); in TRACE_TEST()
212 MutexPreLock(thr, 0x4002, 0x5002, 0); in TRACE_TEST()
213 MutexPostLock(thr, 0x4002, 0x5002, 0); in TRACE_TEST()
214 MutexUnlock(thr, 0x4003, 0x5002, 0); in TRACE_TEST()
215 FuncExit(thr); in TRACE_TEST()
217 FuncEntry(thr, 0x4000); in TRACE_TEST()
218 TraceMutexLock(thr, EventType::kRLock, 0x4001, 0x5001, 0x6001); in TRACE_TEST()
219 CHECK(TryTraceMemoryAccess(thr, 0x2002, 0x3000, 8, kAccessRead)); in TRACE_TEST()
220 Lock slot_lock(&ctx->slots[static_cast<uptr>(thr->fast_state.sid())].mtx); in TRACE_TEST()
227 bool res = RestoreStack(EventType::kAccessExt, thr->fast_state.sid(), in TRACE_TEST()
228 thr->fast_state.epoch(), 0x3000, 8, kAccessRead, &tid, in TRACE_TEST()
231 CHECK_EQ(tid, thr->tid); in TRACE_TEST()
247 ThreadArray<1> thr; in TRACE_TEST() local
249 FuncEntry(thr, 0x1000); in TRACE_TEST()
252 TraceMutexLock(thr, EventType::kLock, 0x4000, 0x5000, 0x6000); in TRACE_TEST()
253 TraceMutexUnlock(thr, 0x5000); in TRACE_TEST()
273 auto check_thread = [&](ThreadState *thr, uptr size, uptr count, in TRACE_TEST()
275 CHECK_EQ(thr->tctx->trace.parts.Size(), size); in TRACE_TEST()