| OLD | NEW |
| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/heap/incremental-marking.h" | 7 #include "src/heap/incremental-marking.h" |
| 8 | 8 |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/compilation-cache.h" | 10 #include "src/compilation-cache.h" |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 | 415 |
| 416 LargePage* lop = heap_->lo_space()->first_page(); | 416 LargePage* lop = heap_->lo_space()->first_page(); |
| 417 while (lop->is_valid()) { | 417 while (lop->is_valid()) { |
| 418 SetOldSpacePageFlags(lop, true, is_compacting_); | 418 SetOldSpacePageFlags(lop, true, is_compacting_); |
| 419 lop = lop->next_page(); | 419 lop = lop->next_page(); |
| 420 } | 420 } |
| 421 } | 421 } |
| 422 | 422 |
| 423 | 423 |
| 424 bool IncrementalMarking::ShouldActivate() { | 424 bool IncrementalMarking::ShouldActivate() { |
| 425 return WorthActivating() && heap_->NextGCIsLikelyToBeFull(); | 425 return WorthActivating() && |
| 426 heap_->NextGCIsLikelyToBeFull( |
| 427 heap_->old_generation_allocation_limit()); |
| 426 } | 428 } |
| 427 | 429 |
| 428 | 430 |
| 429 bool IncrementalMarking::WasActivated() { return was_activated_; } | 431 bool IncrementalMarking::WasActivated() { return was_activated_; } |
| 430 | 432 |
| 431 | 433 |
| 432 bool IncrementalMarking::WorthActivating() { | 434 bool IncrementalMarking::WorthActivating() { |
| 433 #ifndef DEBUG | 435 #ifndef DEBUG |
| 434 static const intptr_t kActivationThreshold = 8 * MB; | 436 static const intptr_t kActivationThreshold = 8 * MB; |
| 435 #else | 437 #else |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1005 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
| 1004 idle_marking_delay_counter_++; | 1006 idle_marking_delay_counter_++; |
| 1005 } | 1007 } |
| 1006 | 1008 |
| 1007 | 1009 |
| 1008 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1010 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
| 1009 idle_marking_delay_counter_ = 0; | 1011 idle_marking_delay_counter_ = 0; |
| 1010 } | 1012 } |
| 1011 } | 1013 } |
| 1012 } // namespace v8::internal | 1014 } // namespace v8::internal |
| OLD | NEW |