Home
last modified time | relevance | path

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

12345678910>>...33

/art/test/1961-obsolete-jit-multithread/
Dexpected.txt1 Thread 0: Hello - Start method sayHi
2 Thread 0: Not doing anything here
3 Thread 0: Hello - End method sayHi
4 Thread 0: Hello - Start method sayHi
5 Thread 0: Requesting redefinition
6 Thread 0: Hello - End method sayHi
7 Thread 0: goodbye - Start method sayHi
8 Thread 0: Not doing anything here
9 Thread 0: goodbye - End method sayHi
11 Thread 1: Hello - Start method sayHi
[all …]
/art/test/1960-obsolete-jit-multithread-native/
Dexpected.txt1 Thread 0: Hello - Start method sayHi
2 Thread 0: Not doing anything here
3 Thread 0: Hello - End method sayHi
4 Thread 0: Hello - Start method sayHi
5 Thread 0: Requesting redefinition
6 Thread 0: Hello - End method sayHi
7 Thread 0: goodbye - Start method sayHi
8 Thread 0: Not doing anything here
9 Thread 0: goodbye - End method sayHi
11 Thread 1: Hello - Start method sayHi
[all …]
/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.h54 class Thread; variable
105 void RegisterAsLocked(Thread* self);
106 void RegisterAsUnlocked(Thread* self);
107 void CheckSafeToWait(Thread* self);
170 void ExclusiveLock(Thread* self) ACQUIRE();
171 void Lock(Thread* self) ACQUIRE() { ExclusiveLock(self); } in Lock()
174 bool ExclusiveTryLock(Thread* self) TRY_ACQUIRE(true);
175 bool TryLock(Thread* self) TRY_ACQUIRE(true) { return ExclusiveTryLock(self); } in TryLock()
178 void ExclusiveUnlock(Thread* self) RELEASE();
179 void Unlock(Thread* self) RELEASE() { ExclusiveUnlock(self); } in Unlock()
[all …]
/art/test/924-threads/src/art/
DTest924.java35 Thread t = new Thread("TestThread") { in run()
50 Thread t1 = Thread.currentThread(); in doTest()
51 Thread t2 = getCurrentThread(); in doTest()
65 Thread t3 = new Thread("Daemon Thread"); in doTest()
72 Thread.sleep(500); // Wait a little bit. in doTest()
77 Thread t4 = new Thread("Subclass") { in doTest()
82 doStateTests(Thread::new); in doTest()
92 private static final class ExtThread extends Thread {
102 System.out.println(Integer.toHexString(getThreadState(Thread.currentThread()))); in doCurrentThreadStateTests()
105 private static void doStateTests(Function<Runnable, Thread> mkThread) throws Exception { in doStateTests()
[all …]
/art/test/129-ThreadGetId/src/
DMain.java25 final Thread[] threads = new Thread[numberOfThreads]; in main()
27 threads[t] = new Thread(new Main()); in main()
30 for (Thread t : threads) { in main()
39 static Thread getHeapTaskDaemon() throws Exception { in getHeapTaskDaemon()
46 Thread[] array = new Thread[activeCount]; in getHeapTaskDaemon()
48 for (Thread thread : array) { in getHeapTaskDaemon()
50 thread.getState() != Thread.State.NEW) { in getHeapTaskDaemon()
55 Thread.sleep(10); in getHeapTaskDaemon()
60 Thread heapDaemon = getHeapTaskDaemon(); in test_getStackTraces()
65 Map<Thread, StackTraceElement[]> map = Thread.getAllStackTraces(); in test_getStackTraces()
[all …]
/art/test/904-object-allocation/src/art/
DTest904.java51 new Thread[] { Thread.currentThread(), }))); in doTest()
62 enableAllocationTracking(Thread.currentThread(), true); in doTest()
66 enableAllocationTracking(Thread.currentThread(), false); in doTest()
71 new Thread[] { Thread.currentThread(), }))); in doTest()
74 Thread test_thread = testThread(l, true, true); in doTest()
79 new Thread[] { Thread.currentThread(), test_thread, }))); in doTest()
85 new Thread[] { Thread.currentThread(), test_thread, }))); in doTest()
97 new Thread[] { Thread.currentThread(), test_thread, }))); in doTest()
102 private static Thread testThread(final ArrayList<Object> l, final boolean sameThread, in testThread()
108 final Thread thisThread = Thread.currentThread(); in testThread()
[all …]
/art/test/063-process-manager/src/
DMain.java19 Thread.sleep(2000); in main()
29 Thread.sleep(250); in child()
35 private static boolean isReaperThread(Thread t) { in isReaperThread()
41 Map<Thread, StackTraceElement[]> traces = Thread.getAllStackTraces(); in checkManager()
44 for (Map.Entry<Thread, StackTraceElement[]> entry : in checkManager()
46 Thread t = entry.getKey(); in checkManager()
48 Thread.State state = t.getState(); in checkManager()
50 if (state != Thread.State.RUNNABLE && state != Thread.State.TIMED_WAITING) { in checkManager()
66 Map<Thread, StackTraceElement[]> traces = Thread.getAllStackTraces(); in waitForReaperTimedWaiting()
71 for (Thread t : traces.keySet()) { in waitForReaperTimedWaiting()
[all …]
/art/test/911-get-stack-trace/src/art/
DThreadListTraces.java30 Thread threads[] = new Thread[N]; in doTest()
32 Thread list[] = new Thread[N/2 + 1]; in doTest()
35 Thread t = new Thread("ThreadListTraces Thread " + i) { in doTest()
46 list[list.length - 1] = Thread.currentThread(); in doTest()
49 Thread.yield(); in doTest()
50 Thread.sleep(500); // A little bit of time... in doTest()
67 public static void printList(Thread[] threads, int max) { in printList()
72 public static native Object[][] getThreadListStackTraces(Thread threads[], int max); in getThreadListStackTraces()
DAllTraces.java31 RETAIN.add(new Thread("UNSTARTED")); in doTest()
32 Thread deadThread = new Thread("DEAD"); in doTest()
42 Thread threads[] = new Thread[N]; in doTest()
45 Thread t = new Thread("AllTraces Thread " + i) { in doTest()
54 Thread.yield(); in doTest()
55 Thread.sleep(500); // A little bit of time... in doTest()
/art/test/051-thread/src/
DMain.java58 private static class TestCapacityThread extends Thread {
72 Thread t = new Thread(null, new TestDaemonThread(), "TestDaemonThread", 7168); in testThreadDaemons()
93 Thread.currentThread().setDaemon(true); in run()
100 Thread.sleep(2000); in run()
112 Thread.currentThread().interrupt(); in testSleepZero()
114 Thread.sleep(0); in testSleepZero()
117 if (Thread.currentThread().isInterrupted()) { in testSleepZero()
126 Thread thread = new Thread() { in testSetName()
148 t1.setPriority(Thread.MAX_PRIORITY); in testThreadPriorities()
151 if (supportsThreadPriorities() && (t1.getNativePriority() != Thread.MAX_PRIORITY)) { in testThreadPriorities()
[all …]
/art/test/924-threads/
Dexpected.txt12 Daemon Thread
17 Daemon Thread
29 Thread type is class java.lang.Thread
38 Thread type is class art.Test924$ExtThread
47Thread[FinalizerDaemon,5,system], Thread[FinalizerWatchdogDaemon,5,system], Thread[HeapTaskDaemon,…
52 [Thread(EventTestThread): start]
53 [Thread(EventTestThread): end]
54 Thread joined
/art/test/1930-monitor-info/
Dexpected.txt3 Thread[main]: MonitorUsage{ monitor: NamedLock[Test1930 - testSingleThread], owner: main, entryCoun…
6 Thread[main]: MonitorUsage{ monitor: NamedLock[Test1930 - testSingleThread], owner: main, entryCoun…
10 Thread[main]: MonitorUsage{ monitor: NamedLock[Test1930 - testLockedTwice], owner: main, entryCount…
14 Thread[main]: MonitorUsage{ monitor: NamedLock[Test1930 - testLockedTwiceNative], owner: main, entr…
18 Thread[main]: MonitorUsage{ monitor: NamedLock[Test1930 - testLockedTwiceJN], owner: main, entryCou…
22 Thread[main]: MonitorUsage{ monitor: NamedLock[Test1930 - testLockedTwiceNJ], owner: main, entryCou…
24 Thread[main]: MonitorUsage{ monitor: NamedLock[Test1930 - testLockWait], owner: main, entryCount: 1…
25 Thread[Test1930 Thread - testLockWait]: MonitorUsage{ monitor: NamedLock[Test1930 - testLockWait], …
26 Thread[main]: MonitorUsage{ monitor: NamedLock[Test1930 - testLockWait], owner: <NULL>, entryCount:…
28 Thread[Test1930 Thread - testLockWait]: MonitorUsage{ monitor: NamedLock[Test1930 - testNotifyWait]…
[all …]
/art/runtime/
Dmonitor.h45 class Thread; variable
72 static ObjPtr<mirror::Object> MonitorEnter(Thread* thread,
81 static bool MonitorExit(Thread* thread, ObjPtr<mirror::Object> obj)
87 static void Notify(Thread* self, ObjPtr<mirror::Object> obj) in Notify()
91 static void NotifyAll(Thread* self, ObjPtr<mirror::Object> obj) in NotifyAll()
98 static void Wait(Thread* self,
105 static ThreadState FetchState(const Thread* thread,
112 static ObjPtr<mirror::Object> GetContendedMonitor(Thread* thread)
132 Thread* GetOwner() const NO_THREAD_SAFETY_ANALYSIS { in GetOwner()
149 static void InflateThinLocked(Thread* self, Handle<mirror::Object> obj, LockWord lock_word,
[all …]
Dthread-inl.h36 static inline Thread* ThreadForEnv(JNIEnv* env) { in ThreadForEnv()
41 inline void Thread::AllowThreadSuspension() { in AllowThreadSuspension()
42 DCHECK_EQ(Thread::Current(), this); in AllowThreadSuspension()
51 inline void Thread::CheckSuspend() { in CheckSuspend()
52 DCHECK_EQ(Thread::Current(), this); in CheckSuspend()
66 inline void Thread::CheckEmptyCheckpointFromWeakRefAccess(BaseMutex* cond_var_mutex) { in CheckEmptyCheckpointFromWeakRefAccess()
67 Thread* self = Thread::Current(); in CheckEmptyCheckpointFromWeakRefAccess()
91 inline void Thread::CheckEmptyCheckpointFromMutex() { in CheckEmptyCheckpointFromMutex()
92 DCHECK_EQ(Thread::Current(), this); in CheckEmptyCheckpointFromMutex()
102 inline ThreadState Thread::SetState(ThreadState new_state) { in SetState()
[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, handling_signal_, 4); in CheckThreadOffsets()
[all …]
Dthread_pool.h35 virtual void Run(Thread* self) = 0;
40 explicit FunctionClosure(std::function<void(Thread*)>&& f) : func_(std::move(f)) {} in FunctionClosure()
41 void Run(Thread* self) override { in Run()
46 std::function<void(Thread*)> func_;
65 explicit FunctionTask(std::function<void(Thread*)>&& func) : func_(std::move(func)) {} in FunctionTask()
67 void Run(Thread* self) override { in Run()
72 std::function<void(Thread*)> func_;
89 Thread* GetThread() const { return thread_; } in GetThread()
100 Thread* thread_;
118 void StartWorkers(Thread* self) REQUIRES(!task_queue_lock_);
[all …]
/art/tools/cpp-define-generator/
Dthread.def22 art::Thread::CardTableOffset<art::kRuntimePointerSize>().Int32Value())
26 art::Thread::MterpCurrentIBaseOffset<art::kRuntimePointerSize>().Int32Value())
30 art::Thread::ExceptionOffset<art::kRuntimePointerSize>().Int32Value())
32 art::Thread::ThreadFlagsOffset<art::kRuntimePointerSize>().Int32Value())
34 art::Thread::ThinLockIdOffset<art::kRuntimePointerSize>().Int32Value())
36 art::Thread::InterpreterCacheOffset<art::kRuntimePointerSize>().Int32Value())
38 art::Thread::InterpreterCacheSizeLog2())
40 art::Thread::IsGcMarkingOffset<art::kRuntimePointerSize>().Int32Value())
42 art::Thread::ThreadLocalAllocStackEndOffset<art::kRuntimePointerSize>().Int32Value())
44 art::Thread::ThreadLocalAllocStackTopOffset<art::kRuntimePointerSize>().Int32Value())
[all …]
/art/runtime/gc/space/
Dbump_pointer_space.cc88 MutexLock mu(Thread::Current(), block_lock_); in Clear()
105 size_t BumpPointerSpace::RevokeThreadLocalBuffers(Thread* thread) { in RevokeThreadLocalBuffers()
106 MutexLock mu(Thread::Current(), block_lock_); in RevokeThreadLocalBuffers()
112 Thread* self = Thread::Current(); in RevokeAllThreadLocalBuffers()
116 std::list<Thread*> thread_list = Runtime::Current()->GetThreadList()->GetList(); in RevokeAllThreadLocalBuffers()
117 for (Thread* thread : thread_list) { in RevokeAllThreadLocalBuffers()
123 void BumpPointerSpace::AssertThreadLocalBuffersAreRevoked(Thread* thread) { in AssertThreadLocalBuffersAreRevoked()
125 MutexLock mu(Thread::Current(), block_lock_); in AssertThreadLocalBuffersAreRevoked()
132 Thread* self = Thread::Current(); in AssertAllThreadLocalBuffersAreRevoked()
136 std::list<Thread*> thread_list = Runtime::Current()->GetThreadList()->GetList(); in AssertAllThreadLocalBuffersAreRevoked()
[all …]
/art/openjdkjvmti/
Dti_monitor.cc62 static bool Destroy(art::Thread* self, JvmtiMonitor* monitor) NO_THREAD_SAFETY_ANALYSIS { in Destroy()
64 art::Thread* owner_thread = monitor->owner_.load(std::memory_order_relaxed); in Destroy()
79 void MonitorEnter(art::Thread* self, bool suspend) NO_THREAD_SAFETY_ANALYSIS { in MonitorEnter()
124 bool MonitorExit(art::Thread* self) NO_THREAD_SAFETY_ANALYSIS { in MonitorExit()
138 bool Wait(art::Thread* self) { in Wait()
145 bool Wait(art::Thread* self, uint64_t timeout_in_ms) { in Wait()
152 bool Notify(art::Thread* self) { in Notify()
156 bool NotifyAll(art::Thread* self) { in NotifyAll()
161 bool IsOwner(art::Thread* self) const { in IsOwner()
165 art::Thread* owner_thread = owner_.load(std::memory_order_relaxed); in IsOwner()
[all …]
/art/test/925-threadgroups/src/art/
DTest925.java32 Thread t1 = Thread.currentThread(); in doTest()
70 Thread[] threads = (Thread[])data[0]; in checkChildren()
73 List<Thread> threadList = new ArrayList<>(Arrays.asList(threads)); in checkChildren()
76 Iterator<Thread> it = threadList.iterator(); in checkChildren()
78 Thread t = it.next(); in checkChildren()
101 Thread[] threads = (Thread[])data[0]; in waitGroupChildren()
105 Thread.sleep(1000); in waitGroupChildren()
109 Thread[] threads = (Thread[])data[0]; in waitGroupChildren()
114 private final static Comparator<Thread> THREAD_COMP = new Comparator<Thread>() {
115 public int compare(Thread o1, Thread o2) {
/art/runtime/native/
Djava_lang_Thread.cc46 Thread* thread = Thread::FromManagedThread(soa, java_thread); in Thread_isInterrupted()
61 Thread::CreateNativeThread(env, java_thread, stack_size, daemon == JNI_TRUE); in Thread_nativeCreate()
76 Thread* thread = Thread::FromManagedThread(soa, java_thread); in Thread_nativeGetStatus()
122 Thread* thread = soa.Self(); in Thread_holdsLock()
129 Thread* thread = Thread::FromManagedThread(soa, java_thread); in Thread_interrupt0()
150 Thread* thread = thread_list->SuspendThreadByPeer(peer, in Thread_setNativeName()
175 Thread* thread = Thread::FromManagedThread(soa, java_thread); in Thread_setPriority0()
184 Monitor::Wait(Thread::Current(), lock.Ptr(), ms, ns, true, kSleeping); in Thread_sleep()
198 FAST_NATIVE_METHOD(Thread, currentThread, "()Ljava/lang/Thread;"),
199 FAST_NATIVE_METHOD(Thread, interrupted, "()Z"),
[all …]
/art/test/1941-dispose-stress/src/art/
DTest1941.java41 public static void notifySingleStep(Thread thr, Executable e, long loc) { in notifySingleStep()
47 while (!Thread.interrupted()) { in LoopAllocFreeEnv()
51 Thread.yield(); in LoopAllocFreeEnv()
58 public static native void setTracingOn(Thread thr, boolean enable); in setTracingOn()
62 Thread thr = new Thread(() -> { LoopAllocFreeEnv(sem); }, "LoopNative"); in run()
68 "notifySingleStep", Thread.class, Executable.class, Long.TYPE), in run()
70 setTracingOn(Thread.currentThread(), true); in run()
76 setTracingOn(Thread.currentThread(), false); in run()
/art/runtime/entrypoints/quick/
Dquick_entrypoints.h28 Thread::QuickEntryPointOffset<ptr_size>(OFFSETOF_MEMBER(QuickEntryPoints, x))
42 class Thread; variable
56 extern uint32_t JniMethodStart(Thread* self) NO_THREAD_SAFETY_ANALYSIS HOT_ATTR;
57 extern uint32_t JniMethodFastStart(Thread* self) NO_THREAD_SAFETY_ANALYSIS HOT_ATTR;
58 extern uint32_t JniMethodStartSynchronized(jobject to_lock, Thread* self)
60 extern void JniMethodEnd(uint32_t saved_local_ref_cookie, Thread* self)
62 extern void JniMethodFastEnd(uint32_t saved_local_ref_cookie, Thread* self)
65 Thread* self)
68 Thread* self)
72 Thread* self)
[all …]
/art/test/1936-thread-end-events/src/art/
DTest1936.java22 public static void NotifyThreadEnd(Thread me) { in NotifyThreadEnd()
29 Thread me = Thread.currentThread(); in NotifyMethodEntry()
40 private static void setupTracing(Thread target) throws Exception { in setupTracing()
50 Test1936.class.getDeclaredMethod("NotifyThreadEnd", Thread.class), in setupTracing()
56 Thread t = new Thread(() -> { in run()
58 setupTracing(Thread.currentThread()); in run()

12345678910>>...33