diff options
| author | 2015-03-06 17:25:09 +0000 | |
|---|---|---|
| committer | 2015-03-06 17:25:09 +0000 | |
| commit | 4c84febe448c80b968ef612ace7aa3936073e60a (patch) | |
| tree | 95097e1b1ee0da8668f5eacd38fd3802b2a52a19 | |
| parent | e653f2dc1f7f01d6592803d650d9b19aa845b90b (diff) | |
| parent | a6aad92310895d35d8004da917100806d35d6b16 (diff) | |
am a6aad923: Merge "Do not dump memory usage if driver was never created"
* commit 'a6aad92310895d35d8004da917100806d35d6b16':
Do not dump memory usage if driver was never created
| -rw-r--r-- | dex2oat/dex2oat.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc index 8572f4d530..128f6238a9 100644 --- a/dex2oat/dex2oat.cc +++ b/dex2oat/dex2oat.cc @@ -1647,9 +1647,10 @@ class Dex2Oat FINAL { void LogCompletionTime() { // Note: when creation of a runtime fails, e.g., when trying to compile an app but when there // is no image, there won't be a Runtime::Current(). + // Note: driver creation can fail when loading an invalid dex file. LOG(INFO) << "dex2oat took " << PrettyDuration(NanoTime() - start_ns_) << " (threads: " << thread_count_ << ") " - << ((Runtime::Current() != nullptr) ? + << ((Runtime::Current() != nullptr && driver_.get() != nullptr) ? driver_->GetMemoryUsageString(kIsDebugBuild || VLOG_IS_ON(compiler)) : ""); } |