| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/gc-tracer.h" | 5 #include "src/heap/gc-tracer.h" |
| 6 | 6 |
| 7 #include "src/counters.h" | 7 #include "src/counters.h" |
| 8 #include "src/heap/heap-inl.h" | 8 #include "src/heap/heap-inl.h" |
| 9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
| 10 | 10 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 current_ = Event(Event::MARK_COMPACTOR, gc_reason, collector_reason); | 167 current_ = Event(Event::MARK_COMPACTOR, gc_reason, collector_reason); |
| 168 } | 168 } |
| 169 break; | 169 break; |
| 170 } | 170 } |
| 171 | 171 |
| 172 current_.reduce_memory = heap_->ShouldReduceMemory(); | 172 current_.reduce_memory = heap_->ShouldReduceMemory(); |
| 173 current_.start_time = start_time; | 173 current_.start_time = start_time; |
| 174 current_.start_object_size = heap_->SizeOfObjects(); | 174 current_.start_object_size = heap_->SizeOfObjects(); |
| 175 current_.start_memory_size = heap_->memory_allocator()->Size(); | 175 current_.start_memory_size = heap_->memory_allocator()->Size(); |
| 176 current_.start_holes_size = CountTotalHolesSize(heap_); | 176 current_.start_holes_size = CountTotalHolesSize(heap_); |
| 177 current_.new_space_object_size = | 177 current_.new_space_object_size = heap_->new_space()->Size(); |
| 178 heap_->new_space()->top() - heap_->new_space()->bottom(); | |
| 179 | 178 |
| 180 current_.incremental_marking_bytes = 0; | 179 current_.incremental_marking_bytes = 0; |
| 181 current_.incremental_marking_duration = 0; | 180 current_.incremental_marking_duration = 0; |
| 182 | 181 |
| 183 for (int i = 0; i < Scope::NUMBER_OF_SCOPES; i++) { | 182 for (int i = 0; i < Scope::NUMBER_OF_SCOPES; i++) { |
| 184 current_.scopes[i] = 0; | 183 current_.scopes[i] = 0; |
| 185 } | 184 } |
| 186 | 185 |
| 187 size_t committed_memory = heap_->CommittedMemory() / KB; | 186 size_t committed_memory = heap_->CommittedMemory() / KB; |
| 188 size_t used_memory = current_.start_object_size / KB; | 187 size_t used_memory = current_.start_object_size / KB; |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 } | 825 } |
| 827 | 826 |
| 828 void GCTracer::ResetSurvivalEvents() { recorded_survival_ratios_.Reset(); } | 827 void GCTracer::ResetSurvivalEvents() { recorded_survival_ratios_.Reset(); } |
| 829 | 828 |
| 830 void GCTracer::NotifyIncrementalMarkingStart() { | 829 void GCTracer::NotifyIncrementalMarkingStart() { |
| 831 incremental_marking_start_time_ = heap_->MonotonicallyIncreasingTimeInMs(); | 830 incremental_marking_start_time_ = heap_->MonotonicallyIncreasingTimeInMs(); |
| 832 } | 831 } |
| 833 | 832 |
| 834 } // namespace internal | 833 } // namespace internal |
| 835 } // namespace v8 | 834 } // namespace v8 |
| OLD | NEW |