| 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 5638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5649 PrintF("Handles:\n"); | 5649 PrintF("Handles:\n"); |
| 5650 PrintHandleVisitor v; | 5650 PrintHandleVisitor v; |
| 5651 isolate_->handle_scope_implementer()->Iterate(&v); | 5651 isolate_->handle_scope_implementer()->Iterate(&v); |
| 5652 } | 5652 } |
| 5653 | 5653 |
| 5654 #endif | 5654 #endif |
| 5655 | 5655 |
| 5656 class CheckHandleCountVisitor : public ObjectVisitor { | 5656 class CheckHandleCountVisitor : public ObjectVisitor { |
| 5657 public: | 5657 public: |
| 5658 CheckHandleCountVisitor() : handle_count_(0) {} | 5658 CheckHandleCountVisitor() : handle_count_(0) {} |
| 5659 ~CheckHandleCountVisitor() { CHECK(handle_count_ < 1000); } | 5659 ~CheckHandleCountVisitor() { CHECK(handle_count_ < 2000); } |
| 5660 void VisitPointers(Object** start, Object** end) { | 5660 void VisitPointers(Object** start, Object** end) { |
| 5661 handle_count_ += end - start; | 5661 handle_count_ += end - start; |
| 5662 } | 5662 } |
| 5663 | 5663 |
| 5664 private: | 5664 private: |
| 5665 ptrdiff_t handle_count_; | 5665 ptrdiff_t handle_count_; |
| 5666 }; | 5666 }; |
| 5667 | 5667 |
| 5668 | 5668 |
| 5669 void Heap::CheckHandleCount() { | 5669 void Heap::CheckHandleCount() { |
| (...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6416 static_cast<int>(object_sizes_last_time_[index])); | 6416 static_cast<int>(object_sizes_last_time_[index])); |
| 6417 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6417 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 6418 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6418 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 6419 | 6419 |
| 6420 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6420 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 6421 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6421 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 6422 ClearObjectStats(); | 6422 ClearObjectStats(); |
| 6423 } | 6423 } |
| 6424 } | 6424 } |
| 6425 } // namespace v8::internal | 6425 } // namespace v8::internal |
| OLD | NEW |