History log of /art/runtime/gc/collector/immune_spaces_test.cc
Revision Date Author Comments
0cc2a92374ef14b0e2104b9d4ea148750b657694 28-Feb-2016 Mathieu Chartier <mathieuc@google.com> Revert "Revert "Improve immune spaces logic""

Test was flaky due to missing guard page at the end of the region.

Bug: 27136196

This reverts commit 07dbbca0b42cb8da1811de8209b4a7d4becfc7b2.

(cherry picked from commit 032c0051eb47f1f62586602894e5833356f4f9ec)

Change-Id: I7f9fcb0785ec45aaeded8ed65b7fa1abcf798282
deb880435f892f2f577a7c730bbccb315bc49e1c 27-Feb-2016 Nicolas Geoffray <ngeoffray@google.com> Revert "Improve immune spaces logic"

test is flaky. For example:

[ RUN ] ImmuneSpacesTest.MultiImage
art/runtime/gc/collector/immune_spaces_test.cc:351: Failure
Value of: space5->Limit()
Actual: 0xb6d72000
Expected: reinterpret_cast<uint8_t*>(spaces.GetLargestImmuneRegion().End())
Which is: 0xb6d93000
[ FAILED ] ImmuneSpacesTest.MultiImage (1076 ms)

Bug: 27136196

This reverts commit 17b8bce064fe4c0b29117abe489b7f8c2c950d43.

(cherry picked from commit 07dbbca0b42cb8da1811de8209b4a7d4becfc7b2)

Change-Id: I5da504491dc4ff5d665891df5c93d892790d990d
032c0051eb47f1f62586602894e5833356f4f9ec 28-Feb-2016 Mathieu Chartier <mathieuc@google.com> Revert "Revert "Improve immune spaces logic""

Test was flaky due to missing guard page at the end of the region.

Bug: 27136196

This reverts commit 07dbbca0b42cb8da1811de8209b4a7d4becfc7b2.

Change-Id: I4eb345f34e66b8684cd71a7897e3a8caa2f84140
07dbbca0b42cb8da1811de8209b4a7d4becfc7b2 27-Feb-2016 Nicolas Geoffray <ngeoffray@google.com> Revert "Improve immune spaces logic"

test is flaky. For example:

[ RUN ] ImmuneSpacesTest.MultiImage
art/runtime/gc/collector/immune_spaces_test.cc:351: Failure
Value of: space5->Limit()
Actual: 0xb6d72000
Expected: reinterpret_cast<uint8_t*>(spaces.GetLargestImmuneRegion().End())
Which is: 0xb6d93000
[ FAILED ] ImmuneSpacesTest.MultiImage (1076 ms)

Bug: 27136196

This reverts commit 17b8bce064fe4c0b29117abe489b7f8c2c950d43.

Change-Id: I9168421dd6ebabc271ed5c2cdbc5a27c211dcf5a
06fc03b2bf02f1ccecfaaaaaa36ee8be65711c47 23-Feb-2016 Mathieu Chartier <mathieuc@google.com> Improve immune spaces logic

We now properly include the largest continuous region with the most
image bytes. Oat bytes are considered as part of the region but are
not counted when comparing. This can result in more image bytes in
cases where large oat files were previously included for the immune
region.

Also added handling for adjacent oat files:
[image][image][oat][oat][space] will now properly be a single region.

Bug: 27136196

(cherry picked from commit 17b8bce064fe4c0b29117abe489b7f8c2c950d43)

Change-Id: Ic69489fef1ba72f735ee613d5416eeadc703c06e
17b8bce064fe4c0b29117abe489b7f8c2c950d43 23-Feb-2016 Mathieu Chartier <mathieuc@google.com> Improve immune spaces logic

We now properly include the largest continuous region with the most
image bytes. Oat bytes are considered as part of the region but are
not counted when comparing. This can result in more image bytes in
cases where large oat files were previously included for the immune
region.

Also added handling for adjacent oat files:
[image][image][oat][oat][space] will now properly be a single region.

Bug: 27136196
Change-Id: If2c002176dd32122e320e8a94551df46bd95256a
df0a8275abadc96a6363b59f31c64981571d6ed9 18-Feb-2016 Mathieu Chartier <mathieuc@google.com> Use image oat file instead of image header for immune spaces

The old immune spaces logic used the oat file information in the
image header instead of the actual oat file pointer. This was
incorrect for the app image case since the app image oat file is
not necessarily at the address specified in the header. This bug
could cause an incorrect immune region that caused large objects
to get freed if they were within this immune region.

Added test.

Bug: 22858531

(cherry picked from commit 5351da0225d027a19420153615634a1c78966bca)

