Lines Matching refs:threads
60 // Whether we should try to dump the native stack of unattached threads. See commit ed8b723 for
76 // Detach the current thread if necessary. If we failed to start, there might not be any threads.
89 // Disable GC and wait for GC to complete in case there are still daemon threads doing
226 // A backtrace map, so that all threads use a shared info and don't reacquire/parse separately.
235 os << "DALVIK THREADS (" << list_.size() << "):\n";
270 // Unlike suspending all threads where we can wait to acquire the mutator_lock_, suspending an
290 // Call a checkpoint function for each thread, threads which are suspend get their checkpoint
317 // Run the checkpoint on ourself while we wait for threads to suspend.
320 // Run the checkpoint on the suspended threads.
351 // Imitate ResumeAll, threads may be waiting on Thread::resume_cond_ since we raised their
361 // threads. Returns the number of successful requests.
384 // Return the number of threads that will run the checkpoint function.
389 // from-space to to-space refs. Used to synchronize threads at a point
411 // Resume runnable threads.
422 // Set the flip function for both runnable and suspended threads
425 // runnable/suspended thread before a runnable threads runs it
439 // Run the closure on the other threads and let them resume.
452 // Resume other threads.
468 VLOG(threads) << *self << " SuspendAll for " << cause << " starting...";
470 VLOG(threads
473 ScopedTrace trace("Suspending mutator threads");
477 // All threads are known to have suspended (but a thread may still own the mutator lock)
500 LOG(WARNING) << "Suspending all threads took: " << PrettyDuration(suspend_time);
504 // Debug check that all threads are suspended.
508 ATRACE_BEGIN((std::string("Mutator threads suspended for ") + cause).c_str());
511 VLOG(threads) << *self << " SuspendAll complete";
513 VLOG(threads) << "Thread[null] SuspendAll complete";
517 // Ensures all threads running Java suspend and that those not running Java don't start.
532 // First request that all threads suspend, then wait for them to suspend before
534 // 1. Threads cannot be deleted while they are suspended or have a suspend-
536 // 2. When threads are created, they are created in a suspended state (actually
540 // The atomic counter for number of threads that need to pass the barrier.
552 // Update global suspend all state for attaching threads.
562 VLOG(threads) << "requesting thread suspend: " << *thread;
573 // This is very unlikely to happen since more than kMaxSuspendBarriers threads need to
593 // Wait for the barrier to be passed by all runnable threads. This wait
631 VLOG(threads) << *self << " ResumeAll starting";
633 VLOG(threads) << "Thread[null] ResumeAll starting";
638 ScopedTrace trace("Resuming mutator threads");
641 // Debug check that all threads are suspended.
651 // Update global suspend all state for attaching threads.
653 // Decrement the suspend counts for all threads.
661 // Broadcast a notification to all suspended threads, some or all of
664 VLOG(threads) << *self << " ResumeAll waking others";
666 VLOG(threads) << "Thread[null] ResumeAll waking others";
672 VLOG(threads) << *self << " ResumeAll complete";
674 VLOG(threads) << "Thread[null] ResumeAll complete";
684 VLOG(threads) << "Resume(" << reinterpret_cast<void*>(thread) << ") starting..."
694 // We only expect threads within the thread-list to have been suspended otherwise we can't
695 // stop such threads from delete-ing themselves.
704 VLOG(threads) << "Resume(" << reinterpret_cast<void*>(thread) << ") waking others";
709 VLOG(threads) << "Resume(" << reinterpret_cast<void*>(thread) << ") complete";
738 VLOG(threads) << "SuspendThreadByPeer starting";
745 // than request thread suspension, to avoid potential cycles in threads requesting each other
763 VLOG(threads) << "SuspendThreadByPeer failed for unattached thread: "
767 VLOG(threads) << "SuspendThreadByPeer found thread: " << *thread;
794 VLOG(threads) << "SuspendThreadByPeer thread suspended: " << *thread;
821 VLOG(threads) << "SuspendThreadByPeer waiting to allow thread chance to suspend";
844 VLOG(threads) << "SuspendThreadByThreadId starting";
850 // than request thread suspension, to avoid potential cycles in threads requesting each other
868 VLOG(threads) << "SuspendThreadByThreadId found thread: " << *thread;
901 VLOG(threads) << "SuspendThreadByThreadId thread suspended: " << *thread;
921 VLOG(threads) << "SuspendThreadByThreadId waiting to allow thread chance to suspend";
940 VLOG(threads) << *self << " SuspendAllForDebugger starting...";
943 // Block on the mutator lock until all Runnable threads release their share of access then
959 // Thread 1 fails assertion that all threads are suspended due to thread 2 being in a runnable
963 VLOG(threads) << *self << " SuspendAllForDebugger complete";
988 VLOG(threads) << *self << " self-suspending (debugger)";
994 VLOG(threads) << *self << " not self-suspending because debugger detached during invoke";
1015 // can happen when we suspend then resume all threads to
1029 VLOG(threads) << *self << " self-reviving (debugger)";
1036 VLOG(threads) << *self << " ResumeAllForDebugger starting...";
1038 // Threads can't resume if we exclusively hold the mutator lock.
1045 // Update global suspend all state for attaching threads.
1051 // We've been asked to resume all threads without being asked to
1053 // to resume some suspended threads (with suspend count == 1)
1056 LOG(WARNING) << "Debugger attempted to resume all threads without "
1068 VLOG(threads) << "requesting thread resume: " << *thread;
1079 VLOG(threads) << *self << " ResumeAllForDebugger complete";
1085 VLOG(threads) << *self << " UndoDebuggerSuspensions starting";
1090 // Update global suspend all state for attaching threads.
1093 // Update running threads.
1107 VLOG(threads) << "UndoDebuggerSuspensions(" << *self << ") complete";
1116 // No more threads can be born after we start to shutdown.
1122 // Also wait for any threads that are unregistering to finish. This is required so that no
1123 // threads access the thread list after it is deleted. TODO: This may not work for user daemon
1124 // threads since they could unregister at the wrong time.
1150 // This is only run after all non-daemon threads have exited, so the remainder should all be
1165 // for daemon threads to be in a blocked state.
1170 // Give the threads a chance to suspend, complaining if they're slow.
1190 LOG(WARNING) << "timed out suspending all daemon threads";
1196 if (VLOG_IS_ON(threads)) {
1233 VLOG(threads) << "ThreadList::Unregister() " << *self;
1242 // causes the threads to join. It is important to do this after incrementing unregistering_count_
1243 // since we want the runtime to wait for the daemon threads to exit before deleting the thread
1275 // temporarily have multiple threads with the same thread id. When this occurs, it causes