Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(824)

Unified Diff: src/heap/mark-compact-inl.h

Issue 1823783003: [heap] RecordWrites iterates black object to ensure marking progress. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact-inl.h
diff --git a/src/heap/mark-compact-inl.h b/src/heap/mark-compact-inl.h
index 5932c6e4fa22873294da5455e91824c918263e23..281ece4cc8d693601e26bd5a6df454064dccfa5a 100644
--- a/src/heap/mark-compact-inl.h
+++ b/src/heap/mark-compact-inl.h
@@ -143,21 +143,10 @@ template <LiveObjectIterationMode T>
HeapObject* LiveObjectIterator<T>::Next() {
while (!it_.Done()) {
HeapObject* object = nullptr;
- if (T == kGreyObjectsOnBlackPage) {
- // Black objects will have most of the mark bits set to 1. If we invert
- // the mark bits, grey objects will be left but the mark bit is moved by
- // one position. We can just substract one word from the found location
- // to obtain the grey object.
- current_cell_ = ~current_cell_;
- }
while (current_cell_ != 0) {
uint32_t trailing_zeros = base::bits::CountTrailingZeros32(current_cell_);
Address addr = cell_base_ + trailing_zeros * kPointerSize;
- if (T == kGreyObjectsOnBlackPage) {
- addr -= kPointerSize;
- }
-
// Clear the first bit of the found object..
current_cell_ &= ~(1u << trailing_zeros);
@@ -179,14 +168,10 @@ HeapObject* LiveObjectIterator<T>::Next() {
object = HeapObject::FromAddress(addr);
} else if (T == kAllLiveObjects) {
object = HeapObject::FromAddress(addr);
- } else if (T == kGreyObjectsOnBlackPage) {
- object = HeapObject::FromAddress(addr);
}
- if (T != kGreyObjectsOnBlackPage) {
- // Clear the second bit of the found object.
- current_cell_ &= ~second_bit_index;
- }
+ // Clear the second bit of the found object.
+ current_cell_ &= ~second_bit_index;
// We found a live object.
if (object != nullptr) break;
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698