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 4566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4577 if (uncommit) { | 4577 if (uncommit) { |
4578 new_space_.Shrink(); | 4578 new_space_.Shrink(); |
4579 UncommitFromSpace(); | 4579 UncommitFromSpace(); |
4580 } | 4580 } |
4581 } | 4581 } |
4582 | 4582 |
4583 | 4583 |
4584 bool Heap::TryFinalizeIdleIncrementalMarking( | 4584 bool Heap::TryFinalizeIdleIncrementalMarking( |
4585 double idle_time_in_ms, size_t size_of_objects, | 4585 double idle_time_in_ms, size_t size_of_objects, |
4586 size_t final_incremental_mark_compact_speed_in_bytes_per_ms) { | 4586 size_t final_incremental_mark_compact_speed_in_bytes_per_ms) { |
4587 if (incremental_marking()->IsComplete() || | 4587 if ((incremental_marking()->request_type() == |
4588 (mark_compact_collector_.marking_deque()->IsEmpty() && | 4588 IncrementalMarking::OVERAPPROXIMATION) || |
Hannes Payer (out of office)
2015/03/16 12:35:15
Similarly to the else if case, can we have an IsOv
jochen (gone - plz use gerrit)
2015/03/16 13:59:30
done
| |
4589 gc_idle_time_handler_.ShouldDoFinalIncrementalMarkCompact( | 4589 (FLAG_overapproximate_weak_closure && |
4590 static_cast<size_t>(idle_time_in_ms), size_of_objects, | 4590 mark_compact_collector_.marking_deque()->IsEmpty() && |
4591 final_incremental_mark_compact_speed_in_bytes_per_ms))) { | 4591 gc_idle_time_handler_.ShouldDoOverApproximateWeakClosure( |
4592 static_cast<size_t>(idle_time_in_ms)))) { | |
4593 OverApproximateWeakClosure( | |
4594 "Idle notification: overapproximate weak closure"); | |
4595 return true; | |
4596 } else if (incremental_marking()->IsComplete() || | |
4597 (mark_compact_collector_.marking_deque()->IsEmpty() && | |
4598 gc_idle_time_handler_.ShouldDoFinalIncrementalMarkCompact( | |
4599 static_cast<size_t>(idle_time_in_ms), size_of_objects, | |
4600 final_incremental_mark_compact_speed_in_bytes_per_ms))) { | |
4592 CollectAllGarbage(kNoGCFlags, "idle notification: finalize incremental"); | 4601 CollectAllGarbage(kNoGCFlags, "idle notification: finalize incremental"); |
4593 return true; | 4602 return true; |
4594 } | 4603 } |
4595 return false; | 4604 return false; |
4596 } | 4605 } |
4597 | 4606 |
4598 | 4607 |
4599 bool Heap::WorthActivatingIncrementalMarking() { | 4608 bool Heap::WorthActivatingIncrementalMarking() { |
4600 return incremental_marking()->IsStopped() && | 4609 return incremental_marking()->IsStopped() && |
4601 incremental_marking()->WorthActivating() && NextGCIsLikelyToBeFull(); | 4610 incremental_marking()->WorthActivating() && NextGCIsLikelyToBeFull(); |
(...skipping 1976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6578 static_cast<int>(object_sizes_last_time_[index])); | 6587 static_cast<int>(object_sizes_last_time_[index])); |
6579 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6588 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6580 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6589 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6581 | 6590 |
6582 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6591 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6583 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6592 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6584 ClearObjectStats(); | 6593 ClearObjectStats(); |
6585 } | 6594 } |
6586 } | 6595 } |
6587 } // namespace v8::internal | 6596 } // namespace v8::internal |
OLD | NEW |