Chromium Code Reviews| 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/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
| (...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 820 | 820 |
| 821 if (collector == MARK_COMPACTOR && | 821 if (collector == MARK_COMPACTOR && |
| 822 !mark_compact_collector()->abort_incremental_marking() && | 822 !mark_compact_collector()->abort_incremental_marking() && |
| 823 !incremental_marking()->IsStopped() && | 823 !incremental_marking()->IsStopped() && |
| 824 !incremental_marking()->should_hurry() && | 824 !incremental_marking()->should_hurry() && |
| 825 FLAG_incremental_marking_steps) { | 825 FLAG_incremental_marking_steps) { |
| 826 // Make progress in incremental marking. | 826 // Make progress in incremental marking. |
| 827 const intptr_t kStepSizeWhenDelayedByScavenge = 1 * MB; | 827 const intptr_t kStepSizeWhenDelayedByScavenge = 1 * MB; |
| 828 incremental_marking()->Step(kStepSizeWhenDelayedByScavenge, | 828 incremental_marking()->Step(kStepSizeWhenDelayedByScavenge, |
| 829 IncrementalMarking::NO_GC_VIA_STACK_GUARD); | 829 IncrementalMarking::NO_GC_VIA_STACK_GUARD); |
| 830 if (!incremental_marking()->IsComplete() && !FLAG_gc_global) { | 830 if (!incremental_marking()->IsComplete() && |
| 831 !mark_compact_collector_.marking_deque_.IsEmpty() && !FLAG_gc_global) { | |
|
jochen (gone - plz use gerrit)
2015/01/26 14:09:01
should this check for overflow as well?
Hannes Payer (out of office)
2015/01/26 14:52:45
An overflowed marking deque will be full.
| |
| 831 if (FLAG_trace_incremental_marking) { | 832 if (FLAG_trace_incremental_marking) { |
| 832 PrintF("[IncrementalMarking] Delaying MarkSweep.\n"); | 833 PrintF("[IncrementalMarking] Delaying MarkSweep.\n"); |
| 833 } | 834 } |
| 834 collector = SCAVENGER; | 835 collector = SCAVENGER; |
| 835 collector_reason = "incremental marking delaying mark-sweep"; | 836 collector_reason = "incremental marking delaying mark-sweep"; |
| 836 } | 837 } |
| 837 } | 838 } |
| 838 | 839 |
| 839 bool next_gc_likely_to_collect_more = false; | 840 bool next_gc_likely_to_collect_more = false; |
| 840 | 841 |
| (...skipping 5597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6438 static_cast<int>(object_sizes_last_time_[index])); | 6439 static_cast<int>(object_sizes_last_time_[index])); |
| 6439 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6440 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 6440 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6441 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 6441 | 6442 |
| 6442 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6443 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 6443 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6444 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 6444 ClearObjectStats(); | 6445 ClearObjectStats(); |
| 6445 } | 6446 } |
| 6446 } | 6447 } |
| 6447 } // namespace v8::internal | 6448 } // namespace v8::internal |
| OLD | NEW |