/*
* Compute some stats on loaded classes.
*/
- int numLoadedClasses;
- int numDeclaredMethods;
- int numDeclaredInstFields;
- int numDeclaredStaticFields;
+ int numLoadedClasses;
+ int numDeclaredMethods;
+ int numDeclaredInstFields;
+ int numDeclaredStaticFields;
+
+ /* when using a native debugger, set this to suppress watchdog timers */
+ bool nativeDebuggerActive;
/*
* JDWP debugger support.
}
/* Make sure that the HeapWorker thread hasn't spent an inordinate
- * amount of time inside interpreted a finalizer.
+ * amount of time inside a finalizer.
*
* Aborts the VM if the thread appears to be wedged.
*
u8 nowCpu = dvmGetOtherThreadCpuTimeUsec(gDvm.heapWorkerHandle);
u8 deltaCpu = nowCpu - heapWorkerInterpCpuStartTime;
- if (delta > HEAP_WORKER_WATCHDOG_TIMEOUT && gDvm.debuggerActive) {
+ if (delta > HEAP_WORKER_WATCHDOG_TIMEOUT &&
+ (gDvm.debuggerActive || gDvm.nativeDebuggerActive))
+ {
/*
* Debugger suspension can block the thread indefinitely. For
* best results we should reset this explicitly whenever the
- * HeapWorker thread is resumed. Ignoring the yelp isn't
- * quite right but will do for a quick fix.
+ * HeapWorker thread is resumed. Unfortunately this is also
+ * affected by native debuggers, and we have no visibility
+ * into how they're manipulating us. So, we ignore the
+ * watchdog and just reset the timer.
*/
LOGI("Debugger is attached -- suppressing HeapWorker watchdog\n");
heapWorkerInterpStartTime = now; /* reset timer */