[heap] Remove special handling of map space in old-to-old pointer update.

Now that the layout descriptor is pretenured, we don't need atomic
accessor for the map space.

BUG=chromium:694255

Change-Id: I0ced8c04eaa61eec0f6a7b518ecba6413a691501
Reviewed-on: https://chromium-review.googlesource.com/595742
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47042}
This commit is contained in:
Ulan Degenbaev 2017-08-01 14:21:57 +02:00 committed by Commit Bot
parent 77cd84169b
commit d624daacc6

View File

@ -4121,37 +4121,16 @@ class RememberedSetUpdatingItem : public UpdatingItem {
}
void UpdateUntypedPointers() {
// A map slot might point to new space and be required for iterating
// an object concurrently by another task. Hence, we need to update
// those slots using atomics.
if (chunk_->slot_set<OLD_TO_NEW, AccessMode::NON_ATOMIC>() != nullptr) {
if (chunk_->owner() == heap_->map_space()) {
RememberedSet<OLD_TO_NEW>::Iterate(
chunk_,
[this](Address slot) {
return CheckAndUpdateOldToNewSlot<AccessMode::ATOMIC>(slot);
},
SlotSet::PREFREE_EMPTY_BUCKETS);
} else {
RememberedSet<OLD_TO_NEW>::Iterate(
chunk_,
[this](Address slot) {
return CheckAndUpdateOldToNewSlot<AccessMode::NON_ATOMIC>(slot);
},
SlotSet::PREFREE_EMPTY_BUCKETS);
}
}
if ((updating_mode_ == RememberedSetUpdatingMode::ALL) &&
(chunk_->slot_set<OLD_TO_OLD, AccessMode::NON_ATOMIC>() != nullptr)) {
if (chunk_->owner() == heap_->map_space()) {
RememberedSet<OLD_TO_OLD>::Iterate(
chunk_,
[](Address slot) {
return UpdateSlot<AccessMode::ATOMIC>(
reinterpret_cast<Object**>(slot));
},
SlotSet::PREFREE_EMPTY_BUCKETS);
} else {
RememberedSet<OLD_TO_OLD>::Iterate(
chunk_,
[](Address slot) {
@ -4159,7 +4138,6 @@ class RememberedSetUpdatingItem : public UpdatingItem {
reinterpret_cast<Object**>(slot));
},
SlotSet::PREFREE_EMPTY_BUCKETS);
}
}
}