summaryrefslogtreecommitdiffstats
path: root/vm/compiler
diff options
context:
space:
mode:
authorBill Buzbee <buzbee@google.com>2009-11-22 12:45:30 -0800
committerBill Buzbee <buzbee@google.com>2009-11-23 06:26:48 -0800
commitf9f33287693f9f9aa44318036b8aab627bd21a32 (patch)
tree051e2d4929898d060ef9c81829bdd8333ec46fc5 /vm/compiler
parent5d90c20bd7903d7bba966b224e576bf137bf8b4b (diff)
downloadandroid_dalvik-f9f33287693f9f9aa44318036b8aab627bd21a32.tar.gz
android_dalvik-f9f33287693f9f9aa44318036b8aab627bd21a32.tar.bz2
android_dalvik-f9f33287693f9f9aa44318036b8aab627bd21a32.zip
Jit: Misc fixes, move_exception, blocking mode, self-cosim
OP_MOVE_EXCEPTION handler was neglecting to reset. Blocking mode was failing to signal empty queue in some cases Self-cosim was including operations in traces that can't be done twice Added OP_MOVE_EXCEPTION to self cosim's no-replay ops (it has side effects) Restored threshold of 1 to self-cosim (now able to boot device with self-cosim) When threshold < 6, disable 2nd-level translation filter
Diffstat (limited to 'vm/compiler')
-rw-r--r--vm/compiler/Compiler.c3
-rw-r--r--vm/compiler/codegen/arm/CodegenDriver.c15
2 files changed, 6 insertions, 12 deletions
diff --git a/vm/compiler/Compiler.c b/vm/compiler/Compiler.c
index b53ebf8df..5787378d2 100644
--- a/vm/compiler/Compiler.c
+++ b/vm/compiler/Compiler.c
@@ -38,6 +38,9 @@ static CompilerWorkOrder workDequeue(void)
gDvmJit.compilerWorkDequeueIndex = 0;
}
gDvmJit.compilerQueueLength--;
+ if (gDvmJit.compilerQueueLength == 0) {
+ int cc = pthread_cond_signal(&gDvmJit.compilerQueueEmpty);
+ }
/* Remember the high water mark of the queue length */
if (gDvmJit.compilerQueueLength > gDvmJit.compilerMaxQueued)
diff --git a/vm/compiler/codegen/arm/CodegenDriver.c b/vm/compiler/codegen/arm/CodegenDriver.c
index 857536f48..35460ed01 100644
--- a/vm/compiler/codegen/arm/CodegenDriver.c
+++ b/vm/compiler/codegen/arm/CodegenDriver.c
@@ -208,13 +208,6 @@ static bool genConversionPortable(CompilationUnit *cUnit, MIR *mir)
}
#if defined(WITH_SELF_VERIFICATION)
-/* Prevent certain opcodes from being jitted */
-static inline bool selfVerificationPuntOps(OpCode op)
-{
- return (op == OP_MONITOR_ENTER || op == OP_MONITOR_EXIT ||
- op == OP_NEW_INSTANCE || op == OP_NEW_ARRAY);
-}
-
/*
* The following are used to keep compiled loads and stores from modifying
* memory during self verification mode.
@@ -2048,10 +2041,13 @@ static bool handleFmt11x(CompilationUnit *cUnit, MIR *mir)
int offset = offsetof(InterpState, self);
int exOffset = offsetof(Thread, exception);
int selfReg = allocTemp(cUnit);
+ int resetReg = allocTemp(cUnit);
RegLocation rlDest = getDestLoc(cUnit, mir, 0);
rlResult = evalLoc(cUnit, rlDest, kCoreReg, true);
loadWordDisp(cUnit, rGLUE, offset, selfReg);
+ loadConstant(cUnit, resetReg, 0);
loadWordDisp(cUnit, selfReg, exOffset, rlResult.lowReg);
+ storeWordDisp(cUnit, selfReg, exOffset, resetReg);
storeValue(cUnit, rlDest, rlResult);
break;
}
@@ -3882,11 +3878,6 @@ void dvmCompilerMIR2LIR(CompilationUnit *cUnit)
((gDvmJit.opList[dalvikOpCode >> 3] &
(1 << (dalvikOpCode & 0x7))) !=
0);
-#if defined(WITH_SELF_VERIFICATION)
- /* Punt on opcodes we can't replay */
- if (selfVerificationPuntOps(dalvikOpCode))
- singleStepMe = true;
-#endif
if (singleStepMe || cUnit->allSingleStep) {
notHandled = false;
genInterpSingleStep(cUnit, mir);