/art/runtime/base/ |
D | mutex_test.cc | 32 mu.AssertNotHeld(Thread::Current()); in AssertDepth() 34 mu.AssertHeld(Thread::Current()); in AssertDepth() 42 mu.Lock(Thread::Current()); in TEST_F() 44 mu.Unlock(Thread::Current()); in TEST_F() 52 ASSERT_TRUE(mu.TryLock(Thread::Current())); in TryLockUnlockTest() 54 mu.Unlock(Thread::Current()); in TryLockUnlockTest() 66 mu.Lock(Thread::Current()); in RecursiveLockUnlockTest() 68 mu.Lock(Thread::Current()); in RecursiveLockUnlockTest() 70 mu.Unlock(Thread::Current()); in RecursiveLockUnlockTest() 72 mu.Unlock(Thread::Current()); in RecursiveLockUnlockTest() [all …]
|
D | mutex.h | 48 class Thread; variable 151 void RegisterAsLocked(Thread* self); 152 void RegisterAsUnlocked(Thread* self); 153 void CheckSafeToWait(Thread* self); 214 void ExclusiveLock(Thread* self) EXCLUSIVE_LOCK_FUNCTION(); 215 void Lock(Thread* self) EXCLUSIVE_LOCK_FUNCTION() { ExclusiveLock(self); } in Lock() 218 bool ExclusiveTryLock(Thread* self) EXCLUSIVE_TRYLOCK_FUNCTION(true); 219 bool TryLock(Thread* self) EXCLUSIVE_TRYLOCK_FUNCTION(true) { return ExclusiveTryLock(self); } in TryLock() 222 void ExclusiveUnlock(Thread* self) UNLOCK_FUNCTION(); 223 void Unlock(Thread* self) UNLOCK_FUNCTION() { ExclusiveUnlock(self); } in Unlock() [all …]
|
/art/runtime/ |
D | entrypoints_order_test.cc | 65 CHECKED(OFFSETOF_MEMBER(Thread, tls32_.state_and_flags) == 0, thread_flags_at_zero); in CheckThreadOffsets() 66 EXPECT_OFFSET_DIFFP(Thread, tls32_, state_and_flags, suspend_count, 4); in CheckThreadOffsets() 67 EXPECT_OFFSET_DIFFP(Thread, tls32_, suspend_count, debug_suspend_count, 4); in CheckThreadOffsets() 68 EXPECT_OFFSET_DIFFP(Thread, tls32_, debug_suspend_count, thin_lock_thread_id, 4); in CheckThreadOffsets() 69 EXPECT_OFFSET_DIFFP(Thread, tls32_, thin_lock_thread_id, tid, 4); in CheckThreadOffsets() 70 EXPECT_OFFSET_DIFFP(Thread, tls32_, tid, daemon, 4); in CheckThreadOffsets() 71 EXPECT_OFFSET_DIFFP(Thread, tls32_, daemon, throwing_OutOfMemoryError, 4); in CheckThreadOffsets() 72 EXPECT_OFFSET_DIFFP(Thread, tls32_, throwing_OutOfMemoryError, no_thread_suspension, 4); in CheckThreadOffsets() 73 EXPECT_OFFSET_DIFFP(Thread, tls32_, no_thread_suspension, thread_exit_check_count, 4); in CheckThreadOffsets() 74 EXPECT_OFFSET_DIFFP(Thread, tls32_, thread_exit_check_count, handling_signal_, 4); in CheckThreadOffsets() [all …]
|
D | monitor.h | 43 class Thread; variable 65 static mirror::Object* MonitorEnter(Thread* thread, mirror::Object* obj) 68 static bool MonitorExit(Thread* thread, mirror::Object* obj) 72 static void Notify(Thread* self, mirror::Object* obj) in Notify() 76 static void NotifyAll(Thread* self, mirror::Object* obj) in NotifyAll() 82 static void Wait(Thread* self, mirror::Object* obj, int64_t ms, int32_t ns, 86 static void DescribeWait(std::ostream& os, const Thread* thread) 91 static mirror::Object* GetContendedMonitor(Thread* thread) 111 Thread* GetOwner() const NO_THREAD_SAFETY_ANALYSIS { in GetOwner() 128 static void InflateThinLocked(Thread* self, Handle<mirror::Object> obj, LockWord lock_word, [all …]
|
D | thread-inl.h | 32 static inline Thread* ThreadForEnv(JNIEnv* env) { in ThreadForEnv() 37 inline Thread* Thread::Current() { in Current() 43 void* thread = pthread_getspecific(Thread::pthread_key_self_); in Current() 44 return reinterpret_cast<Thread*>(thread); in Current() 48 inline void Thread::AllowThreadSuspension() { in AllowThreadSuspension() 49 DCHECK_EQ(Thread::Current(), this); in AllowThreadSuspension() 55 inline void Thread::CheckSuspend() { in CheckSuspend() 56 DCHECK_EQ(Thread::Current(), this); in CheckSuspend() 68 inline ThreadState Thread::SetState(ThreadState new_state) { in SetState() 72 if (kIsDebugBuild && this != Thread::Current()) { in SetState() [all …]
|
D | thread_list.cc | 65 Thread* self = Thread::Current(); in ~ThreadList() 78 bool ThreadList::Contains(Thread* thread) { in Contains() 96 MutexLock mu(Thread::Current(), *Locks::thread_list_lock_); in DumpNativeStacks() 106 ScopedObjectAccess soa(Thread::Current()); in DumpForSigQuit() 121 Thread::DumpState(os, nullptr, tid); in DumpUnattachedThread() 137 Thread* self = Thread::Current(); in DumpUnattachedThreads() 165 void Run(Thread* thread) OVERRIDE { in Run() 168 Thread* self = Thread::Current(); in Run() 186 Thread* self = Thread::Current(); in WaitForThreadsToRunThroughCheckpoint() 205 MutexLock mu(Thread::Current(), *Locks::thread_list_lock_); in Dump() [all …]
|
D | thread_list.h | 36 class Thread; variable 60 void Resume(Thread* thread, bool for_debugger = false) 77 Thread* SuspendThreadByPeer(jobject peer, bool request_suspension, bool debug_suspension, 87 Thread* SuspendThreadByThreadId(uint32_t thread_id, bool debug_suspension, bool* timed_out) 93 Thread* FindThreadByThreadId(uint32_t thin_lock_id); 132 void ForEach(void (*callback)(Thread*, void*), void* context) 136 void Register(Thread* self) 139 void Unregister(Thread* self) LOCKS_EXCLUDED(Locks::mutator_lock_, Locks::thread_list_lock_); 145 std::list<Thread*> GetList() EXCLUSIVE_LOCKS_REQUIRED(Locks::thread_list_lock_) { in GetList() 153 uint32_t AllocThreadId(Thread* self); [all …]
|
D | thread.cc | 79 bool Thread::is_started_ = false; 80 pthread_key_t Thread::pthread_key_self_; 81 ConditionVariable* Thread::resume_cond_ = nullptr; 82 const size_t Thread::kStackOverflowImplicitCheckSize = GetStackOverflowReservedBytes(kRuntimeISA); 86 void Thread::InitCardTable() { in InitCardTable() 97 void Thread::InitTlsEntryPoints() { in InitTlsEntryPoints() 109 void Thread::InitStringEntryPoints() { in InitStringEntryPoints() 146 void Thread::ResetQuickAllocEntryPointsForThread() { in ResetQuickAllocEntryPointsForThread() 194 void Thread::PushAndClearDeoptimizationReturnValue() { in PushAndClearDeoptimizationReturnValue() 203 JValue Thread::PopDeoptimizationReturnValue() { in PopDeoptimizationReturnValue() [all …]
|
D | barrier.h | 42 void Pass(Thread* self); 45 void Wait(Thread* self); 54 void Increment(Thread* self, int delta) LOCKS_EXCLUDED(lock_); 58 bool Increment(Thread* self, int delta, uint32_t timeout_ms) LOCKS_EXCLUDED(lock_); 62 void Init(Thread* self, int count); 65 void SetCountLocked(Thread* self, int count) EXCLUSIVE_LOCKS_REQUIRED(lock_);
|
D | java_vm_ext.cc | 58 SharedLibrary(JNIEnv* env, Thread* self, const std::string& path, void* handle, in SharedLibrary() 71 Thread* self = Thread::Current(); in ~SharedLibrary() 91 Thread* self = Thread::Current(); in CheckOnLoadResult() 116 Thread* self = Thread::Current(); in SetResult() 218 ScopedObjectAccessUnchecked soa(Thread::Current()); in FindNativeMethod() 277 if (vm == nullptr || Thread::Current() == nullptr) { in DetachCurrentThread() 297 Thread* thread = Thread::Current(); in GetEnv() 313 Thread* self = Thread::Current(); in AttachCurrentThreadInternal() 346 *p_env = Thread::Current()->GetJniEnv(); in AttachCurrentThreadInternal() 388 Thread* self = Thread::Current(); in JniAbort() [all …]
|
D | monitor.cc | 87 Monitor::Monitor(Thread* self, Thread* owner, mirror::Object* obj, int32_t hash_code) in Monitor() 109 Monitor::Monitor(Thread* self, Thread* owner, mirror::Object* obj, int32_t hash_code, in Monitor() 141 bool Monitor::Install(Thread* self) { in Install() 185 void Monitor::AppendToWaitSet(Thread* thread) { in AppendToWaitSet() 186 DCHECK(owner_ == Thread::Current()); in AppendToWaitSet() 195 Thread* t = wait_set_; in AppendToWaitSet() 202 void Monitor::RemoveFromWaitSet(Thread *thread) { in RemoveFromWaitSet() 203 DCHECK(owner_ == Thread::Current()); in RemoveFromWaitSet() 214 Thread* t = wait_set_; in RemoveFromWaitSet() 229 void Monitor::Lock(Thread* self) { in Lock() [all …]
|
/art/runtime/native/ |
D | java_lang_Thread.cc | 45 Thread* thread = Thread::FromManagedThread(soa, java_thread); in Thread_isInterrupted() 51 Thread::CreateNativeThread(env, java_thread, stack_size, daemon == JNI_TRUE); in Thread_nativeCreate() 66 Thread* thread = Thread::FromManagedThread(soa, java_thread); in Thread_nativeGetStatus() 108 Thread* thread = Thread::FromManagedThread(soa, java_thread); in Thread_nativeHoldsLock() 115 Thread* thread = Thread::FromManagedThread(soa, java_thread); in Thread_nativeInterrupt() 136 Thread* thread = thread_list->SuspendThreadByPeer(peer, true, false, &timed_out); in Thread_nativeSetName() 157 Thread* thread = Thread::FromManagedThread(soa, java_thread); in Thread_nativeSetPriority() 166 Monitor::Wait(Thread::Current(), lock, ms, ns, true, kSleeping); in Thread_sleep() 180 NATIVE_METHOD(Thread, currentThread, "!()Ljava/lang/Thread;"), 181 NATIVE_METHOD(Thread, interrupted, "!()Z"), [all …]
|
/art/test/051-thread/src/ |
D | Main.java | 56 private static class TestCapacityThread extends Thread { 70 Thread t = new Thread(null, new TestDaemonThread(), "TestDaemonThread", 7168); in testThreadDaemons() 91 Thread.currentThread().setDaemon(true); in run() 98 Thread.sleep(2000); in run() 110 Thread.currentThread().interrupt(); in testSleepZero() 112 Thread.sleep(0); in testSleepZero() 115 if (Thread.currentThread().isInterrupted()) { in testSleepZero() 124 Thread thread = new Thread() { in testSetName() 146 t1.setPriority(Thread.MAX_PRIORITY); in testThreadPriorities() 149 if (supportsThreadPriorities() && (t1.getNativePriority() != Thread.MAX_PRIORITY)) { in testThreadPriorities() [all …]
|
/art/runtime/gc/space/ |
D | bump_pointer_space.cc | 79 MutexLock mu(Thread::Current(), block_lock_); in Clear() 96 size_t BumpPointerSpace::RevokeThreadLocalBuffers(Thread* thread) { in RevokeThreadLocalBuffers() 97 MutexLock mu(Thread::Current(), block_lock_); in RevokeThreadLocalBuffers() 103 Thread* self = Thread::Current(); in RevokeAllThreadLocalBuffers() 107 std::list<Thread*> thread_list = Runtime::Current()->GetThreadList()->GetList(); in RevokeAllThreadLocalBuffers() 108 for (Thread* thread : thread_list) { in RevokeAllThreadLocalBuffers() 114 void BumpPointerSpace::AssertThreadLocalBuffersAreRevoked(Thread* thread) { in AssertThreadLocalBuffersAreRevoked() 116 MutexLock mu(Thread::Current(), block_lock_); in AssertThreadLocalBuffersAreRevoked() 123 Thread* self = Thread::Current(); in AssertAllThreadLocalBuffersAreRevoked() 127 std::list<Thread*> thread_list = Runtime::Current()->GetThreadList()->GetList(); in AssertAllThreadLocalBuffersAreRevoked() [all …]
|
/art/test/129-ThreadGetId/src/ |
D | Main.java | 24 final Thread[] threads = new Thread[numberOfThreads]; in main() 26 threads[t] = new Thread(new Main()); in main() 29 for (Thread t : threads) { in main() 36 if (Thread.currentThread().getId() <= 0) { in test_getId() 40 Map<Thread, StackTraceElement[]> stMap = Thread.getAllStackTraces(); in test_getId() 41 for (Thread thread : stMap.keySet()) { in test_getId()
|
/art/runtime/jit/ |
D | jit_instrumentation.h | 41 class Thread; variable 49 void AddSamples(Thread* self, ArtMethod* method, size_t samples) 51 void SignalCompiled(Thread* self, ArtMethod* method) 69 virtual void MethodEntered(Thread* thread, mirror::Object* /*this_object*/, in MethodEntered() 74 virtual void MethodExited(Thread* /*thread*/, mirror::Object* /*this_object*/, in MethodExited() argument 78 virtual void MethodUnwind(Thread* /*thread*/, mirror::Object* /*this_object*/, in MethodUnwind() argument 80 virtual void FieldRead(Thread* /*thread*/, mirror::Object* /*this_object*/, in FieldRead() argument 83 virtual void FieldWritten(Thread* /*thread*/, mirror::Object* /*this_object*/, in FieldWritten() argument 87 virtual void ExceptionCaught(Thread* /*thread*/, in ExceptionCaught() argument 90 virtual void DexPcMoved(Thread* /*self*/, mirror::Object* /*this_object*/, in DexPcMoved() argument [all …]
|
/art/runtime/entrypoints/quick/ |
D | quick_entrypoints.h | 26 Thread::QuickEntryPointOffset<ptr_size>(OFFSETOF_MEMBER(QuickEntryPoints, x)) 39 class Thread; variable 53 extern uint32_t JniMethodStart(Thread* self) NO_THREAD_SAFETY_ANALYSIS HOT_ATTR; 54 extern uint32_t JniMethodStartSynchronized(jobject to_lock, Thread* self) 56 extern void JniMethodEnd(uint32_t saved_local_ref_cookie, Thread* self) 59 Thread* self) 62 Thread* self) 67 jobject locked, Thread* self) 71 Thread* self)
|
D | quick_throw_entrypoints.cc | 27 extern "C" NO_RETURN void artDeliverPendingExceptionFromCode(Thread* self) in artDeliverPendingExceptionFromCode() 34 extern "C" NO_RETURN void artDeliverExceptionFromCode(mirror::Throwable* exception, Thread* self) in artDeliverExceptionFromCode() 53 extern "C" NO_RETURN void artThrowNullPointerExceptionFromCode(Thread* self) in artThrowNullPointerExceptionFromCode() 63 extern "C" NO_RETURN void artThrowDivZeroFromCode(Thread* self) in artThrowDivZeroFromCode() 71 extern "C" NO_RETURN void artThrowArrayBoundsFromCode(int index, int length, Thread* self) in artThrowArrayBoundsFromCode() 78 extern "C" NO_RETURN void artThrowStackOverflowFromCode(Thread* self) in artThrowStackOverflowFromCode() 87 extern "C" NO_RETURN void artThrowNoSuchMethodFromCode(int32_t method_idx, Thread* self) in artThrowNoSuchMethodFromCode() 96 Thread* self) in artThrowClassCastException() 105 Thread* self) in artThrowArrayStoreException()
|
D | quick_jni_entrypoints.cc | 26 Thread* self ATTRIBUTE_UNUSED) { in ReadBarrierJni() 33 extern uint32_t JniMethodStart(Thread* self) { in JniMethodStart() 46 extern uint32_t JniMethodStartSynchronized(jobject to_lock, Thread* self) { in JniMethodStartSynchronized() 52 static void GoToRunnable(Thread* self) NO_THREAD_SAFETY_ANALYSIS { in GoToRunnable() 65 static void PopLocalReferences(uint32_t saved_local_ref_cookie, Thread* self) in PopLocalReferences() 73 extern void JniMethodEnd(uint32_t saved_local_ref_cookie, Thread* self) { in JniMethodEnd() 79 Thread* self) { in JniMethodEndSynchronized() 88 Thread* self) in JniMethodEndWithReferenceHandleResult() 102 Thread* self) { in JniMethodEndWithReference() 109 jobject locked, Thread* self) { in JniMethodEndWithReferenceSynchronized()
|
/art/runtime/jdwp/ |
D | object_registry.cc | 50 Thread* const self = Thread::Current(); in Add() 79 Thread* const self = Thread::Current(); in InternalAdd() 121 bool ObjectRegistry::ContainsLocked(Thread* self, mirror::Object* o, int32_t identity_hash_code, in ContainsLocked() 138 Thread* const self = Thread::Current(); in Clear() 171 Thread* self = Thread::Current(); in InternalGet() 187 Thread* self = Thread::Current(); in GetJObject() 196 Thread* self = Thread::Current(); in DisableCollection() 204 Thread* self = Thread::Current(); in EnableCollection() 213 Thread* self = Thread::Current(); in Demote() 224 Thread* self = Thread::Current(); in Promote() [all …]
|
/art/runtime/entrypoints/ |
D | entrypoint_utils.h | 42 class Thread; variable 47 Thread* self, bool* slow_path) 51 Thread* self, 62 Thread* self, 69 Thread* self, 76 Thread* self, 96 Thread* self, 104 Thread* self, 109 ArtMethod* method, Thread* self, 117 Thread* self, [all …]
|
/art/test/033-class-init-deadlock/src/ |
D | Main.java | 27 Thread thread1, thread2; in main() 30 thread1 = new Thread() { public void run() { new A(); } }; in main() 31 thread2 = new Thread() { public void run() { new B(); } }; in main() 34 try { Thread.sleep(1000); } catch (InterruptedException ie) { } in main() 37 try { Thread.sleep(6000); } catch (InterruptedException ie) { } in main() 52 try { Thread.sleep(3000); } catch (InterruptedException ie) { } 62 try { Thread.sleep(3000); } catch (InterruptedException ie) { }
|
/art/test/039-join-main/src/ |
D | Main.java | 22 Thread t; in main() 24 t = new Thread(new JoinMainSub(Thread.currentThread()), "Joiner"); in main() 28 try { Thread.sleep(1000); } in main() 36 private Thread mJoinMe; 38 public JoinMainSub(Thread joinMe) { in JoinMainSub()
|
/art/runtime/gc/ |
D | task_processor.h | 57 void AddTask(Thread* self, HeapTask* task) LOCKS_EXCLUDED(lock_); 58 HeapTask* GetTask(Thread* self) LOCKS_EXCLUDED(lock_); 59 void Start(Thread* self) LOCKS_EXCLUDED(lock_); 62 void Stop(Thread* self) LOCKS_EXCLUDED(lock_); 63 void RunAllTasks(Thread* self) LOCKS_EXCLUDED(lock_); 65 void UpdateTargetRunTime(Thread* self, HeapTask* target_time, uint64_t new_target_time) 67 Thread* GetRunningThread() const LOCKS_EXCLUDED(lock_); 81 Thread* running_thread_ GUARDED_BY(lock_);
|
/art/test/054-uncaught/src/ |
D | Main.java | 30 Thread t = new Helper(which); in testThread() 47 Thread.setDefaultUncaughtExceptionHandler(defHandler); in catchTheUncaught() 51 Thread.currentThread().setUncaughtExceptionHandler( in catchTheUncaught() 56 Thread.setDefaultUncaughtExceptionHandler(defHandler); in catchTheUncaught() 57 Thread.currentThread().setUncaughtExceptionHandler( in catchTheUncaught() 66 private static class Helper extends Thread {
|