summaryrefslogtreecommitdiffstats
path: root/compiler/image_writer.cc
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2015-06-02 21:01:45 -0700
committerAndreas Gampe <agampe@google.com>2015-06-03 09:57:43 -0700
commit44905ce1c97613a5cb44046049843fe1029a64cf (patch)
tree4027fdfd08078ec399ae8fc91a87e6bc2ca056d8 /compiler/image_writer.cc
parentb1170ba5de3bf56021f33133bed537894e8fa8b9 (diff)
downloadandroid_art-44905ce1c97613a5cb44046049843fe1029a64cf.tar.gz
android_art-44905ce1c97613a5cb44046049843fe1029a64cf.tar.bz2
android_art-44905ce1c97613a5cb44046049843fe1029a64cf.zip
ART: Prune FindArrayClass cache in image writer
The ClassLinker cache speeds up FindArrayClass requests, but all entries are roots. It is possible that an entry is a non-image class when creating the boot image, artificially keeping the class around. Bug: 21596650 Change-Id: Ief9b439945d0e293a3cb5dcddfeb189b5e174f06
Diffstat (limited to 'compiler/image_writer.cc')
-rw-r--r--compiler/image_writer.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc
index dd62d94e0f..c846933249 100644
--- a/compiler/image_writer.cc
+++ b/compiler/image_writer.cc
@@ -718,6 +718,9 @@ void ImageWriter::PruneNonImageClasses() {
// contains data only valid during a real run.
dex_cache->SetFieldObject<false>(mirror::DexCache::DexOffset(), nullptr);
}
+
+ // Drop the array class cache in the ClassLinker, as these are roots holding those classes live.
+ class_linker->DropFindArrayClassCache();
}
bool ImageWriter::NonImageClassesVisitor(Class* klass, void* arg) {