summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-09-18 11:22:38 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-18 11:22:39 +0000
commite5cafd5fd1d476c1309cf10ff45877adce2f4347 (patch)
tree444e1db559cf7d21632275c3db23a26a40f165bf /compiler/optimizing
parente2aa073e57e8129706cf4f87c1e7c5cfedd2951f (diff)
parentce71ae7daca2e9ae4eec42d7445013c37d96e385 (diff)
downloadart-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.cc14
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,