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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 | 380 |
381 LargePage* lop = heap_->lo_space()->first_page(); | 381 LargePage* lop = heap_->lo_space()->first_page(); |
382 while (lop->is_valid()) { | 382 while (lop->is_valid()) { |
383 SetOldSpacePageFlags(lop, true, is_compacting_); | 383 SetOldSpacePageFlags(lop, true, is_compacting_); |
384 lop = lop->next_page(); | 384 lop = lop->next_page(); |
385 } | 385 } |
386 } | 386 } |
387 | 387 |
388 | 388 |
389 bool IncrementalMarking::ShouldActivate() { | 389 bool IncrementalMarking::ShouldActivate() { |
390 return WorthActivating() && heap_->NextGCIsLikelyToBeFull(); | 390 return WorthActivating() && |
| 391 heap_->NextGCIsLikelyToBeFull( |
| 392 heap_->old_generation_allocation_limit()); |
391 } | 393 } |
392 | 394 |
393 | 395 |
394 bool IncrementalMarking::WasActivated() { return was_activated_; } | 396 bool IncrementalMarking::WasActivated() { return was_activated_; } |
395 | 397 |
396 | 398 |
397 bool IncrementalMarking::WorthActivating() { | 399 bool IncrementalMarking::WorthActivating() { |
398 #ifndef DEBUG | 400 #ifndef DEBUG |
399 static const intptr_t kActivationThreshold = 8 * MB; | 401 static const intptr_t kActivationThreshold = 8 * MB; |
400 #else | 402 #else |
(...skipping 602 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 |