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

Side by Side Diff: src/heap/heap.cc

Issue 2439063002: [heap] Refactor marking deque. (Closed)
Patch Set: Stop incremental marking if it is in sweeping state Created 4 years, 2 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 | « no previous file | src/heap/incremental-marking.cc » ('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/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/ast/context-slot-cache.h" 9 #include "src/ast/context-slot-cache.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1449 void Heap::MarkCompactEpilogue() { 1449 void Heap::MarkCompactEpilogue() {
1450 gc_state_ = NOT_IN_GC; 1450 gc_state_ = NOT_IN_GC;
1451 1451
1452 isolate_->counters()->objs_since_last_full()->Set(0); 1452 isolate_->counters()->objs_since_last_full()->Set(0);
1453 1453
1454 incremental_marking()->Epilogue(); 1454 incremental_marking()->Epilogue();
1455 1455
1456 PreprocessStackTraces(); 1456 PreprocessStackTraces();
1457 DCHECK(incremental_marking()->IsStopped()); 1457 DCHECK(incremental_marking()->IsStopped());
1458 1458
1459 // We finished a marking cycle. We can uncommit the marking deque until 1459 mark_compact_collector()->marking_deque()->StopUsing();
1460 // we start marking again.
1461 mark_compact_collector()->marking_deque()->Uninitialize();
1462 mark_compact_collector()->EnsureMarkingDequeIsCommitted(
1463 MarkCompactCollector::kMinMarkingDequeSize);
1464 } 1460 }
1465 1461
1466 1462
1467 void Heap::MarkCompactPrologue() { 1463 void Heap::MarkCompactPrologue() {
1468 isolate_->context_slot_cache()->Clear(); 1464 isolate_->context_slot_cache()->Clear();
1469 isolate_->descriptor_lookup_cache()->Clear(); 1465 isolate_->descriptor_lookup_cache()->Clear();
1470 RegExpResultsCache::Clear(string_split_cache()); 1466 RegExpResultsCache::Clear(string_split_cache());
1471 RegExpResultsCache::Clear(regexp_multiple_cache()); 1467 RegExpResultsCache::Clear(regexp_multiple_cache());
1472 1468
1473 isolate_->compilation_cache()->MarkCompactPrologue(); 1469 isolate_->compilation_cache()->MarkCompactPrologue();
(...skipping 5024 matching lines...) Expand 10 before | Expand all | Expand 10 after
6498 } 6494 }
6499 6495
6500 6496
6501 // static 6497 // static
6502 int Heap::GetStaticVisitorIdForMap(Map* map) { 6498 int Heap::GetStaticVisitorIdForMap(Map* map) {
6503 return StaticVisitorBase::GetVisitorId(map); 6499 return StaticVisitorBase::GetVisitorId(map);
6504 } 6500 }
6505 6501
6506 } // namespace internal 6502 } // namespace internal
6507 } // namespace v8 6503 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/heap/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698