Change-Id: Ibf41b0c0a9a7b0d093146311e2603a186033e339
5351da0225d027a19420153615634a1c78966bca 18-Feb-2016 Mathieu Chartier <mathieuc@google.com> Use image oat file instead of image header for immune spaces

The old immune spaces logic used the oat file information in the
image header instead of the actual oat file pointer. This was
incorrect for the app image case since the app image oat file is
not necessarily at the address specified in the header. This bug
could cause an incorrect immune region that caused large objects
to get freed if they were within this immune region.

Added test.

Bug: 22858531
Change-Id: I243253e61ea1afd42c3bb2414c02ce6dd36d0f9c
fbc31087932a65e036a153afab3049dc5298656a 24-Jan-2016 Mathieu Chartier <mathieuc@google.com> Revert "Revert "Load app images""

This reverts commit 1bc977cf2f8199311a97f2ba9431a184540e3e9c.

Bug: 22858531

Change-Id: Ide00bf3a73a02cba3bb364177204ad1b13f70295
1bc977cf2f8199311a97f2ba9431a184540e3e9c 23-Jan-2016 Nicolas Geoffray <ngeoffray@google.com> Revert "Load app images"

Fails when a method is duplicated (see test 097-duplicate-method)

Bug: 22858531

This reverts commit f7fd970244f143b1abb956e29794c446e4d57f46.

Change-Id: Ib30ae5be00cc568e799290be6b3c8f29cbbe4c20
f7fd970244f143b1abb956e29794c446e4d57f46 09-Nov-2015 Mathieu Chartier <mathieuc@google.com> Load app images

Support in-place patching of the app image based on boot image
location and app oat location. Only loads for art run test so far
since we do not automatically generate app images for app installs.

N5 maps launch time (~200 runs):
Before: 930ms
After: 878.18ms
After + image class table: 864.57ms

TODO:
Oatdump support.
Store class loaders as class roots in image.

Bug: 22858531

Change-Id: I9cbc645645e62ea2ed1ad8e139e91af7d88514c1
ceb07b3285eaab350a8cd12f7d74be3e40a255dd 10-Dec-2015 Mathieu Chartier <mathieuc@google.com> Revert "Revert "Add support for LZ4 compressed image files""

Needed to call compiler_driver_->SetSupportBootImageFixup(false).

Bug: 22858531

This reverts commit 83d4d72aa0e4170209ab50c67ba22e46b71352c1.

Change-Id: Iaed6a810a0c088f1f2c57cf2f12087f3978a3de1
83d4d72aa0e4170209ab50c67ba22e46b71352c1 10-Dec-2015 Nicolas Geoffray <ngeoffray@google.com> Revert "Add support for LZ4 compressed image files"

Tentative. Looks like it breaks image_test for hammerhead:
art/compiler/linker/arm/relative_patcher_thumb2.cc:36] Check failed: target_offset & 1u == 1u (target_offset & 1u=0, 1u=1)

Bug: 22858531

This reverts commit c6f41b5b3ca3d7ac3c12ad3995ffef4e831973a0.

Change-Id: I9bc5738a8b5c8f8bc8b73309f9420fd691bc79a9
c6f41b5b3ca3d7ac3c12ad3995ffef4e831973a0 05-Dec-2015 Mathieu Chartier <mathieuc@google.com> Add support for LZ4 compressed image files

Added dex2oat option --image-format=(store|lz4). Using lz4 means
that the main image section (all data other than header and bitmap)
are stored in a compressed state.

N5 results:
Boot image size: 8067128 -> 2827605
Decompression time 18.93ms
Decompression rate: 426MB/s

Patchoat is not currently supported since it maps the source image
directly. In order to support compressed images we would need to
recompress the output image and then write it back out to a file.
Also there are not many cases where we would want to patch a
compressed image since they are going to be dirty memory when
uncompressed anyways. Might as well just patch as we are loading.

Bug: 22858531

Change-Id: I8c54ccf73408273011161a61bb891736735074d9
763a31ed7a2bfad22a9cb07f5301a71c0f97ca49 17-Nov-2015 Mathieu Chartier <mathieuc@google.com> Add immune spaces abstraction

ImmuneSpaces is a set of spaces which are not reclaimable by the GC in
the current collection. This set of spaces does not have requirements
about space adjacency like the old ImmuneRegion. ImmuneSpaces generates
the largest immune region for the GC. Since there is no requirement on
adjacency, it is possible to have multiple non-adjacent applicaton
image files.

For image spaces, we also look at the oat code which is normally after
the application image. In this case, we add the code as part of the
immune region. This is required to have both the boot image and the
zygote space be in the same immune region (for performance reasons).

Bug: 22858531

Change-Id: I5103b31c0e39ad63c594f5557fc848a3b288b43e