summaryrefslogtreecommitdiffstats
path: root/vm/compiler/Compiler.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm/compiler/Compiler.c')
-rw-r--r--vm/compiler/Compiler.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/vm/compiler/Compiler.c b/vm/compiler/Compiler.c
index 59463b796..817b7e649 100644
--- a/vm/compiler/Compiler.c
+++ b/vm/compiler/Compiler.c
@@ -50,7 +50,6 @@ static CompilerWorkOrder workDequeue(void)
return work;
}
-
/*
* Enqueue a work order - retrying until successful. If attempt to enqueue
* is repeatedly unsuccessful, assume the JIT is in a bad state and force a
@@ -332,6 +331,12 @@ static void resetCodeCache(void)
gDvmJit.compilerICPatchIndex = 0;
dvmUnlockMutex(&gDvmJit.compilerICPatchLock);
+ /*
+ * Reset the inflight compilation address (can only be done in safe points
+ * or by the compiler thread when its thread state is RUNNING).
+ */
+ gDvmJit.inflightBaseAddr = NULL;
+
/* All clear now */
gDvmJit.codeCacheFull = false;
@@ -382,6 +387,9 @@ static bool compilerThreadStartup(void)
goto fail;
}
+ /* Cache the thread pointer */
+ gDvmJit.compilerThread = dvmThreadSelf();
+
dvmLockMutex(&gDvmJit.compilerLock);
/* Track method-level compilation statistics */