Home
last modified time | relevance | path

Searched refs:Thread (Results 1 – 25 of 338) sorted by relevance

12345678910>>...14

/art/runtime/base/
Dmutex_test.cc32 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 …]
Dmutex.h48 class Thread; variable
145 void RegisterAsLocked(Thread* self);
146 void RegisterAsUnlocked(Thread* self);
147 void CheckSafeToWait(Thread* self);
208 void ExclusiveLock(Thread* self) EXCLUSIVE_LOCK_FUNCTION();
209 void Lock(Thread* self) EXCLUSIVE_LOCK_FUNCTION() { ExclusiveLock(self); } in Lock()
212 bool ExclusiveTryLock(Thread* self) EXCLUSIVE_TRYLOCK_FUNCTION(true);
213 bool TryLock(Thread* self) EXCLUSIVE_TRYLOCK_FUNCTION(true) { return ExclusiveTryLock(self); } in TryLock()
216 void ExclusiveUnlock(Thread* self) UNLOCK_FUNCTION();
217 void Unlock(Thread* self) UNLOCK_FUNCTION() { ExclusiveUnlock(self); } in Unlock()
[all …]
/art/runtime/
Dmonitor.h39 class Thread; variable
63 static mirror::Object* MonitorEnter(Thread* thread, mirror::Object* obj)
66 static bool MonitorExit(Thread* thread, mirror::Object* obj)
70 static void Notify(Thread* self, mirror::Object* obj) in Notify()
74 static void NotifyAll(Thread* self, mirror::Object* obj) in NotifyAll()
78 static void Wait(Thread* self, mirror::Object* obj, int64_t ms, int32_t ns,
82 static void DescribeWait(std::ostream& os, const Thread* thread)
87 static mirror::Object* GetContendedMonitor(Thread* thread)
107 Thread* GetOwner() const NO_THREAD_SAFETY_ANALYSIS { in GetOwner()
124 static void InflateThinLocked(Thread* self, Handle<mirror::Object> obj, LockWord lock_word,
[all …]
Dentrypoints_order_test.cc65 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, in CheckThreadOffsets()
[all …]
Dthread_list.cc57 Thread* self = Thread::Current(); in ~ThreadList()
71 bool ThreadList::Contains(Thread* thread) { in Contains()
89 MutexLock mu(Thread::Current(), *Locks::thread_list_lock_); in DumpNativeStacks()
99 MutexLock mu(Thread::Current(), *Locks::thread_list_lock_); in DumpForSigQuit()
108 Thread::DumpState(os, NULL, tid); in DumpUnattachedThread()
124 Thread* self = Thread::Current(); in DumpUnattachedThreads()
151 void ThreadList::AssertThreadsAreSuspended(Thread* self, Thread* ignore1, Thread* ignore2) { in AssertThreadsAreSuspended()
158 << "self: <<" << *Thread::Current(); in AssertThreadsAreSuspended()
182 static void ThreadSuspendSleep(Thread* self, useconds_t* delay_us, useconds_t* total_delay_us) { in ThreadSuspendSleep()
199 Thread* self = Thread::Current(); in RunCheckpoint()
[all …]
Dthread-inl.h32 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 ThreadState Thread::SetState(ThreadState new_state) { in SetState()
52 DCHECK_EQ(this, Thread::Current()); in SetState()
59 inline void Thread::AssertThreadSuspensionIsAllowable(bool check_locks) const { in AssertThreadSuspensionIsAllowable()
80 inline void Thread::TransitionFromRunnableToSuspended(ThreadState new_state) { in TransitionFromRunnableToSuspended()
83 DCHECK_EQ(this, Thread::Current()); in TransitionFromRunnableToSuspended()
111 inline ThreadState Thread::TransitionFromSuspendedToRunnable() { in TransitionFromSuspendedToRunnable()
[all …]
Dthread_list.h30 class Thread; variable
55 void Resume(Thread* thread, bool for_debugger = false)
70 Thread* SuspendThreadByPeer(jobject peer, bool request_suspension, bool debug_suspension,
81 Thread* SuspendThreadByThreadId(uint32_t thread_id, bool debug_suspension, bool* timed_out)
88 Thread* FindThreadByThreadId(uint32_t thin_lock_id);
118 void ForEach(void (*callback)(Thread*, void*), void* context)
122 void Register(Thread* self)
125 void Unregister(Thread* self) LOCKS_EXCLUDED(Locks::mutator_lock_, Locks::thread_list_lock_);
131 std::list<Thread*> GetList() EXCLUSIVE_LOCKS_REQUIRED(Locks::thread_list_lock_) { in GetList()
139 uint32_t AllocThreadId(Thread* self);
[all …]
Dthread.cc76 bool Thread::is_started_ = false;
77 pthread_key_t Thread::pthread_key_self_;
78 ConditionVariable* Thread::resume_cond_ = nullptr;
79 const size_t Thread::kStackOverflowImplicitCheckSize = GetStackOverflowReservedBytes(kRuntimeISA);
83 void Thread::InitCardTable() { in InitCardTable()
94 void Thread::InitTlsEntryPoints() { in InitTlsEntryPoints()
106 void Thread::ResetQuickAllocEntryPointsForThread() { in ResetQuickAllocEntryPointsForThread()
110 void Thread::SetDeoptimizationShadowFrame(ShadowFrame* sf) { in SetDeoptimizationShadowFrame()
114 void Thread::SetDeoptimizationReturnValue(const JValue& ret_val) { in SetDeoptimizationReturnValue()
118 ShadowFrame* Thread::GetAndClearDeoptimizationShadowFrame(JValue* ret_val) { in GetAndClearDeoptimizationShadowFrame()
[all …]
Dbarrier.h42 void Pass(Thread* self);
45 void Wait(Thread* self);
54 void Increment(Thread* self, int delta);
57 void Increment(Thread* self, int delta, uint32_t timeout_ms) LOCKS_EXCLUDED(lock_);
61 void Init(Thread* self, int count);
64 void SetCountLocked(Thread* self, int count) EXCLUSIVE_LOCKS_REQUIRED(lock_);
Dmonitor.cc83 Monitor::Monitor(Thread* self, Thread* owner, mirror::Object* obj, int32_t hash_code) in Monitor()
105 Monitor::Monitor(Thread* self, Thread* owner, mirror::Object* obj, int32_t hash_code, in Monitor()
137 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()
206 void Monitor::RemoveFromWaitSet(Thread *thread) { in RemoveFromWaitSet()
207 DCHECK(owner_ == Thread::Current()); in RemoveFromWaitSet()
218 Thread* t = wait_set_; in RemoveFromWaitSet()
233 void Monitor::Lock(Thread* self) { in Lock()
[all …]
Dthread_pool.cc49 Thread* self = Thread::Current(); in Run()
68 void ThreadPool::AddTask(Thread* self, Task* task) { in AddTask()
90 Thread* self = Thread::Current(); in ThreadPool()
100 MutexLock mu(Thread::Current(), task_queue_lock_); in SetMaxActiveWorkers()
107 Thread* self = Thread::Current(); in ~ThreadPool()
119 void ThreadPool::StartWorkers(Thread* self) { in StartWorkers()
127 void ThreadPool::StopWorkers(Thread* self) { in StopWorkers()
132 Task* ThreadPool::GetTask(Thread* self) { in GetTask()
164 Task* ThreadPool::TryGetTask(Thread* self) { in TryGetTask()
169 Task* ThreadPool::TryGetTaskLocked(Thread* self) { in TryGetTaskLocked()
[all …]
Dthread_pool_test.cc31 void Run(Thread* self) { in Run()
43 LOG(INFO) << "Finalizing: " << *Thread::Current(); in Finalize()
62 Thread* self = Thread::Current(); in TEST_F()
77 Thread* self = Thread::Current(); in TEST_F()
112 void Run(Thread* self) { in Run()
133 Thread* self = Thread::Current(); in TEST_F()
Dtrace.h40 class Thread; variable
74 void CompareAndUpdateStackTrace(Thread* thread, std::vector<mirror::ArtMethod*>* stack_trace)
78 void MethodEntered(Thread* thread, mirror::Object* this_object,
81 void MethodExited(Thread* thread, mirror::Object* this_object,
85 void MethodUnwind(Thread* thread, mirror::Object* this_object,
88 void DexPcMoved(Thread* thread, mirror::Object* this_object,
91 void FieldRead(Thread* thread, mirror::Object* this_object,
94 void FieldWritten(Thread* thread, mirror::Object* this_object,
98 void ExceptionCaught(Thread* thread, const ThrowLocation& throw_location,
108 static void StoreExitingThreadInfo(Thread* thread);
[all …]
/art/runtime/native/
Djava_lang_Thread.cc43 Thread* thread = Thread::FromManagedThread(soa, java_thread); in Thread_isInterrupted()
49 Thread::CreateNativeThread(env, java_thread, stack_size, daemon == JNI_TRUE); in Thread_nativeCreate()
64 Thread* thread = Thread::FromManagedThread(soa, java_thread); in Thread_nativeGetStatus()
104 Thread* thread = Thread::FromManagedThread(soa, java_thread); in Thread_nativeHoldsLock()
111 Thread* thread = Thread::FromManagedThread(soa, java_thread); in Thread_nativeInterrupt()
119 Thread* self; in Thread_nativeSetName()
134 Thread* thread; in Thread_nativeSetName()
159 Thread* thread = Thread::FromManagedThread(soa, java_thread); in Thread_nativeSetPriority()
168 Monitor::Wait(Thread::Current(), lock, ms, ns, true, kSleeping); in Thread_sleep()
182 NATIVE_METHOD(Thread, currentThread, "!()Ljava/lang/Thread;"),
[all …]
/art/runtime/gc/space/
Dbump_pointer_space.cc78 MutexLock mu(Thread::Current(), block_lock_); in Clear()
95 void BumpPointerSpace::RevokeThreadLocalBuffers(Thread* thread) { in RevokeThreadLocalBuffers()
96 MutexLock mu(Thread::Current(), block_lock_); in RevokeThreadLocalBuffers()
101 Thread* self = Thread::Current(); in RevokeAllThreadLocalBuffers()
105 std::list<Thread*> thread_list = Runtime::Current()->GetThreadList()->GetList(); in RevokeAllThreadLocalBuffers()
106 for (Thread* thread : thread_list) { in RevokeAllThreadLocalBuffers()
111 void BumpPointerSpace::AssertThreadLocalBuffersAreRevoked(Thread* thread) { in AssertThreadLocalBuffersAreRevoked()
113 MutexLock mu(Thread::Current(), block_lock_); in AssertThreadLocalBuffersAreRevoked()
120 Thread* self = Thread::Current(); in AssertAllThreadLocalBuffersAreRevoked()
124 std::list<Thread*> thread_list = Runtime::Current()->GetThreadList()->GetList(); in AssertAllThreadLocalBuffersAreRevoked()
[all …]
/art/test/051-thread/src/
DMain.java56 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/entrypoints/quick/
Dquick_entrypoints.h26 Thread::QuickEntryPointOffset<ptr_size>(OFFSETOF_MEMBER(QuickEntryPoints, x))
36 class Thread; variable
50 extern uint32_t JniMethodStart(Thread* self) NO_THREAD_SAFETY_ANALYSIS HOT_ATTR;
51 extern uint32_t JniMethodStartSynchronized(jobject to_lock, Thread* self)
53 extern void JniMethodEnd(uint32_t saved_local_ref_cookie, Thread* self)
56 Thread* self)
59 Thread* self)
64 jobject locked, Thread* self)
/art/runtime/jdwp/
Dobject_registry.cc52 Thread* const self = Thread::Current(); in InternalAdd()
91 bool ObjectRegistry::ContainsLocked(Thread* self, mirror::Object* o, int32_t identity_hash_code, in ContainsLocked()
108 Thread* self = Thread::Current(); in Clear()
128 Thread* self = Thread::Current(); in InternalGet()
142 Thread* self = Thread::Current(); in GetJObject()
151 Thread* self = Thread::Current(); in DisableCollection()
159 Thread* self = Thread::Current(); in EnableCollection()
168 Thread* self = Thread::Current(); in Demote()
179 Thread* self = Thread::Current(); in Promote()
189 Thread* self = Thread::Current(); in IsCollected()
[all …]
/art/test/033-class-init-deadlock/src/
DMain.java27 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/runtime/entrypoints/
Dentrypoint_utils.h41 class Thread; variable
46 Thread* self, bool* slow_path)
51Thread* self, bool* slow_path)
61 Thread* self,
69 Thread* self,
77 Thread* self,
97 Thread* self,
105 Thread* self,
110 int32_t component_count, Thread* self,
117 int32_t component_count, Thread* self,
[all …]
/art/test/039-join-main/src/
DMain.java22 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/test/054-uncaught/src/
DMain.java30 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 {
/art/test/063-process-manager/src/
DMain.java9 Thread.sleep(2000); in main()
19 Thread.sleep(1000); in child()
26 Map<Thread, StackTraceElement[]> traces = Thread.getAllStackTraces(); in checkManager()
29 for (Map.Entry<Thread, StackTraceElement[]> entry : in checkManager()
31 Thread t = entry.getKey(); in checkManager()
/art/test/304-method-tracing/src/
DMain.java31 ArrayList<Thread> threads = new ArrayList<Thread>(); in main()
33 threads.add(new Thread(new ThreadRunnable(), "TestThread-" + i)); in main()
36 for (Thread t : threads) { in main()
40 for (Thread t : threads) { in main()
/art/test/030-bad-finalizer/
Dinfo.txt7 at java.lang.Thread.sleep(Thread.java:1031)
8 at java.lang.Thread.sleep(Thread.java:1013)
13 at java.lang.Thread.run(Thread.java:856)

12345678910>>...14