/libcore/dalvik/src/main/java/dalvik/system/profiler/ |
H A D | ThreadSampler.java | 23 * between portable and VM specific implementations of thread 34 * Return a stack trace for the current thread limited by the 36 * return null if no sample is availble for the thread, which may 37 * happen in cases such as thread termination. The resulting array 43 public StackTraceElement[] getStackTrace(Thread thread); argument
|
H A D | SamplingProfiler.java | 38 * SamplingProfiler}. It samples the current thread's stack to a depth 94 * Real hprof output examples don't start the thread and trace 105 * thread start and end events. 120 * be thread safe, have a single mutable instance would need to be 127 * StackTraceElement} array for a given thread. The array is 135 * thread collector. 147 * @param threadSet The thread set specifies which threads to 323 * restarted, there is no thread safe way to access the data. 335 * At every sample time, it asks the thread set for the set 336 * of threads to sample. It maintains a history of thread creatio 394 recordStackTrace(Thread thread, StackTraceElement[] stackFrames) argument 452 addStartThread(Thread thread) argument 478 addEndThread(Thread thread) argument [all...] |
H A D | PortableThreadSampler.java | 33 @Override public StackTraceElement[] getStackTrace(Thread thread) { argument 34 StackTraceElement[] stackFrames = thread.getStackTrace();
|
H A D | DalvikThreadSampler.java | 39 @Override public StackTraceElement[] getStackTrace(Thread thread) { argument 40 int count = VMStack.fillStackTraceElements(thread, mutableStackTraceElements[depth]);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
H A D | LoadLocaleProviderTestHelper.java | 29 Thread thread = new Thread(this); 30 thread.setContextClassLoader(loader); 31 thread.start(); 32 thread.join();
|
/libcore/luni/src/test/java/libcore/java/io/ |
H A D | InterruptedStreamTest.java | 40 * Test that interrupting a thread blocked on I/O causes that thread to throw 121 Thread thread = interruptMeLater(); 127 confirmInterrupted(thread); 132 Thread thread = interruptMeLater(); 138 confirmInterrupted(thread); 143 Thread thread = interruptMeLater(); 149 confirmInterrupted(thread); 154 Thread thread = interruptMeLater(); 162 confirmInterrupted(thread); 208 confirmInterrupted(Thread thread) argument [all...] |
/libcore/luni/src/test/java/libcore/java/util/logging/ |
H A D | OldLogRecordTest.java | 52 // Create and start the thread 53 MockThread thread = new MockThread(); 54 thread.start(); 56 thread.join(); 70 assertTrue(lr.getThreadID() != thread.lr.getThreadID()); 72 assertTrue(thread.lr.getThreadID() != thread2.lr.getThreadID()); 76 public LogRecord lr = null; //will be update by the thread 83 lr = new LogRecord(Level.CONFIG, "msg thread");
|
/libcore/luni/src/test/java/libcore/java/lang/ |
H A D | OldInheritableThreadLocalTest.java | 38 Thread thread = new Thread() { 43 thread.start(); 44 thread.join();
|
H A D | OldThreadTest.java | 52 assertTrue("Constructed incorrect thread", (st.getThreadGroup() == tg) 150 fail("setDaemon() must throw exception for started thread"); 157 Thread thread = new Thread() { 167 thread.start(); 169 return thread; 391 Thread thread = launchFiveSecondDummyThread(); 400 thread.stop(); 418 Thread thread = new Thread() { 428 thread.start(); 436 thread [all...] |
H A D | OldThreadGroupTest.java | 95 ThreadGroup tg = new ThreadGroup("thread suspension"); 121 assertTrue("Current thread must be in enumeration of threads", 139 for(MyThread thread : newThreads) { 140 thread.start(); 153 for(MyThread thread : newThreads) { 154 thread.interrupt(); 259 assertFalse("Incorrect state of thread", interrupted); 261 assertFalse("Incorrect state of thread", interrupted); 267 assertTrue("Incorrect state of thread", interrupted); 286 Thread thread [all...] |
/libcore/libart/src/main/java/java/lang/ |
H A D | ThreadGroup.java | 28 * This class is obsolete. See <i>Effective Java</i> Item 73, "Avoid thread groups" for details. 73 * will be child of the {@code ThreadGroup} to which the calling thread belongs. 117 * Returns the number of running {@code Thread}s which are children of this thread group, 125 for (Thread thread : threads) { 126 if (thread.isAlive()) { 157 * Adds a {@code ThreadGroup} to this thread group. 194 * Destroys this thread group and recursively all its subgroups. It is only legal 197 * or thread groups in it). 199 * @throws IllegalThreadStateException if this thread group or any of its 235 * Auxiliary method that destroys this thread grou 703 addThread(Thread thread) argument 715 removeThread(Thread thread) argument [all...] |
H A D | Daemons.java | 60 private Thread thread; field in class:Daemons.Daemon 63 if (thread != null) { 66 thread = new Thread(ThreadGroup.systemThreadGroup, this, getClass().getSimpleName()); 67 thread.setDaemon(true); 68 thread.start(); 74 * Returns true while the current thread should continue to run; false 78 return thread != null; 82 if (thread == null) { 85 thread.interrupt(); 89 * Waits for the runtime thread t [all...] |
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/ |
H A D | TestThread.java | 34 Thread thread = null; 38 thread = new Thread(this); 39 thread.start(); 41 thread.join();
|
H A D | CipherThread.java | 75 Thread thread = null; 83 thread = new Thread(this); 84 thread.start(); 86 thread.join();
|
/libcore/luni/src/test/java/libcore/java/nio/channels/ |
H A D | OldServerSocketChannelTest.java | 97 MyThread thread = new MyThread(); 98 thread.start(); 101 thread.interrupt(); 105 if (thread.errMsg != null) { 106 fail(thread.errMsg);
|
/libcore/luni/src/main/java/java/util/concurrent/locks/ |
H A D | LockSupport.java | 11 * Basic thread blocking primitives for creating locks and other 14 * <p>This class associates, with each thread that uses it, a permit 26 * between one thread invoking {@code park} and another thread trying 29 * thread was interrupted, and timeout versions are supported. The 39 * the thread is blocked to permit monitoring and diagnostic tools to 56 * permit is associated with each thread, any intermediary uses of 111 * Makes available the permit for the given thread, if it 112 * was not already available. If the thread was blocked on 116 * thread ha 121 unpark(Thread thread) argument [all...] |
H A D | AbstractQueuedLongSynchronizer.java | 57 * information about a thread in the predecessor of its node. A 58 * "status" field in each node keeps track of whether a thread 62 * thread. The status field does NOT control whether threads are 63 * granted locks etc though. A thread may try to acquire if it is 66 * contender thread may need to rewait. 92 * The thread id for each node is kept in its own node, so a 94 * next link to determine which thread it is. Determination of 135 /** waitStatus value to indicate thread has cancelled */ 137 /** waitStatus value to indicate successor's thread needs unparking */ 139 /** waitStatus value to indicate thread i 215 volatile Thread thread; field in class:AbstractQueuedLongSynchronizer.Node 254 Node(Thread thread, Node mode) argument 259 Node(Thread thread, int waitStatus) argument 1190 isQueued(Thread thread) argument [all...] |
H A D | AbstractQueuedSynchronizer.java | 48 * waiting thread (if one exists) must also determine whether it can 59 * held with respect to the current thread, method {@link #release} 76 * thread queues. Typical subclasses requiring serializability will 97 * must be internally thread-safe, and should in general be short and 103 * AbstractOwnableSynchronizer} useful to keep track of the thread 115 * <em>enqueue thread if it is not already queued</em>; 116 * <em>possibly block current thread</em>; 121 * <em>unblock the first queued thread</em>; 127 * enqueuing, a newly acquiring thread may <em>barge</em> ahead of 133 * #getFirstQueuedThread} does not return the current thread 445 volatile Thread thread; field in class:AbstractQueuedSynchronizer.Node 484 Node(Thread thread, Node mode) argument 489 Node(Thread thread, int waitStatus) argument 1420 isQueued(Thread thread) argument [all...] |
/libcore/luni/src/test/java/libcore/java/net/ |
H A D | OldCookieHandlerTest.java | 61 TestThread thread = new TestThread(); 63 thread.start(); 65 thread.join();
|
H A D | OldDatagramPacketTest.java | 32 Thread thread = new Thread(new Runnable() { 40 System.out.println("thread exception: " + e); 44 thread.start();
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
H A D | ThreadGroupTest.java | 181 Thread noOp = new Thread(testRoot, null, "no-op thread") { 188 // Wait for the no-op thread to run inside daemon ThreadGroup 197 assertTrue("Daemon group should have been destroyed already when last thread died", passed); 200 noOp = new Thread(testRoot, null, "no-op thread") { 211 // Has to execute the next lines in an interval < the sleep interval of the no-op thread 221 // But after the thread dies, we have to be able to destroy the thread group 284 // To maintain the invariant that a thread in the Vector is parent 511 Thread thread = new Thread(testRoot, null, "suicidal thread") { 762 waitForThreadToDieUninterrupted(Thread thread) argument 775 private Thread thread; field in class:ThreadGroupTest.TestThreadDefaultUncaughtExceptionHandler 778 uncaughtException(Thread thread, Throwable ex) argument 784 assertWasCalled(Thread thread, Throwable ex) argument [all...] |
H A D | ProcessManagerTest.java | 31 Thread thread = null; field in class:ProcessManagerTest 60 thread = new Thread() { 85 thread.interrupt(); 88 thread.start(); 101 thread.interrupt(); 138 Thread thread = new Thread() { 153 thread.setDaemon(true); 154 thread.start();
|
/libcore/luni/src/main/java/java/util/concurrent/ |
H A D | FutureTask.java | 76 /** The thread running the callable; CASed during run() */ 326 volatile Thread thread; field in class:FutureTask.WaitNode 328 WaitNode() { thread = Thread.currentThread(); } 340 Thread t = q.thread; 342 q.thread = null; 381 q.thread = null; 416 node.thread = null; 421 if (q.thread != null) 425 if (pred.thread == null) // check for race
|
H A D | Phaser.java | 65 * waiting thread is interrupted. Interruptible and timeout 481 * parent, and initial phase number 0. Any thread using this 718 * @throws InterruptedException if thread interrupted while waiting 753 * @throws InterruptedException if thread interrupted while waiting 946 Thread t; // its thread 951 (t = q.thread) != null) { 952 q.thread = null; 973 if (q == null || ((t = q.thread) != null && q.phase == p)) 976 q.thread = null; 990 * avoid it when threads regularly arrive: When a thread i 1068 volatile Thread thread; // nulled to cancel wait field in class:Phaser.QNode [all...] |
/libcore/jsr166-tests/src/test/java/jsr166/ |
H A D | JSR166TestCase.java | 57 * them. These methods are used to clear and check for thread 64 * small amounts of computation (creating a thread, calling a few 162 * harness thread, triggering a test case failure. Only the first 177 * Triggers test case failure if any thread assertions have failed, 178 * by rethrowing, in the test harness thread, any exception recorded 181 * Triggers test case failure if interrupt status is set in the main thread. 201 throw new AssertionFailedError("interrupt status set in main thread"); 213 Thread thread = survivors[i]; 214 String name = thread.getName(); 216 // give thread som 401 assertThreadStaysAlive(Thread thread) argument 408 assertThreadStaysAlive(Thread thread, long millis) argument 597 waitForThreadToEnterWaitState(Thread thread, long timeoutMillis) argument 619 waitForThreadToEnterWaitState(Thread thread) argument [all...] |