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

Unified Diff: src/heap/incremental-marking.cc

Issue 1720623002: Skip two-pointer fillers when processing marking deque. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/incremental-marking.cc
diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc
index 9c54dae295e753da86488d06ff45a241974f035a..689c200a1c38ce4ec230a878f7e70d9baff697e6 100644
--- a/src/heap/incremental-marking.cc
+++ b/src/heap/incremental-marking.cc
@@ -861,16 +861,21 @@ void IncrementalMarking::MarkObject(Heap* heap, HeapObject* obj) {
intptr_t IncrementalMarking::ProcessMarkingDeque(intptr_t bytes_to_process) {
intptr_t bytes_processed = 0;
- Map* filler_map = heap_->one_pointer_filler_map();
+ Map* one_pointer_filler_map = heap_->one_pointer_filler_map();
+ Map* two_pointer_filler_map = heap_->two_pointer_filler_map();
MarkingDeque* marking_deque =
heap_->mark_compact_collector()->marking_deque();
while (!marking_deque->IsEmpty() && bytes_processed < bytes_to_process) {
HeapObject* obj = marking_deque->Pop();
- // Explicitly skip one word fillers. Incremental markbit patterns are
- // correct only for objects that occupy at least two words.
+ // Explicitly skip one and two word fillers. Incremental markbit patterns
+ // are correct only for objects that occupy at least two words.
+ // Moreover, slots filtering for left-trimmed arrays works only when
+ // the distance between the old array start and the new array start
+ // is greater than two if both starts are marked.
Map* map = obj->map();
- if (map == filler_map) continue;
+ if (map == one_pointer_filler_map || map == two_pointer_filler_map)
+ continue;
int size = obj->SizeFromMap(map);
unscanned_bytes_of_large_object_ = 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698