diff options
author | Brian Carlstrom <bdc@google.com> | 2015-03-06 08:44:45 -0800 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2015-03-06 08:44:45 -0800 |
commit | a11a34c908e847711e6ccf221d61b45d0c4c963d (patch) | |
tree | eeb7d47eec30c3850b450f77c21a34a66cd80e9c /dex2oat | |
parent | b341b70b2418922d9b792cdba96d22bece87c55a (diff) | |
download | art-a11a34c908e847711e6ccf221d61b45d0c4c963d.zip art-a11a34c908e847711e6ccf221d61b45d0c4c963d.tar.gz art-a11a34c908e847711e6ccf221d61b45d0c4c963d.tar.bz2 |
Do not dump memory usage if driver was never created
Bug: https://code.google.com/p/android/issues/detail?id=158593
Change-Id: I8084f9ac823910aa11f854f3e764240741fbf0d5
Diffstat (limited to 'dex2oat')
-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 8572f4d..128f623 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)) : ""); } |