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 4592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4603 isolate_->counters()->gc_idle_notification()); | 4603 isolate_->counters()->gc_idle_notification()); |
4604 | 4604 |
4605 GCIdleTimeHandler::HeapState heap_state; | 4605 GCIdleTimeHandler::HeapState heap_state; |
4606 heap_state.contexts_disposed = contexts_disposed_; | 4606 heap_state.contexts_disposed = contexts_disposed_; |
4607 heap_state.contexts_disposal_rate = | 4607 heap_state.contexts_disposal_rate = |
4608 tracer()->ContextDisposalRateInMilliseconds(); | 4608 tracer()->ContextDisposalRateInMilliseconds(); |
4609 heap_state.size_of_objects = static_cast<size_t>(SizeOfObjects()); | 4609 heap_state.size_of_objects = static_cast<size_t>(SizeOfObjects()); |
4610 heap_state.incremental_marking_stopped = incremental_marking()->IsStopped(); | 4610 heap_state.incremental_marking_stopped = incremental_marking()->IsStopped(); |
4611 // TODO(ulan): Start incremental marking only for large heaps. | 4611 // TODO(ulan): Start incremental marking only for large heaps. |
4612 heap_state.can_start_incremental_marking = | 4612 heap_state.can_start_incremental_marking = |
4613 incremental_marking()->ShouldActivate() && FLAG_incremental_marking; | 4613 incremental_marking()->ShouldActivate() && FLAG_incremental_marking && |
| 4614 !mark_compact_collector()->sweeping_in_progress(); |
4614 heap_state.sweeping_in_progress = | 4615 heap_state.sweeping_in_progress = |
4615 mark_compact_collector()->sweeping_in_progress(); | 4616 mark_compact_collector()->sweeping_in_progress(); |
4616 heap_state.mark_compact_speed_in_bytes_per_ms = | 4617 heap_state.mark_compact_speed_in_bytes_per_ms = |
4617 static_cast<size_t>(tracer()->MarkCompactSpeedInBytesPerMillisecond()); | 4618 static_cast<size_t>(tracer()->MarkCompactSpeedInBytesPerMillisecond()); |
4618 heap_state.incremental_marking_speed_in_bytes_per_ms = static_cast<size_t>( | 4619 heap_state.incremental_marking_speed_in_bytes_per_ms = static_cast<size_t>( |
4619 tracer()->IncrementalMarkingSpeedInBytesPerMillisecond()); | 4620 tracer()->IncrementalMarkingSpeedInBytesPerMillisecond()); |
4620 heap_state.final_incremental_mark_compact_speed_in_bytes_per_ms = | 4621 heap_state.final_incremental_mark_compact_speed_in_bytes_per_ms = |
4621 static_cast<size_t>( | 4622 static_cast<size_t>( |
4622 tracer()->FinalIncrementalMarkCompactSpeedInBytesPerMillisecond()); | 4623 tracer()->FinalIncrementalMarkCompactSpeedInBytesPerMillisecond()); |
4623 heap_state.scavenge_speed_in_bytes_per_ms = | 4624 heap_state.scavenge_speed_in_bytes_per_ms = |
(...skipping 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6390 static_cast<int>(object_sizes_last_time_[index])); | 6391 static_cast<int>(object_sizes_last_time_[index])); |
6391 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6392 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6392 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6393 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6393 | 6394 |
6394 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6395 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6395 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6396 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6396 ClearObjectStats(); | 6397 ClearObjectStats(); |
6397 } | 6398 } |
6398 } | 6399 } |
6399 } // namespace v8::internal | 6400 } // namespace v8::internal |
OLD | NEW |