Fix divide by zero in compiler stats
Also remove ext.jar from compilation since its part of the bootclasspath
Change-Id: I208746479d44664c8c868952d477a312fea6547a
diff --git a/Android.mk b/Android.mk
index 025f4d7..0b8d0eb 100644
--- a/Android.mk
+++ b/Android.mk
@@ -242,7 +242,6 @@
$(eval $(call build-art-cache-oat,system/framework/com.android.nfc_extras.jar))
$(eval $(call build-art-cache-oat,system/framework/com.google.android.maps.jar))
$(eval $(call build-art-cache-oat,system/framework/com.google.android.media.effects.jar))
-$(eval $(call build-art-cache-oat,system/framework/ext.jar))
$(eval $(call build-art-cache-oat,system/framework/ime.jar))
$(eval $(call build-art-cache-oat,system/framework/input.jar))
$(eval $(call build-art-cache-oat,system/framework/javax.obex.jar))
@@ -348,7 +347,6 @@
$(eval $(call build-art-cache-oat,system/framework/com.android.nfc_extras.jar))
$(eval $(call build-art-cache-oat,system/framework/com.google.android.maps.jar))
$(eval $(call build-art-cache-oat,system/framework/com.google.android.media.effects.jar))
-$(eval $(call build-art-cache-oat,system/framework/ext.jar))
$(eval $(call build-art-cache-oat,system/framework/ime.jar))
$(eval $(call build-art-cache-oat,system/framework/input.jar))
$(eval $(call build-art-cache-oat,system/framework/javax.obex.jar))
diff --git a/src/compiler.cc b/src/compiler.cc
index 2f9b3ed..8a996b5 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -63,14 +63,25 @@
if (dex_file_count_ > 0) {
uint64_t duration_ns = NanoTime() - start_ns_;
uint64_t duration_ms = NsToMs(duration_ns);
- LOG(INFO) << "Compiled files:" << dex_file_count_
- << " classes:" << class_count_
- << " methods:(abstract:" << abstract_method_count_
- << " native:" << native_method_count_
- << " regular:" << regular_method_count_ << ")"
- << " instructions:" << instruction_count_
- << " (took " << duration_ms << "ms, "
- << (duration_ns/instruction_count_) << " ns/instruction)";
+ std::string stats(StringPrintf("Compiled files:%d"
+ " classes:%d"
+ " methods:(abstract:%d"
+ " native:%d"
+ " regular:%d)"
+ " instructions:%d"
+ " (took %llums",
+ dex_file_count_,
+ class_count_,
+ abstract_method_count_,
+ native_method_count_,
+ regular_method_count_,
+ instruction_count_,
+ duration_ms));
+ if (instruction_count_ != 0) {
+ stats += StringPrintf(", %llu ns/instruction", duration_ns/instruction_count_);
+ }
+ stats += ")";
+ LOG(INFO) << stats;
}
}