Lines Matching refs:self
59 static void FillHeap(Thread* self, ClassLinker* class_linker, in FillHeap() argument
65 hsp->reset(new StackHandleScope<kMaxHandles>(self)); in FillHeap()
67 Handle<mirror::Class> c((*hsp)->NewHandle(class_linker->FindSystemClass(self, in FillHeap()
70 Handle<mirror::Class> ca((*hsp)->NewHandle(class_linker->FindSystemClass(self, in FillHeap()
77 mirror::ObjectArray<mirror::Object>::Alloc(self, ca.Get(), length / 4))); in FillHeap()
78 if (self->IsExceptionPending() || h.Get() == nullptr) { in FillHeap()
79 self->ClearException(); in FillHeap()
94 while (!self->IsExceptionPending()) { in FillHeap()
95 Handle<mirror::Object> h = (*hsp)->NewHandle<mirror::Object>(c->AllocObject(self)); in FillHeap()
96 if (!self->IsExceptionPending() && h.Get() != nullptr) { in FillHeap()
100 self->ClearException(); in FillHeap()
113 void Run(Thread* self) { in Run() argument
115 ScopedObjectAccess soa(self); in Run()
117 monitor_test_->thread_ = self; // Pass the Thread. in Run()
118 … monitor_test_->object_.Get()->MonitorEnter(self); // Lock the object. This should transition in Run()
124 monitor_test_->object_.Get()->MonitorExit(self); // To appease analysis. in Run()
136 monitor_test_->object_.Get()->MonitorExit(self); // To appease analysis. in Run()
142 monitor_test_->barrier_->Wait(self); // Let the other thread know we're done. in Run()
145 ScopedObjectAccess soa(self); in Run()
151 Monitor::Wait(self, monitor_test_->object_.Get(), millis_, 0, true, in Run()
155 EXPECT_EQ(expected_, self->IsExceptionPending()); in Run()
157 self->ClearException(); in Run()
161 monitor_test_->complete_barrier_->Wait(self); // Wait for test completion. in Run()
164 ScopedObjectAccess soa(self); in Run()
165 monitor_test_->object_.Get()->MonitorExit(self); // Release the object. Appeases analysis. in Run()
187 void Run(Thread* self) { in Run() argument
188 monitor_test_->barrier_->Wait(self); // Wait for the other thread to set up the monitor. in Run()
191 ScopedObjectAccess soa(self); in Run()
196 Monitor::Wait(self, monitor_test_->object_.Get(), millis_, 0, true, in Run()
200 EXPECT_EQ(expected_, self->IsExceptionPending()); in Run()
202 self->ClearException(); in Run()
206 monitor_test_->complete_barrier_->Wait(self); // Wait for test completion. in Run()
225 void Run(Thread* self) { in Run() argument
226 monitor_test_->barrier_->Wait(self); // Wait for the other thread to set up the monitor. in Run()
229 ScopedObjectAccess soa(self); in Run()
235 monitor_test_->thread_->Interrupt(self); in Run()
241 Monitor::Wait(self, monitor_test_->object_.Get(), 10, 0, true, in Run()
245 if (self->IsExceptionPending()) { in Run()
246 self->ClearException(); in Run()
250 monitor_test_->complete_barrier_->Wait(self); // Wait for test completion. in Run()
267 void Run(Thread* self) { in Run() argument
268 ScopedObjectAccess soa(self); in Run()
270 monitor_test_->watchdog_object_.Get()->MonitorEnter(self); // Lock the object. in Run()
272 monitor_test_->watchdog_object_.Get()->Wait(self, 30 * 1000, 0); // Wait for 30s, or being in Run()
275 monitor_test_->watchdog_object_.Get()->MonitorExit(self); // Release the lock. in Run()
312 Thread* self = Thread::Current(); in CommonWaitSetup() local
313 ScopedObjectAccess soa(self); in CommonWaitSetup()
316 FillHeap(self, class_linker, &hsp, &handles); in CommonWaitSetup()
327 Thread* self = Thread::Current(); in CommonWaitSetup() local
329 thread_pool.AddTask(self, new CreateTask(test, create_sleep, c_millis, c_expected)); in CommonWaitSetup()
331 thread_pool.AddTask(self, new InterruptTask(test, use_sleep, static_cast<uint64_t>(u_millis))); in CommonWaitSetup()
333 thread_pool.AddTask(self, new UseTask(test, use_sleep, u_millis, u_expected)); in CommonWaitSetup()
335 thread_pool.AddTask(self, new WatchdogTask(test)); in CommonWaitSetup()
336 thread_pool.StartWorkers(self); in CommonWaitSetup()
344 Thread* self = Thread::Current(); in CommonWaitSetup() local
345 ScopedObjectAccess soa(self); in CommonWaitSetup()
347 test->watchdog_object_.Get()->MonitorEnter(self); // Lock the object. in CommonWaitSetup()
348 test->watchdog_object_.Get()->NotifyAll(self); // Wake up waiting parties. in CommonWaitSetup()
349 test->watchdog_object_.Get()->MonitorExit(self); // Release the lock. in CommonWaitSetup()
352 thread_pool.StopWorkers(self); in CommonWaitSetup()