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 4295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4306 heap_state.sweeping_in_progress = | 4306 heap_state.sweeping_in_progress = |
4307 mark_compact_collector()->sweeping_in_progress(); | 4307 mark_compact_collector()->sweeping_in_progress(); |
4308 heap_state.mark_compact_speed_in_bytes_per_ms = | 4308 heap_state.mark_compact_speed_in_bytes_per_ms = |
4309 static_cast<size_t>(tracer()->MarkCompactSpeedInBytesPerMillisecond()); | 4309 static_cast<size_t>(tracer()->MarkCompactSpeedInBytesPerMillisecond()); |
4310 heap_state.incremental_marking_speed_in_bytes_per_ms = static_cast<size_t>( | 4310 heap_state.incremental_marking_speed_in_bytes_per_ms = static_cast<size_t>( |
4311 tracer()->IncrementalMarkingSpeedInBytesPerMillisecond()); | 4311 tracer()->IncrementalMarkingSpeedInBytesPerMillisecond()); |
4312 heap_state.scavenge_speed_in_bytes_per_ms = | 4312 heap_state.scavenge_speed_in_bytes_per_ms = |
4313 static_cast<size_t>(tracer()->ScavengeSpeedInBytesPerMillisecond()); | 4313 static_cast<size_t>(tracer()->ScavengeSpeedInBytesPerMillisecond()); |
4314 heap_state.available_new_space_memory = new_space_.Available(); | 4314 heap_state.available_new_space_memory = new_space_.Available(); |
4315 heap_state.new_space_capacity = new_space_.Capacity(); | 4315 heap_state.new_space_capacity = new_space_.Capacity(); |
| 4316 heap_state.new_space_allocation_throughput_in_bytes_per_ms = |
| 4317 static_cast<size_t>( |
| 4318 tracer()->NewSpaceAllocationThroughputInBytesPerMillisecond()); |
4316 | 4319 |
4317 GCIdleTimeAction action = | 4320 GCIdleTimeAction action = |
4318 gc_idle_time_handler_.Compute(idle_time_in_ms, heap_state); | 4321 gc_idle_time_handler_.Compute(idle_time_in_ms, heap_state); |
4319 | 4322 |
4320 bool result = false; | 4323 bool result = false; |
4321 switch (action.type) { | 4324 switch (action.type) { |
4322 case DONE: | 4325 case DONE: |
4323 result = true; | 4326 result = true; |
4324 break; | 4327 break; |
4325 case DO_INCREMENTAL_MARKING: | 4328 case DO_INCREMENTAL_MARKING: |
(...skipping 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6138 static_cast<int>(object_sizes_last_time_[index])); | 6141 static_cast<int>(object_sizes_last_time_[index])); |
6139 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6142 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6140 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6143 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6141 | 6144 |
6142 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6145 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6143 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6146 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6144 ClearObjectStats(); | 6147 ClearObjectStats(); |
6145 } | 6148 } |
6146 } | 6149 } |
6147 } // namespace v8::internal | 6150 } // namespace v8::internal |
OLD | NEW |