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

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

Issue 1456523002: Revert of Remove redundant activation threshold for incremental marking. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | no next file » | 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/gc-idle-time-handler.h" 10 #include "src/heap/gc-idle-time-handler.h"
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 return CanBeActivated() && 467 return CanBeActivated() &&
468 heap_->HeapIsFullEnoughToStartIncrementalMarking( 468 heap_->HeapIsFullEnoughToStartIncrementalMarking(
469 heap_->old_generation_allocation_limit()); 469 heap_->old_generation_allocation_limit());
470 } 470 }
471 471
472 472
473 bool IncrementalMarking::WasActivated() { return was_activated_; } 473 bool IncrementalMarking::WasActivated() { return was_activated_; }
474 474
475 475
476 bool IncrementalMarking::CanBeActivated() { 476 bool IncrementalMarking::CanBeActivated() {
477 #ifndef DEBUG
478 static const intptr_t kActivationThreshold = 8 * MB;
479 #else
480 // TODO(gc) consider setting this to some low level so that some
481 // debug tests run with incremental marking and some without.
482 static const intptr_t kActivationThreshold = 0;
483 #endif
477 // Only start incremental marking in a safe state: 1) when incremental 484 // Only start incremental marking in a safe state: 1) when incremental
478 // marking is turned on, 2) when we are currently not in a GC, and 485 // marking is turned on, 2) when we are currently not in a GC, and
479 // 3) when we are currently not serializing or deserializing the heap. 486 // 3) when we are currently not serializing or deserializing the heap.
480 // Don't switch on for very small heaps. 487 // Don't switch on for very small heaps.
481 return FLAG_incremental_marking && heap_->gc_state() == Heap::NOT_IN_GC && 488 return FLAG_incremental_marking && heap_->gc_state() == Heap::NOT_IN_GC &&
482 heap_->deserialization_complete() && 489 heap_->deserialization_complete() &&
483 !heap_->isolate()->serializer_enabled(); 490 !heap_->isolate()->serializer_enabled() &&
491 heap_->PromotedSpaceSizeOfObjects() > kActivationThreshold;
484 } 492 }
485 493
486 494
487 void IncrementalMarking::ActivateGeneratedStub(Code* stub) { 495 void IncrementalMarking::ActivateGeneratedStub(Code* stub) {
488 DCHECK(RecordWriteStub::GetMode(stub) == RecordWriteStub::STORE_BUFFER_ONLY); 496 DCHECK(RecordWriteStub::GetMode(stub) == RecordWriteStub::STORE_BUFFER_ONLY);
489 497
490 if (!IsMarking()) { 498 if (!IsMarking()) {
491 // Initially stub is generated in STORE_BUFFER_ONLY mode thus 499 // Initially stub is generated in STORE_BUFFER_ONLY mode thus
492 // we don't need to do anything if incremental marking is 500 // we don't need to do anything if incremental marking is
493 // not active. 501 // not active.
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { 1154 void IncrementalMarking::IncrementIdleMarkingDelayCounter() {
1147 idle_marking_delay_counter_++; 1155 idle_marking_delay_counter_++;
1148 } 1156 }
1149 1157
1150 1158
1151 void IncrementalMarking::ClearIdleMarkingDelayCounter() { 1159 void IncrementalMarking::ClearIdleMarkingDelayCounter() {
1152 idle_marking_delay_counter_ = 0; 1160 idle_marking_delay_counter_ = 0;
1153 } 1161 }
1154 } // namespace internal 1162 } // namespace internal
1155 } // namespace v8 1163 } // namespace v8
OLDNEW
« 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