diff options
| author | 2014-11-06 11:23:56 -0800 | |
|---|---|---|
| committer | 2014-11-06 21:52:00 +0000 | |
| commit | f0cb1eb5b2020c3c527aca3ff458801b90b5e06c (patch) | |
| tree | 5d50dcecd27505997e5e4e53e9ad58fce8baa94f | |
| parent | 64d79730c33777a62e108942909773e5e782ece3 (diff) | |
ART: Missing EndTiming()s in dex2oat
In the failure case, make sure we do an EndTiming() to not abort
because of Start-End mismatch.
Bug: 18273355
Change-Id: I42e68dd337dfe32c3b90511a04bc8f12114b9484
| -rw-r--r-- | dex2oat/dex2oat.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc index 6d7f115707..869bf89156 100644 --- a/dex2oat/dex2oat.cc +++ b/dex2oat/dex2oat.cc @@ -1275,6 +1275,7 @@ static int dex2oat(int argc, char** argv) { &method_inliner_map, thread_count)) { LOG(ERROR) << "Failed to create dex2oat"; + timings.EndTiming(); return EXIT_FAILURE; } std::unique_ptr<Dex2Oat> dex2oat(p_dex2oat); @@ -1303,6 +1304,7 @@ static int dex2oat(int argc, char** argv) { if (image_classes.get() == nullptr) { LOG(ERROR) << "Failed to create list of image classes from '" << image_classes_filename << "': " << error_msg; + timings.EndTiming(); return EXIT_FAILURE; } } else if (image) { @@ -1321,11 +1323,13 @@ static int dex2oat(int argc, char** argv) { if (zip_archive.get() == nullptr) { LOG(ERROR) << "Failed to open zip from file descriptor for '" << zip_location << "': " << error_msg; + timings.EndTiming(); return EXIT_FAILURE; } if (!DexFile::OpenFromZip(*zip_archive.get(), zip_location, &error_msg, &dex_files)) { LOG(ERROR) << "Failed to open dex from file descriptor for zip file '" << zip_location << "': " << error_msg; + timings.EndTiming(); return EXIT_FAILURE; } ATRACE_END(); @@ -1333,6 +1337,7 @@ static int dex2oat(int argc, char** argv) { size_t failure_count = OpenDexFiles(dex_filenames, dex_locations, dex_files); if (failure_count > 0) { LOG(ERROR) << "Failed to open some dex files: " << failure_count; + timings.EndTiming(); return EXIT_FAILURE; } } @@ -1411,6 +1416,7 @@ static int dex2oat(int argc, char** argv) { key_value_store.get())); if (compiler.get() == nullptr) { LOG(ERROR) << "Failed to create oat file: " << oat_location; + timings.EndTiming(); return EXIT_FAILURE; } @@ -1474,6 +1480,7 @@ static int dex2oat(int argc, char** argv) { oat_location, *compiler.get()); if (!image_creation_success) { + timings.EndTiming(); return EXIT_FAILURE; } VLOG(compiler) << "Image written successfully: " << image_filename; |