diff options
| author | 2016-03-09 17:17:03 +0000 | |
|---|---|---|
| committer | 2016-03-09 17:17:03 +0000 | |
| commit | 770b39eb564ec16c672ace83515535b055edb2b1 (patch) | |
| tree | 51dfd67b5d08142da7b8024faacf20104b2e8402 | |
| parent | f529e9bc50abb507e75ac425f6333b2406d405af (diff) | |
Enable compilation of secondary dex files
DexClassLoader should be allowed to compile the secondary dex files if
needed. Adding interpret-only flag when using JIT prevented that.
Note that primary apks are loaded with a PathClassLoader and which
should not attempt to compile the dex files.
Bug: 26719109
Change-Id: I29323bc48160c3c70fea4244e502e43a4b0a678c
| -rw-r--r-- | runtime/runtime.cc | 2 | ||||
| -rwxr-xr-x | test/etc/run-test-jar | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc index c2d2dca024..4b45b42ea0 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -1883,7 +1883,7 @@ void Runtime::SetFaultMessage(const std::string& message) { void Runtime::AddCurrentRuntimeFeaturesAsDex2OatArguments(std::vector<std::string>* argv) const { - if (GetInstrumentation()->InterpretOnly() || UseJit()) { + if (GetInstrumentation()->InterpretOnly()) { argv->push_back("--compiler-filter=interpret-only"); } diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar index 2db1e6c947..762d9a45ee 100755 --- a/test/etc/run-test-jar +++ b/test/etc/run-test-jar @@ -329,9 +329,17 @@ if [ "$JIT" = "y" ]; then INT_OPTS="-Xusejit:true" if [ "$VERIFY" = "y" ] ; then COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=verify-at-runtime" + if [ "$PREBUILD" = "n" ]; then + # Make sure that if we have noprebuild we still JIT as DexClassLoader will + # try to compile the dex file. + INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=verify-at-runtime" + fi else COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=verify-none" DEX_VERIFY="${DEX_VERIFY} -Xverify:none" + if [ "$PREBUILD" = "n" ]; then + INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=verify-none" + fi fi fi |