| 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/once.h" | 9 #include "src/base/once.h" |
| 10 #include "src/base/utils/random-number-generator.h" | 10 #include "src/base/utils/random-number-generator.h" |
| (...skipping 4506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4517 } | 4517 } |
| 4518 | 4518 |
| 4519 | 4519 |
| 4520 #ifdef VERIFY_HEAP | 4520 #ifdef VERIFY_HEAP |
| 4521 void Heap::Verify() { | 4521 void Heap::Verify() { |
| 4522 CHECK(HasBeenSetUp()); | 4522 CHECK(HasBeenSetUp()); |
| 4523 HandleScope scope(isolate()); | 4523 HandleScope scope(isolate()); |
| 4524 | 4524 |
| 4525 store_buffer()->Verify(); | 4525 store_buffer()->Verify(); |
| 4526 | 4526 |
| 4527 if (mark_compact_collector()->sweeping_in_progress()) { |
| 4528 // We have to wait here for the sweeper threads to have an iterable heap. |
| 4529 mark_compact_collector()->EnsureSweepingCompleted(); |
| 4530 } |
| 4531 |
| 4527 VerifyPointersVisitor visitor; | 4532 VerifyPointersVisitor visitor; |
| 4528 IterateRoots(&visitor, VISIT_ONLY_STRONG); | 4533 IterateRoots(&visitor, VISIT_ONLY_STRONG); |
| 4529 | 4534 |
| 4530 VerifySmisVisitor smis_visitor; | 4535 VerifySmisVisitor smis_visitor; |
| 4531 IterateSmiRoots(&smis_visitor); | 4536 IterateSmiRoots(&smis_visitor); |
| 4532 | 4537 |
| 4533 new_space_.Verify(); | 4538 new_space_.Verify(); |
| 4534 | 4539 |
| 4535 old_pointer_space_->Verify(&visitor); | 4540 old_pointer_space_->Verify(&visitor); |
| 4536 map_space_->Verify(&visitor); | 4541 map_space_->Verify(&visitor); |
| (...skipping 1903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6440 static_cast<int>(object_sizes_last_time_[index])); | 6445 static_cast<int>(object_sizes_last_time_[index])); |
| 6441 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6446 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 6442 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6447 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 6443 | 6448 |
| 6444 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6449 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 6445 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6450 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 6446 ClearObjectStats(); | 6451 ClearObjectStats(); |
| 6447 } | 6452 } |
| 6448 | 6453 |
| 6449 } } // namespace v8::internal | 6454 } } // namespace v8::internal |
| OLD | NEW |