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

Side by Side Diff: src/heap/incremental-marking.cc

Issue 2810893002: [heap] Implement simple concurrent marking deque. (Closed)
Patch Set: Fix comment Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/incremental-marking.h" 5 #include "src/heap/incremental-marking.h"
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/compilation-cache.h" 8 #include "src/compilation-cache.h"
9 #include "src/conversions.h" 9 #include "src/conversions.h"
10 #include "src/heap/concurrent-marking.h" 10 #include "src/heap/concurrent-marking.h"
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 544
545 heap_->CompletelyClearInstanceofCache(); 545 heap_->CompletelyClearInstanceofCache();
546 heap_->isolate()->compilation_cache()->MarkCompactPrologue(); 546 heap_->isolate()->compilation_cache()->MarkCompactPrologue();
547 547
548 // Mark strong roots grey. 548 // Mark strong roots grey.
549 IncrementalMarkingRootMarkingVisitor visitor(this); 549 IncrementalMarkingRootMarkingVisitor visitor(this);
550 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); 550 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG);
551 551
552 if (FLAG_concurrent_marking) { 552 if (FLAG_concurrent_marking) {
553 ConcurrentMarking* concurrent_marking = heap_->concurrent_marking(); 553 ConcurrentMarking* concurrent_marking = heap_->concurrent_marking();
554 marking_deque()->Iterate([concurrent_marking](HeapObject* obj) {
555 concurrent_marking->AddRoot(obj);
556 });
557 concurrent_marking->StartTask(); 554 concurrent_marking->StartTask();
558 } 555 }
559 556
560 // Ready to start incremental marking. 557 // Ready to start incremental marking.
561 if (FLAG_trace_incremental_marking) { 558 if (FLAG_trace_incremental_marking) {
562 heap()->isolate()->PrintWithTimestamp("[IncrementalMarking] Running\n"); 559 heap()->isolate()->PrintWithTimestamp("[IncrementalMarking] Running\n");
563 } 560 }
564 } 561 }
565 562
566 void IncrementalMarking::StartBlackAllocation() { 563 void IncrementalMarking::StartBlackAllocation() {
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 idle_marking_delay_counter_++; 1163 idle_marking_delay_counter_++;
1167 } 1164 }
1168 1165
1169 1166
1170 void IncrementalMarking::ClearIdleMarkingDelayCounter() { 1167 void IncrementalMarking::ClearIdleMarkingDelayCounter() {
1171 idle_marking_delay_counter_ = 0; 1168 idle_marking_delay_counter_ = 0;
1172 } 1169 }
1173 1170
1174 } // namespace internal 1171 } // namespace internal
1175 } // namespace v8 1172 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/heap/mark-compact.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698