diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-09-18 11:22:38 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-09-18 11:22:39 +0000 |
commit | e5cafd5fd1d476c1309cf10ff45877adce2f4347 (patch) | |
tree | 444e1db559cf7d21632275c3db23a26a40f165bf /compiler/optimizing | |
parent | e2aa073e57e8129706cf4f87c1e7c5cfedd2951f (diff) | |
parent | ce71ae7daca2e9ae4eec42d7445013c37d96e385 (diff) | |
download | art-e5cafd5fd1d476c1309cf10ff45877adce2f4347.zip art-e5cafd5fd1d476c1309cf10ff45877adce2f4347.tar.gz art-e5cafd5fd1d476c1309cf10ff45877adce2f4347.tar.bz2 |
Merge "It can be that no method has been compiled."
Diffstat (limited to 'compiler/optimizing')
-rw-r--r-- | compiler/optimizing/optimizing_compiler.cc | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc index a539192..3ce8e77 100644 --- a/compiler/optimizing/optimizing_compiler.cc +++ b/compiler/optimizing/optimizing_compiler.cc @@ -154,11 +154,15 @@ void OptimizingCompiler::UnInit() const { } OptimizingCompiler::~OptimizingCompiler() { - size_t unoptimized_percent = (unoptimized_compiled_methods_ * 100 / total_compiled_methods_); - size_t optimized_percent = (optimized_compiled_methods_ * 100 / total_compiled_methods_); - LOG(INFO) << "Compiled " << total_compiled_methods_ << " methods: " - << unoptimized_percent << "% (" << unoptimized_compiled_methods_ << ") unoptimized, " - << optimized_percent << "% (" << optimized_compiled_methods_ << ") optimized."; + if (total_compiled_methods_ == 0) { + LOG(INFO) << "Did not compile any method."; + } else { + size_t unoptimized_percent = (unoptimized_compiled_methods_ * 100 / total_compiled_methods_); + size_t optimized_percent = (optimized_compiled_methods_ * 100 / total_compiled_methods_); + LOG(INFO) << "Compiled " << total_compiled_methods_ << " methods: " + << unoptimized_percent << "% (" << unoptimized_compiled_methods_ << ") unoptimized, " + << optimized_percent << "% (" << optimized_compiled_methods_ << ") optimized."; + } } bool OptimizingCompiler::CanCompileMethod(uint32_t method_idx, const DexFile& dex_file, |