diff options
author | buzbee <buzbee@google.com> | 2011-03-29 10:26:07 -0700 |
---|---|---|
committer | buzbee <buzbee@google.com> | 2011-03-30 14:30:15 -0700 |
commit | 99e3e6e72e3471eb85fc2e405866392b01c080fe (patch) | |
tree | ca2d6ae81de4eb020c37af29d861cbb54ca2fd35 /vm/compiler | |
parent | 4b17a1da633822d7651fe854aece7ea93c1edf70 (diff) | |
download | android_dalvik-99e3e6e72e3471eb85fc2e405866392b01c080fe.tar.gz android_dalvik-99e3e6e72e3471eb85fc2e405866392b01c080fe.tar.bz2 android_dalvik-99e3e6e72e3471eb85fc2e405866392b01c080fe.zip |
Fix interpreter debug attach
Fix a few miscellaneous bugs from the interpreter restructuring that were
causing a segfault on debugger attach.
Added a sanity checking routine for debugging.
Fixed a problem in which the JIT's threshold and on/off switch
wouldn't get initialized properly on thread creation.
Renamed dvmCompilerStateRefresh() to dvmCompilerUpdateGlobalState() to
better reflect its function.
Change-Id: I5b8af1ce2175e3c6f53cda19dd8e052a5f355587
Diffstat (limited to 'vm/compiler')
-rw-r--r-- | vm/compiler/Compiler.c | 8 | ||||
-rw-r--r-- | vm/compiler/Compiler.h | 2 | ||||
-rw-r--r-- | vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.c | 2 | ||||
-rw-r--r-- | vm/compiler/codegen/arm/armv5te/ArchVariant.c | 2 | ||||
-rw-r--r-- | vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.c | 2 | ||||
-rw-r--r-- | vm/compiler/codegen/arm/armv7-a/ArchVariant.c | 2 | ||||
-rw-r--r-- | vm/compiler/codegen/x86/ia32/ArchVariant.c | 2 | ||||
-rw-r--r-- | vm/compiler/template/armv5te/TEMPLATE_MONITOR_ENTER_DEBUG.S | 2 | ||||
-rw-r--r-- | vm/compiler/template/out/CompilerTemplateAsm-armv5te-vfp.S | 2 | ||||
-rw-r--r-- | vm/compiler/template/out/CompilerTemplateAsm-armv5te.S | 2 | ||||
-rw-r--r-- | vm/compiler/template/out/CompilerTemplateAsm-armv7-a-neon.S | 2 | ||||
-rw-r--r-- | vm/compiler/template/out/CompilerTemplateAsm-armv7-a.S | 2 |
12 files changed, 15 insertions, 15 deletions
diff --git a/vm/compiler/Compiler.c b/vm/compiler/Compiler.c index a485ca546..dfa6589c0 100644 --- a/vm/compiler/Compiler.c +++ b/vm/compiler/Compiler.c @@ -458,7 +458,7 @@ static bool compilerThreadStartup(void) gDvmJit.pProfTable = dvmDebuggerOrProfilerActive() ? NULL : pJitProfTable; gDvmJit.pProfTableCopy = pJitProfTable; gDvmJit.pJitTraceProfCounters = pJitTraceProfCounters; - dvmJitUpdateState(); + dvmJitUpdateThreadStateAll(); dvmUnlockMutex(&gDvmJit.tableLock); /* Signal running threads to refresh their cached pJitTable pointers */ @@ -739,7 +739,7 @@ void dvmCompilerShutdown(void) /* Disable new translation requests */ gDvmJit.pProfTable = NULL; gDvmJit.pProfTableCopy = NULL; - dvmJitUpdateState(); + dvmJitUpdateThreadStateAll(); if (gDvm.verboseShutdown || gDvmJit.profileMode == kTraceProfilingContinuous) { @@ -774,7 +774,7 @@ void dvmCompilerShutdown(void) */ } -void dvmCompilerStateRefresh() +void dvmCompilerUpdateGlobalState() { bool jitActive; bool jitActivate; @@ -831,5 +831,5 @@ void dvmCompilerStateRefresh() if (needUnchain) dvmJitUnchainAll(); // Make sure all threads have current values - dvmJitUpdateState(); + dvmJitUpdateThreadStateAll(); } diff --git a/vm/compiler/Compiler.h b/vm/compiler/Compiler.h index 5d5036fbd..12add7539 100644 --- a/vm/compiler/Compiler.h +++ b/vm/compiler/Compiler.h @@ -233,7 +233,7 @@ void dvmCompilerDataFlowAnalysisDispatcher(struct CompilationUnit *cUnit, bool isIterative); void dvmCompilerMethodSSATransformation(struct CompilationUnit *cUnit); bool dvmCompilerBuildLoop(struct CompilationUnit *cUnit); -void dvmCompilerStateRefresh(void); +void dvmCompilerUpdateGlobalState(void); JitTraceDescription *dvmCopyTraceDescriptor(const u2 *pc, const struct JitEntry *desc); void *dvmCompilerGetInterpretTemplate(); diff --git a/vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.c b/vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.c index c1792eda1..3d8505221 100644 --- a/vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.c +++ b/vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.c @@ -84,7 +84,7 @@ bool dvmCompilerArchVariantInit(void) gDvmJit.disableOpt |= (1 << kMethodJit); // Make sure all threads have current values - dvmJitUpdateState(); + dvmJitUpdateThreadStateAll(); return true; } diff --git a/vm/compiler/codegen/arm/armv5te/ArchVariant.c b/vm/compiler/codegen/arm/armv5te/ArchVariant.c index 817b68a30..57a8c8a1d 100644 --- a/vm/compiler/codegen/arm/armv5te/ArchVariant.c +++ b/vm/compiler/codegen/arm/armv5te/ArchVariant.c @@ -84,7 +84,7 @@ bool dvmCompilerArchVariantInit(void) gDvmJit.disableOpt |= (1 << kMethodJit); // Make sure all threads have current values - dvmJitUpdateState(); + dvmJitUpdateThreadStateAll(); return true; } diff --git a/vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.c b/vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.c index ff8066277..59d7c95cd 100644 --- a/vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.c +++ b/vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.c @@ -79,7 +79,7 @@ bool dvmCompilerArchVariantInit(void) gDvmJit.disableOpt |= (1 << kMethodJit); // Make sure all threads have current values - dvmJitUpdateState(); + dvmJitUpdateThreadStateAll(); return true; } diff --git a/vm/compiler/codegen/arm/armv7-a/ArchVariant.c b/vm/compiler/codegen/arm/armv7-a/ArchVariant.c index ff8066277..59d7c95cd 100644 --- a/vm/compiler/codegen/arm/armv7-a/ArchVariant.c +++ b/vm/compiler/codegen/arm/armv7-a/ArchVariant.c @@ -79,7 +79,7 @@ bool dvmCompilerArchVariantInit(void) gDvmJit.disableOpt |= (1 << kMethodJit); // Make sure all threads have current values - dvmJitUpdateState(); + dvmJitUpdateThreadStateAll(); return true; } diff --git a/vm/compiler/codegen/x86/ia32/ArchVariant.c b/vm/compiler/codegen/x86/ia32/ArchVariant.c index 2abac8823..90f14a33a 100644 --- a/vm/compiler/codegen/x86/ia32/ArchVariant.c +++ b/vm/compiler/codegen/x86/ia32/ArchVariant.c @@ -78,7 +78,7 @@ bool dvmCompilerArchVariantInit(void) sizeof(struct JitToInterpEntries)) <= 128); // Make sure all threads have current values - dvmJitUpdateState(); + dvmJitUpdateThreadStateAll(); return true; } diff --git a/vm/compiler/template/armv5te/TEMPLATE_MONITOR_ENTER_DEBUG.S b/vm/compiler/template/armv5te/TEMPLATE_MONITOR_ENTER_DEBUG.S index 56027fd91..26954838b 100644 --- a/vm/compiler/template/armv5te/TEMPLATE_MONITOR_ENTER_DEBUG.S +++ b/vm/compiler/template/armv5te/TEMPLATE_MONITOR_ENTER_DEBUG.S @@ -13,7 +13,7 @@ mov r3, #0 @ Record that we're not returning str r3, [r0, #offThread_inJitCodeCache] blx r2 @ dvmLockObject(self, obj) - @ refresh Jit's on/off status & test for exception + @ test for exception ldr r1, [rSELF, #offThread_exception] cmp r1, #0 beq 1f diff --git a/vm/compiler/template/out/CompilerTemplateAsm-armv5te-vfp.S b/vm/compiler/template/out/CompilerTemplateAsm-armv5te-vfp.S index 44accab58..58c3ebf92 100644 --- a/vm/compiler/template/out/CompilerTemplateAsm-armv5te-vfp.S +++ b/vm/compiler/template/out/CompilerTemplateAsm-armv5te-vfp.S @@ -1442,7 +1442,7 @@ dvmCompiler_TEMPLATE_MONITOR_ENTER_DEBUG: mov r3, #0 @ Record that we're not returning str r3, [r0, #offThread_inJitCodeCache] blx r2 @ dvmLockObject(self, obj) - @ refresh Jit's on/off status & test for exception + @ test for exception ldr r1, [rSELF, #offThread_exception] cmp r1, #0 beq 1f diff --git a/vm/compiler/template/out/CompilerTemplateAsm-armv5te.S b/vm/compiler/template/out/CompilerTemplateAsm-armv5te.S index 3b5c85783..102148159 100644 --- a/vm/compiler/template/out/CompilerTemplateAsm-armv5te.S +++ b/vm/compiler/template/out/CompilerTemplateAsm-armv5te.S @@ -1173,7 +1173,7 @@ dvmCompiler_TEMPLATE_MONITOR_ENTER_DEBUG: mov r3, #0 @ Record that we're not returning str r3, [r0, #offThread_inJitCodeCache] blx r2 @ dvmLockObject(self, obj) - @ refresh Jit's on/off status & test for exception + @ test for exception ldr r1, [rSELF, #offThread_exception] cmp r1, #0 beq 1f diff --git a/vm/compiler/template/out/CompilerTemplateAsm-armv7-a-neon.S b/vm/compiler/template/out/CompilerTemplateAsm-armv7-a-neon.S index 3905ec8d6..804b471c7 100644 --- a/vm/compiler/template/out/CompilerTemplateAsm-armv7-a-neon.S +++ b/vm/compiler/template/out/CompilerTemplateAsm-armv7-a-neon.S @@ -1442,7 +1442,7 @@ dvmCompiler_TEMPLATE_MONITOR_ENTER_DEBUG: mov r3, #0 @ Record that we're not returning str r3, [r0, #offThread_inJitCodeCache] blx r2 @ dvmLockObject(self, obj) - @ refresh Jit's on/off status & test for exception + @ test for exception ldr r1, [rSELF, #offThread_exception] cmp r1, #0 beq 1f diff --git a/vm/compiler/template/out/CompilerTemplateAsm-armv7-a.S b/vm/compiler/template/out/CompilerTemplateAsm-armv7-a.S index b09bc302d..d8713d9ba 100644 --- a/vm/compiler/template/out/CompilerTemplateAsm-armv7-a.S +++ b/vm/compiler/template/out/CompilerTemplateAsm-armv7-a.S @@ -1442,7 +1442,7 @@ dvmCompiler_TEMPLATE_MONITOR_ENTER_DEBUG: mov r3, #0 @ Record that we're not returning str r3, [r0, #offThread_inJitCodeCache] blx r2 @ dvmLockObject(self, obj) - @ refresh Jit's on/off status & test for exception + @ test for exception ldr r1, [rSELF, #offThread_exception] cmp r1, #0 beq 1f |