| 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.h" | 8 #include "src/heap/heap-inl.h" |
| 9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
| 10 #include "src/objects-inl.h" // TODO(mstarzinger): Temporary cycle breaker! | |
| 11 | 10 |
| 12 namespace v8 { | 11 namespace v8 { |
| 13 namespace internal { | 12 namespace internal { |
| 14 | 13 |
| 15 static intptr_t CountTotalHolesSize(Heap* heap) { | 14 static intptr_t CountTotalHolesSize(Heap* heap) { |
| 16 intptr_t holes_size = 0; | 15 intptr_t holes_size = 0; |
| 17 OldSpaces spaces(heap); | 16 OldSpaces spaces(heap); |
| 18 for (OldSpace* space = spaces.next(); space != NULL; space = spaces.next()) { | 17 for (OldSpace* space = spaces.next(); space != NULL; space = spaces.next()) { |
| 19 holes_size += space->Waste() + space->Available(); | 18 holes_size += space->Waste() + space->Available(); |
| 20 } | 19 } |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 | 745 |
| 747 | 746 |
| 748 bool GCTracer::SurvivalEventsRecorded() const { | 747 bool GCTracer::SurvivalEventsRecorded() const { |
| 749 return survival_events_.size() > 0; | 748 return survival_events_.size() > 0; |
| 750 } | 749 } |
| 751 | 750 |
| 752 | 751 |
| 753 void GCTracer::ResetSurvivalEvents() { survival_events_.reset(); } | 752 void GCTracer::ResetSurvivalEvents() { survival_events_.reset(); } |
| 754 } // namespace internal | 753 } // namespace internal |
| 755 } // namespace v8 | 754 } // namespace v8 |
| OLD | NEW |