From: Griff Hazen Date: Mon, 19 Dec 2016 18:15:53 +0000 (+0000) Subject: Revert "Prune uses library classes even without profile DO NOT MERGE" X-Git-Tag: android-x86-7.1-r1~8^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=fc9bec20893d50f9c92c7c25845f2f425f4de052;p=android-x86%2Fart.git Revert "Prune uses library classes even without profile DO NOT MERGE" This fix may be causing other crashes e.g. b/33718412. Bug: 33718412 Bug: 30688277 Bug: 31427727 This reverts commit 8394cee5f0f87ddeeb8f33c199fa21e0cdee9073. Change-Id: Ie19ece9d8ae1afef8b578482fae1cdbd35ff930d --- diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc index 2d6c4dab6..61cf00942 100644 --- a/compiler/image_writer.cc +++ b/compiler/image_writer.cc @@ -789,13 +789,6 @@ bool ImageWriter::PruneAppImageClassInternal( result = result || PruneAppImageClassInternal(klass->GetSuperClass(), &my_early_exit, visited); - // Remove the class if the dex file is not in the set of dex files. This happens for classes that - // are from uses library if there is no profile. b/30688277 - mirror::DexCache* dex_cache = klass->GetDexCache(); - if (dex_cache != nullptr) { - result = result || - dex_file_oat_index_map_.find(dex_cache->GetDexFile()) == dex_file_oat_index_map_.end(); - } // Erase the element we stored earlier since we are exiting the function. auto it = visited->find(klass); DCHECK(it != visited->end());