Lines Matching defs:thread
33 #include "thread-inl.h"
38 The event add/remove stuff usually happens from the debugger thread,
40 result of an event in an arbitrary thread (e.g. an event with a "count"
44 Event posting can happen from any thread. The JDWP thread will not usually
46 to be loaded, the ClassPrepare event will come from the JDWP thread.
50 For example, a thread could send an "I hit a breakpoint and am suspending
52 debugger's response ("not interested, resume thread") arrives and is
53 processed. We try to resume a thread that hasn't yet suspended.
56 for the event thread to suspend itself (and, potentially, all other threads)
63 Event thread:
69 JDWP thread:
78 - thread A and thread B exit near-simultaneously, and post thread-death
80 - thread A gets the event token, thread B sits and waits for it
81 - thread A wants to suspend all other threads, but thread B is waiting
84 So we need to mark thread B in such a way that thread A doesn't wait for it.
88 will cause thread B to suspend (remember, thread A's global suspend is
90 holding the event token is very bad, because it prevents the JDWP thread
113 ModBasket() : pLoc(nullptr), thread(nullptr), locationClass(nullptr), exceptionClass(nullptr),
118 Thread* thread; /* ThreadOnly */
167 * single-step request on a thread that doesn't exist, the event will
215 MutexLock mu(Thread::Current(), event_list_lock_);
304 MutexLock mu(Thread::Current(), event_list_lock_);
331 MutexLock mu(Thread::Current(), event_list_lock_);
469 if (!Dbg::MatchThread(pMod->threadOnly.threadId, basket.thread)) {
509 if (!Dbg::MatchThread(pMod->step.threadId, basket.thread)) {
570 * SP_ALL - suspend everybody except JDWP support thread
586 LOG(INFO) << "NOTE: SuspendByPolicy not suspending JDWP thread";
597 * The JDWP thread has told us (and possibly all other threads) to
617 Thread* self = Thread::Current();
634 * thread.
636 * We look at the "invoke_needed" flag in the per-thread DebugInvokeReq
645 * We need the JDWP thread to hold off on doing stuff while we post an
649 * current thread operation to complete.
651 * This could go to sleep waiting for another thread, so it's important
652 * that the thread be marked as VMWAIT before calling here.
658 Thread* self = Thread::Current();
662 * If another thread is already doing stuff, wait for it. This can
689 Thread* self = Thread::Current();
740 * This should be sent "before the main thread is started and before
741 * any application code has been executed". The thread ID in the message
742 * must be for the main thread.
756 MutexLock mu(Thread::Current(), event_list_lock_); // probably don't need this here
790 VLOG(jdwp) << StringPrintf(" thread=%#" PRIx64, thread_id) << " " << thread_name;
832 basket.thread = Thread::Current();
841 if (basket.thread == GetDebugThread()) {
842 VLOG(jdwp) << "Ignoring location event in JDWP thread";
867 MutexLock mu(Thread::Current(), event_list_lock_);
886 thread_id = Dbg::GetThreadId(basket.thread);
912 MutexLock mu(Thread::Current(), event_list_lock_);
935 basket.thread = Thread::Current();
951 MutexLock mu(Thread::Current(), event_list_lock_);
962 thread_id = Dbg::GetThreadId(basket.thread);
991 Thread::Current());
1012 MutexLock mu(Thread::Current(), event_list_lock_);
1024 * A thread is starting or stopping.
1029 bool JdwpState::PostThreadChange(Thread* thread, bool start) {
1030 CHECK_EQ(thread, Thread::Current());
1036 LOG(WARNING) << "Not posting thread change during invoke";
1041 basket.thread = thread;
1051 MutexLock mu(Thread::Current(), event_list_lock_);
1063 thread_id = Dbg::GetThreadId(basket.thread);
1082 MutexLock mu(Thread::Current(), event_list_lock_);
1141 basket.thread = Thread::Current();
1160 MutexLock mu(Thread::Current(), event_list_lock_);
1167 thread_id = Dbg::GetThreadId(basket.thread);
1206 MutexLock mu(Thread::Current(), event_list_lock_);
1229 basket.thread = Thread::Current();
1245 MutexLock mu(Thread::Current(), event_list_lock_);
1252 thread_id = Dbg::GetThreadId(basket.thread);
1272 * JDWP says that, for a class prep in the debugger thread, we
1273 * should set thread to null and if any threads were supposed
1276 VLOG(jdwp) << " NOTE: class prepare in debugger thread!";
1299 MutexLock mu(Thread::Current(), event_list_lock_);
1351 Thread* self = Thread::Current();