summaryrefslogtreecommitdiffstats
path: root/vm/compiler/Frontend.cpp
diff options
context:
space:
mode:
authorJeff Hao <jeffhao@google.com>2014-01-23 16:34:57 -0800
committerJeff Hao <jeffhao@google.com>2014-01-23 16:34:57 -0800
commit87a83a1c971224b397f384374f65f6cc863b7974 (patch)
tree96455b1068e342f8ca20cecd61b229686f4c6262 /vm/compiler/Frontend.cpp
parent6a8e552553647bf3c9fa032fe8f064250a54eb18 (diff)
downloadandroid_dalvik-87a83a1c971224b397f384374f65f6cc863b7974.tar.gz
android_dalvik-87a83a1c971224b397f384374f65f6cc863b7974.tar.bz2
android_dalvik-87a83a1c971224b397f384374f65f6cc863b7974.zip
Revert "Protect JIT Code cache modifications with version check"
This reverts commit 522811d183e5cc7d5ac3e1bce1baa16e0d9a7170.
Diffstat (limited to 'vm/compiler/Frontend.cpp')
-rw-r--r--vm/compiler/Frontend.cpp50
1 files changed, 18 insertions, 32 deletions
diff --git a/vm/compiler/Frontend.cpp b/vm/compiler/Frontend.cpp
index 916915d01..47c1898a0 100644
--- a/vm/compiler/Frontend.cpp
+++ b/vm/compiler/Frontend.cpp
@@ -1579,23 +1579,16 @@ static bool compileLoop(CompilationUnit *cUnit, unsigned int startOffset,
dvmCompilerCodegenDump(cUnit);
}
- dvmLockMutex(&gDvmJit.compilerLock);
- if (info->cacheVersion == gDvmJit.cacheVersion) {
- /*
- * If this trace uses class objects as constants,
- * dvmJitInstallClassObjectPointers will switch the thread state
- * to running and look up the class pointers using the descriptor/loader
- * tuple stored in the callsite info structure. We need to make this window
- * as short as possible since it is blocking GC.
- */
- if (cUnit->hasClassLiterals && info->codeAddress) {
- dvmJitInstallClassObjectPointers(cUnit, (char *) info->codeAddress);
- }
- } else {
- ALOGD("JIT CC reset. New version: %d / trace version: %d",
- gDvmJit.cacheVersion, info->cacheVersion);
+ /*
+ * If this trace uses class objects as constants,
+ * dvmJitInstallClassObjectPointers will switch the thread state
+ * to running and look up the class pointers using the descriptor/loader
+ * tuple stored in the callsite info structure. We need to make this window
+ * as short as possible since it is blocking GC.
+ */
+ if (cUnit->hasClassLiterals && info->codeAddress) {
+ dvmJitInstallClassObjectPointers(cUnit, (char *) info->codeAddress);
}
- dvmUnlockMutex(&gDvmJit.compilerLock);
/*
* Since callsiteinfo is allocated from the arena, delay the reset until
@@ -2158,23 +2151,16 @@ bool dvmCompileTrace(JitTraceDescription *desc, int numMaxInsts,
optHints);
}
- dvmLockMutex(&gDvmJit.compilerLock);
- if (info->cacheVersion == gDvmJit.cacheVersion) {
- /*
- * If this trace uses class objects as constants,
- * dvmJitInstallClassObjectPointers will switch the thread state
- * to running and look up the class pointers using the descriptor/loader
- * tuple stored in the callsite info structure. We need to make this window
- * as short as possible since it is blocking GC.
- */
- if (cUnit.hasClassLiterals && info->codeAddress) {
- dvmJitInstallClassObjectPointers(&cUnit, (char *) info->codeAddress);
- }
- } else {
- ALOGD("JIT CC reset. New version: %d / trace version: %d",
- gDvmJit.cacheVersion, info->cacheVersion);
+ /*
+ * If this trace uses class objects as constants,
+ * dvmJitInstallClassObjectPointers will switch the thread state
+ * to running and look up the class pointers using the descriptor/loader
+ * tuple stored in the callsite info structure. We need to make this window
+ * as short as possible since it is blocking GC.
+ */
+ if (cUnit.hasClassLiterals && info->codeAddress) {
+ dvmJitInstallClassObjectPointers(&cUnit, (char *) info->codeAddress);
}
- dvmUnlockMutex(&gDvmJit.compilerLock);
/*
* Since callsiteinfo is allocated from the arena, delay the reset until