| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/base/platform/platform.h" | 8 #include "src/base/platform/platform.h" |
| 9 #include "src/full-codegen.h" | 9 #include "src/full-codegen.h" |
| 10 #include "src/heap/mark-compact.h" | 10 #include "src/heap/mark-compact.h" |
| (...skipping 2773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2784 DCHECK(code->instruction_start() <= prev_pc && | 2784 DCHECK(code->instruction_start() <= prev_pc && |
| 2785 prev_pc <= code->instruction_end()); | 2785 prev_pc <= code->instruction_end()); |
| 2786 delta += static_cast<int>(code->instruction_end() - prev_pc); | 2786 delta += static_cast<int>(code->instruction_end() - prev_pc); |
| 2787 EnterComment(isolate, "NoComment", delta); | 2787 EnterComment(isolate, "NoComment", delta); |
| 2788 } | 2788 } |
| 2789 } | 2789 } |
| 2790 } | 2790 } |
| 2791 | 2791 |
| 2792 | 2792 |
| 2793 void PagedSpace::ReportStatistics() { | 2793 void PagedSpace::ReportStatistics() { |
| 2794 int pct = static_cast<int>(Available() * 100 / Capacity()); | 2794 int pct = Capacity() > 0 ? static_cast<int>(Available() * 100 / Capacity()) |
| 2795 : 0; |
| 2795 PrintF(" capacity: %" V8_PTR_PREFIX | 2796 PrintF(" capacity: %" V8_PTR_PREFIX |
| 2796 "d" | 2797 "d" |
| 2797 ", waste: %" V8_PTR_PREFIX | 2798 ", waste: %" V8_PTR_PREFIX |
| 2798 "d" | 2799 "d" |
| 2799 ", available: %" V8_PTR_PREFIX "d, %%%d\n", | 2800 ", available: %" V8_PTR_PREFIX "d, %%%d\n", |
| 2800 Capacity(), Waste(), Available(), pct); | 2801 Capacity(), Waste(), Available(), pct); |
| 2801 | 2802 |
| 2802 if (heap()->mark_compact_collector()->sweeping_in_progress()) { | 2803 if (heap()->mark_compact_collector()->sweeping_in_progress()) { |
| 2803 heap()->mark_compact_collector()->EnsureSweepingCompleted(); | 2804 heap()->mark_compact_collector()->EnsureSweepingCompleted(); |
| 2804 } | 2805 } |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3166 object->ShortPrint(); | 3167 object->ShortPrint(); |
| 3167 PrintF("\n"); | 3168 PrintF("\n"); |
| 3168 } | 3169 } |
| 3169 printf(" --------------------------------------\n"); | 3170 printf(" --------------------------------------\n"); |
| 3170 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3171 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
| 3171 } | 3172 } |
| 3172 | 3173 |
| 3173 #endif // DEBUG | 3174 #endif // DEBUG |
| 3174 } | 3175 } |
| 3175 } // namespace v8::internal | 3176 } // namespace v8::internal |
| OLD | NEW |