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/heap/heap.h" | 5 #include "src/heap/heap.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 4071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4082 } | 4082 } |
4083 return false; | 4083 return false; |
4084 } | 4084 } |
4085 | 4085 |
4086 | 4086 |
4087 GCIdleTimeHeapState Heap::ComputeHeapState() { | 4087 GCIdleTimeHeapState Heap::ComputeHeapState() { |
4088 GCIdleTimeHeapState heap_state; | 4088 GCIdleTimeHeapState heap_state; |
4089 heap_state.contexts_disposed = contexts_disposed_; | 4089 heap_state.contexts_disposed = contexts_disposed_; |
4090 heap_state.contexts_disposal_rate = | 4090 heap_state.contexts_disposal_rate = |
4091 tracer()->ContextDisposalRateInMilliseconds(); | 4091 tracer()->ContextDisposalRateInMilliseconds(); |
| 4092 heap_state.size_of_objects = static_cast<size_t>(SizeOfObjects()); |
4092 heap_state.incremental_marking_stopped = incremental_marking()->IsStopped(); | 4093 heap_state.incremental_marking_stopped = incremental_marking()->IsStopped(); |
4093 heap_state.mark_compact_speed_in_bytes_per_ms = | |
4094 static_cast<size_t>(tracer()->MarkCompactSpeedInBytesPerMillisecond()); | |
4095 return heap_state; | 4094 return heap_state; |
4096 } | 4095 } |
4097 | 4096 |
4098 | 4097 |
4099 bool Heap::PerformIdleTimeAction(GCIdleTimeAction action, | 4098 bool Heap::PerformIdleTimeAction(GCIdleTimeAction action, |
4100 GCIdleTimeHeapState heap_state, | 4099 GCIdleTimeHeapState heap_state, |
4101 double deadline_in_ms) { | 4100 double deadline_in_ms) { |
4102 bool result = false; | 4101 bool result = false; |
4103 switch (action.type) { | 4102 switch (action.type) { |
4104 case DONE: | 4103 case DONE: |
(...skipping 1992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6097 } | 6096 } |
6098 | 6097 |
6099 | 6098 |
6100 // static | 6099 // static |
6101 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6100 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6102 return StaticVisitorBase::GetVisitorId(map); | 6101 return StaticVisitorBase::GetVisitorId(map); |
6103 } | 6102 } |
6104 | 6103 |
6105 } // namespace internal | 6104 } // namespace internal |
6106 } // namespace v8 | 6105 } // namespace v8 |
OLD | NEW |