Slow ART.
Run ART with the interpreter for all but boot.oat code.
Change-Id: I1654ecff6769a6c754f713be7580717d5ce07dc1
diff --git a/src/common_test.h b/src/common_test.h
index 368e4a7..ad6bcb4 100644
--- a/src/common_test.h
+++ b/src/common_test.h
@@ -223,21 +223,24 @@
LOG(INFO) << "MakeExecutable " << PrettyMethod(method)
<< " invoke_stub=" << reinterpret_cast<void*>(method_invoke_stub);
+ const CompiledMethod* compiled_method = NULL;
if (!method->IsAbstract()) {
const mirror::DexCache* dex_cache = method->GetDeclaringClass()->GetDexCache();
const DexFile& dex_file = *dex_cache->GetDexFile();
- const CompiledMethod* compiled_method =
+ compiled_method =
compiler_driver_->GetCompiledMethod(CompilerDriver::MethodReference(&dex_file,
method->GetDexMethodIndex()));
- CHECK(compiled_method != NULL) << PrettyMethod(method);
+#ifndef ART_SLOW_MODE
+ CHECK(compiled_method != NULL) << PrettyMethod(method);
+#endif
+ }
+ if (compiled_method != NULL) {
const std::vector<uint8_t>& code = compiled_method->GetCode();
MakeExecutable(code);
const void* method_code = CompiledMethod::CodePointer(&code[0],
compiled_method->GetInstructionSet());
-
LOG(INFO) << "MakeExecutable " << PrettyMethod(method) << " code=" << method_code;
-
OatFile::OatMethod oat_method = CreateOatMethod(method_code,
compiled_method->GetFrameSizeInBytes(),
compiled_method->GetCoreSpillMask(),
@@ -248,8 +251,14 @@
method_invoke_stub);
oat_method.LinkMethod(method);
} else {
- MakeExecutable(runtime_->GetAbstractMethodErrorStubArray());
- const void* method_code = runtime_->GetAbstractMethodErrorStubArray()->GetData();
+ const void* method_code;
+ if (method->IsAbstract()) {
+ MakeExecutable(runtime_->GetAbstractMethodErrorStubArray());
+ method_code = runtime_->GetAbstractMethodErrorStubArray()->GetData();
+ } else {
+ // No code? You must mean to go into the interpreter.
+ method_code = GetInterpreterEntryPoint();
+ }
LOG(INFO) << "MakeExecutable " << PrettyMethod(method) << " code=" << method_code;
OatFile::OatMethod oat_method = CreateOatMethod(method_code,
kStackAlignment,