OSDN Git Service

Improve immune spaces logic
authorMathieu Chartier <mathieuc@google.com>
Tue, 23 Feb 2016 03:32:16 +0000 (19:32 -0800)
committerMathieu Chartier <mathieuc@google.com>
Sat, 27 Feb 2016 01:21:54 +0000 (17:21 -0800)
commit06fc03b2bf02f1ccecfaaaaaa36ee8be65711c47
treebd5704bac09a44367c5c4f3e8cb7dc4ff0d977ce
parent0c5559ce38a3466d6c00da4dda6b81fcabbba247
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
runtime/gc/collector/immune_spaces.cc
runtime/gc/collector/immune_spaces_test.cc