| 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 4375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4386 | 4386 |
| 4387 | 4387 |
| 4388 void Heap::TryFinalizeIdleIncrementalMarking( | 4388 void Heap::TryFinalizeIdleIncrementalMarking( |
| 4389 size_t idle_time_in_ms, size_t size_of_objects, | 4389 size_t idle_time_in_ms, size_t size_of_objects, |
| 4390 size_t mark_compact_speed_in_bytes_per_ms) { | 4390 size_t mark_compact_speed_in_bytes_per_ms) { |
| 4391 if (incremental_marking()->IsComplete() || | 4391 if (incremental_marking()->IsComplete() || |
| 4392 (mark_compact_collector()->IsMarkingDequeEmpty() && | 4392 (mark_compact_collector()->IsMarkingDequeEmpty() && |
| 4393 gc_idle_time_handler_.ShouldDoMarkCompact( | 4393 gc_idle_time_handler_.ShouldDoMarkCompact( |
| 4394 idle_time_in_ms, size_of_objects, | 4394 idle_time_in_ms, size_of_objects, |
| 4395 mark_compact_speed_in_bytes_per_ms))) { | 4395 mark_compact_speed_in_bytes_per_ms))) { |
| 4396 IdleMarkCompact("idle notification: finalize incremental"); | 4396 CollectAllGarbage(kNoGCFlags, "idle notification: finalize incremental"); |
| 4397 } | 4397 } |
| 4398 } | 4398 } |
| 4399 | 4399 |
| 4400 | 4400 |
| 4401 bool Heap::WorthActivatingIncrementalMarking() { | 4401 bool Heap::WorthActivatingIncrementalMarking() { |
| 4402 return incremental_marking()->IsStopped() && | 4402 return incremental_marking()->IsStopped() && |
| 4403 incremental_marking()->WorthActivating() && NextGCIsLikelyToBeFull(); | 4403 incremental_marking()->WorthActivating() && NextGCIsLikelyToBeFull(); |
| 4404 } | 4404 } |
| 4405 | 4405 |
| 4406 | 4406 |
| (...skipping 1918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6325 static_cast<int>(object_sizes_last_time_[index])); | 6325 static_cast<int>(object_sizes_last_time_[index])); |
| 6326 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6326 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 6327 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6327 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 6328 | 6328 |
| 6329 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6329 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 6330 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6330 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 6331 ClearObjectStats(); | 6331 ClearObjectStats(); |
| 6332 } | 6332 } |
| 6333 } | 6333 } |
| 6334 } // namespace v8::internal | 6334 } // namespace v8::internal |
| OLD | NEW |