diff options
author | Mathieu Chartier <mathieuc@google.com> | 2016-04-07 14:16:26 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2016-04-08 10:48:33 -0700 |
commit | 794bff5f622c79fd7bd9899e700cf052a375c675 (patch) | |
tree | 55601111fefb31feda497a9764b007b46d6d4f0e /compiler/image_writer.cc | |
parent | 539d38c67c521aa17741a41fc4c4462b576adfd9 (diff) | |
download | android_art-794bff5f622c79fd7bd9899e700cf052a375c675.tar.gz android_art-794bff5f622c79fd7bd9899e700cf052a375c675.tar.bz2 android_art-794bff5f622c79fd7bd9899e700cf052a375c675.zip |
Reduce dirty image pages by improving binning
Change ordering from dirty to less dirty since ArtFields are clean
and they are last. Add separate binning for DexCache and instances
of java lang object (probably a lock object).
Business card .art RAM (on shamu):
PSS Private Dirty
.art mmap 1011 600
.art mmap 990 560
Bug: 27906566
Change-Id: Ib3116953df7adafdc1560b064365c8b56e71483e
Diffstat (limited to 'compiler/image_writer.cc')
-rw-r--r-- | compiler/image_writer.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/compiler/image_writer.cc b/compiler/image_writer.cc index c747ffa65b..8bb462c667 100644 --- a/compiler/image_writer.cc +++ b/compiler/image_writer.cc @@ -576,7 +576,16 @@ void ImageWriter::AssignImageBinSlot(mirror::Object* object) { } } else if (object->GetClass<kVerifyNone>()->IsStringClass()) { bin = kBinString; // Strings are almost always immutable (except for object header). - } // else bin = kBinRegular + } else if (object->GetClass<kVerifyNone>() == + Runtime::Current()->GetClassLinker()->GetClassRoot(ClassLinker::kJavaLangObject)) { + // Instance of java lang object, probably a lock object. This means it will be dirty when we + // synchronize on it. + bin = kBinMiscDirty; + } else if (object->IsDexCache()) { + // Dex file field becomes dirty when the image is loaded. + bin = kBinMiscDirty; + } + // else bin = kBinRegular } size_t oat_index = GetOatIndex(object); |