Lines Matching refs:thread
138 Thread* self = dvmThreadSelf();
412 * This will only be run from the JDWP thread, and it will happen while
430 * This can be called from the JDWP thread (because the debugger has
431 * cancelled the breakpoint) or from an event thread (because it's a
497 * We set up some initial values based on the thread's current state. This
498 * won't work well if the thread is running, so it's up to the caller to
501 * This is only called from the JDWP thread.
503 bool dvmAddSingleStep(Thread* thread, int size, int depth)
507 if (pCtrl->active && thread != pCtrl->thread) {
509 pCtrl->thread, thread);
513 * suspend a thread in Object.wait, hit the single-step key, then
514 * switch to another thread and do the same thing again.
515 * The first thread's step is still pending.
517 * TODO: consider making single-step per-thread. Adds to the
524 pCtrl->thread = thread;
543 for (fp = thread->interpSave.curFrame; fp != NULL;
556 thread->threadId);
592 dvmComputeVagueFrameDepth(thread, thread->interpSave.curFrame);
595 LOGV("##### step init: thread=%p meth=%p '%s' line=%d frameDepth=%d depth=%s size=%s",
596 pCtrl->thread, pCtrl->method, pCtrl->method->name,
607 void dvmClearSingleStep(Thread* thread)
609 UNUSED_PARAMETER(thread);
618 void dvmReportExceptionThrow(Thread* self, Object* exception)
645 void dvmReportInvoke(Thread* self, const Method* methodToCall)
657 void dvmReportPreNativeInvoke(const Method* methodToCall, Thread* self, u4* fp)
680 void dvmReportPostNativeInvoke(const Method* methodToCall, Thread* self, u4* fp)
696 void dvmReportReturn(Thread* self)
722 * - We may want to check for debugger-induced thread suspensions on
732 Thread* self)
763 * see if we're that thread and we've reached a step point.
766 if (pCtrl->active && pCtrl->thread == self) {
911 void dvmInterpCheckTrackedRefs(Thread* self, const Method* method,
1470 * Update interpBreak for a single thread.
1472 void updateInterpBreak(Thread* thread, ExecutionSubModes subMode, bool enable)
1476 oldValue = newValue = thread->interpBreak;
1487 thread->altHandlerTable : thread->mainHandlerTable;
1489 &thread->interpBreak.all) != 0);
1497 Thread* self = dvmThreadSelf();
1498 Thread* thread;
1501 for (thread = gDvm.threadList; thread != NULL; thread = thread->next) {
1502 updateInterpBreak(thread, subMode, enable);
1508 * Update the normal and debugger suspend counts for a thread.
1516 void dvmAddToSuspendCounts(Thread* thread, int delta, int dbgDelta)
1518 thread->suspendCount += delta;
1519 thread->dbgSuspendCount += dbgDelta;
1520 updateInterpBreak(thread, kSubModeSuspendPending,
1521 (thread->suspendCount != 0));
1527 void dvmDisableSubMode(Thread* thread, ExecutionSubModes subMode)
1529 updateInterpBreak(thread, subMode, false);
1532 void dvmEnableSubMode(Thread* thread, ExecutionSubModes subMode)
1534 updateInterpBreak(thread, subMode, true);
1548 * Do a sanity check on interpreter state saved to Thread.
1555 Thread* self = dvmThreadSelf();
1556 Thread* thread;
1565 for (thread = gDvm.threadList; thread != NULL; thread = thread->next) {
1566 if (subMode != thread->interpBreak.ctl.subMode) {
1568 subMode,thread->interpBreak.ctl.subMode,thread->threadId);
1570 if (breakFlags != thread->interpBreak.ctl.breakFlags) {
1572 breakFlags,thread->interpBreak.ctl.breakFlags,thread->threadId);
1574 if (handlerTable != thread->interpBreak.ctl.curHandlerTable) {
1576 (int)handlerTable,(int)thread->interpBreak.ctl.curHandlerTable,
1577 thread->threadId);
1580 if (thread->pJitProfTable != gDvmJit.pProfTable) {
1582 (int)thread->pJitProfTable,(int)gDvmJit.pProfTable,
1583 thread->threadId);
1585 if (thread->jitThreshold != gDvmJit.threshold) {
1587 (int)thread->jitThreshold,(int)gDvmJit.threshold,
1588 thread->threadId);
1596 * Arm a safepoint callback for a thread. If funct is null,
1602 void dvmArmSafePointCallback(Thread* thread, SafePointCallback funct,
1605 dvmLockMutex(&thread->callbackMutex);
1606 if ((funct == NULL) || (thread->callback == NULL)) {
1607 thread->callback = funct;
1608 thread->callbackArg = arg;
1610 dvmEnableSubMode(thread, kSubModeCallbackPending);
1612 dvmDisableSubMode(thread, kSubModeCallbackPending);
1616 if ((funct != thread->callback) ||
1617 (arg != thread->callbackArg)) {
1619 LOGE("ArmSafePointCallback failed, thread %d", thread->threadId);
1620 dvmUnlockMutex(&thread->callbackMutex);
1624 dvmUnlockMutex(&thread->callbackMutex);
1628 * One-time initialization at thread creation. Here we initialize
1631 void dvmInitInterpreterState(Thread* self)
1666 * For a newly-created thread, we need to start off with interpBreak
1668 * thread list lock.
1670 void dvmInitializeInterpBreak(Thread* thread)
1673 dvmEnableSubMode(thread, kSubModeInstCounting);
1676 dvmEnableSubMode(thread, kSubModeMethodTrace);
1679 dvmEnableSubMode(thread, kSubModeEmulatorTrace);
1682 dvmEnableSubMode(thread, kSubModeDebuggerActive);
1686 dvmEnableSubMode(thread, kSubModeCheckAlways);
1694 * prior to call, but Thread copy of dPC & fp are not current.
1696 void dvmCheckBefore(const u2 *pc, u4 *fp, Thread* self)
1745 // Update Thread structure
1770 * for thread-safety; if we need that we should make this
1771 * thread-local and merge counts into the global area when threads
1881 void dvmInterpret(Thread* self, const Method* method, JValue* pResult)
1953 typedef void (*Interpreter)(Thread*);