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 4293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4304 heap_state.can_start_incremental_marking = | 4304 heap_state.can_start_incremental_marking = |
4305 incremental_marking()->ShouldActivate(); | 4305 incremental_marking()->ShouldActivate(); |
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.used_new_space_size = new_space_.Size(); |
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 = | 4316 heap_state.new_space_allocation_throughput_in_bytes_per_ms = |
4317 static_cast<size_t>( | 4317 static_cast<size_t>( |
4318 tracer()->NewSpaceAllocationThroughputInBytesPerMillisecond()); | 4318 tracer()->NewSpaceAllocationThroughputInBytesPerMillisecond()); |
4319 | 4319 |
4320 GCIdleTimeAction action = | 4320 GCIdleTimeAction action = |
4321 gc_idle_time_handler_.Compute(idle_time_in_ms, heap_state); | 4321 gc_idle_time_handler_.Compute(idle_time_in_ms, heap_state); |
4322 | 4322 |
4323 bool result = false; | 4323 bool result = false; |
4324 switch (action.type) { | 4324 switch (action.type) { |
(...skipping 1816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6141 static_cast<int>(object_sizes_last_time_[index])); | 6141 static_cast<int>(object_sizes_last_time_[index])); |
6142 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6142 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6143 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6143 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6144 | 6144 |
6145 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6145 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6146 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6146 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6147 ClearObjectStats(); | 6147 ClearObjectStats(); |
6148 } | 6148 } |
6149 } | 6149 } |
6150 } // namespace v8::internal | 6150 } // namespace v8::internal |
OLD | NEW |