Revert "Load app images"
Fails when a method is duplicated (see test 097-duplicate-method)
Bug: 22858531
This reverts commit f7fd970244f143b1abb956e29794c446e4d57f46.
Change-Id: Ib30ae5be00cc568e799290be6b3c8f29cbbe4c20
diff --git a/runtime/gc/accounting/space_bitmap-inl.h b/runtime/gc/accounting/space_bitmap-inl.h
index 4cf5b4f..61c67f8 100644
--- a/runtime/gc/accounting/space_bitmap-inl.h
+++ b/runtime/gc/accounting/space_bitmap-inl.h
@@ -167,12 +167,8 @@
uintptr_t* address = &bitmap_begin_[index];
uintptr_t old_word = *address;
if (kSetBit) {
- // Check the bit before setting the word incase we are trying to mark a read only bitmap
- // like an image space bitmap. This bitmap is mapped as read only and will fault if we
- // attempt to change any words. Since all of the objects are marked, this will never
- // occur if we check before setting the bit. This also prevents dirty pages that would
- // occur if the bitmap was read write and we did not check the bit.
if ((old_word & mask) == 0) {
+ // Avoid dirtying the page if possible.
*address = old_word | mask;
}
} else {