summaryrefslogtreecommitdiffstats
path: root/compiler/driver/compiler_driver.cc
diff options
context:
space:
mode:
authorJeff Hao <jeffhao@google.com>2015-04-06 14:21:37 -0700
committerJeff Hao <jeffhao@google.com>2015-04-06 15:46:29 -0700
commit48699fb0b0662d9a4fa593d0bd2a7d5ace83e34e (patch)
tree9c223e2f545500c3ea29a0943c2f17b491938c3a /compiler/driver/compiler_driver.cc
parentfb9131bd25b5a90e49da5e0f44b23e106558e7e0 (diff)
downloadandroid_art-48699fb0b0662d9a4fa593d0bd2a7d5ace83e34e.tar.gz
android_art-48699fb0b0662d9a4fa593d0bd2a7d5ace83e34e.tar.bz2
android_art-48699fb0b0662d9a4fa593d0bd2a7d5ace83e34e.zip
Prevent verified method from being deleted by compiler driver.
The results of it will be needed by future optimizing compiler changes. Change-Id: Ifbdf47e7564906b74193f80a4ba0459eed87c0f7
Diffstat (limited to 'compiler/driver/compiler_driver.cc')
-rw-r--r--compiler/driver/compiler_driver.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index f52f50eda5..01465f08e9 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -350,6 +350,7 @@ CompilerDriver::CompilerDriver(const CompilerOptions* compiler_options,
verification_results_(verification_results),
method_inliner_map_(method_inliner_map),
compiler_(Compiler::Create(this, compiler_kind)),
+ compiler_kind_(compiler_kind),
instruction_set_(instruction_set),
instruction_set_features_(instruction_set_features),
freezing_constructor_lock_("freezing constructor lock"),
@@ -2272,8 +2273,11 @@ void CompilerDriver::CompileMethod(Thread* self, const DexFile::CodeItem* code_i
DCHECK(GetCompiledMethod(method_ref) != nullptr) << PrettyMethod(method_idx, dex_file);
}
- // Done compiling, delete the verified method to reduce native memory usage.
- verification_results_->RemoveVerifiedMethod(method_ref);
+ // Done compiling, delete the verified method to reduce native memory usage. Do not delete in
+ // optimizing compiler, which may need the verified method again for inlining.
+ if (compiler_kind_ != Compiler::kOptimizing) {
+ verification_results_->RemoveVerifiedMethod(method_ref);
+ }
if (self->IsExceptionPending()) {
ScopedObjectAccess soa(self);