OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 5823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5834 | 5834 |
5835 #ifdef VERIFY_HEAP | 5835 #ifdef VERIFY_HEAP |
5836 void Heap::Verify() { | 5836 void Heap::Verify() { |
5837 CHECK(HasBeenSetUp()); | 5837 CHECK(HasBeenSetUp()); |
5838 | 5838 |
5839 store_buffer()->Verify(); | 5839 store_buffer()->Verify(); |
5840 | 5840 |
5841 VerifyPointersVisitor visitor; | 5841 VerifyPointersVisitor visitor; |
5842 IterateRoots(&visitor, VISIT_ONLY_STRONG); | 5842 IterateRoots(&visitor, VISIT_ONLY_STRONG); |
5843 | 5843 |
| 5844 VerifySmisVisitor smis_visitor; |
| 5845 IterateRootSmis(&smis_visitor); |
| 5846 |
5844 new_space_.Verify(); | 5847 new_space_.Verify(); |
5845 | 5848 |
5846 old_pointer_space_->Verify(&visitor); | 5849 old_pointer_space_->Verify(&visitor); |
5847 map_space_->Verify(&visitor); | 5850 map_space_->Verify(&visitor); |
5848 | 5851 |
5849 VerifyPointersVisitor no_dirty_regions_visitor; | 5852 VerifyPointersVisitor no_dirty_regions_visitor; |
5850 old_data_space_->Verify(&no_dirty_regions_visitor); | 5853 old_data_space_->Verify(&no_dirty_regions_visitor); |
5851 code_space_->Verify(&no_dirty_regions_visitor); | 5854 code_space_->Verify(&no_dirty_regions_visitor); |
5852 cell_space_->Verify(&no_dirty_regions_visitor); | 5855 cell_space_->Verify(&no_dirty_regions_visitor); |
5853 property_cell_space_->Verify(&no_dirty_regions_visitor); | 5856 property_cell_space_->Verify(&no_dirty_regions_visitor); |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6131 v->Synchronize(VisitorSynchronization::kStringTable); | 6134 v->Synchronize(VisitorSynchronization::kStringTable); |
6132 if (mode != VISIT_ALL_IN_SCAVENGE && | 6135 if (mode != VISIT_ALL_IN_SCAVENGE && |
6133 mode != VISIT_ALL_IN_SWEEP_NEWSPACE) { | 6136 mode != VISIT_ALL_IN_SWEEP_NEWSPACE) { |
6134 // Scavenge collections have special processing for this. | 6137 // Scavenge collections have special processing for this. |
6135 external_string_table_.Iterate(v); | 6138 external_string_table_.Iterate(v); |
6136 } | 6139 } |
6137 v->Synchronize(VisitorSynchronization::kExternalStringsTable); | 6140 v->Synchronize(VisitorSynchronization::kExternalStringsTable); |
6138 } | 6141 } |
6139 | 6142 |
6140 | 6143 |
| 6144 void Heap::IterateRootSmis(ObjectVisitor* v) { |
| 6145 v->VisitPointers(&roots_[kRootSmisStart], &roots_[kRootListLength]); |
| 6146 v->Synchronize(VisitorSynchronization::kRootSmisList); |
| 6147 } |
| 6148 |
| 6149 |
6141 void Heap::IterateStrongRoots(ObjectVisitor* v, VisitMode mode) { | 6150 void Heap::IterateStrongRoots(ObjectVisitor* v, VisitMode mode) { |
6142 v->VisitPointers(&roots_[0], &roots_[kStrongRootListLength]); | 6151 v->VisitPointers(&roots_[0], &roots_[kStrongRootListLength]); |
6143 v->Synchronize(VisitorSynchronization::kStrongRootList); | 6152 v->Synchronize(VisitorSynchronization::kStrongRootList); |
6144 | 6153 |
6145 v->VisitPointer(BitCast<Object**>(&hidden_string_)); | 6154 v->VisitPointer(BitCast<Object**>(&hidden_string_)); |
6146 v->Synchronize(VisitorSynchronization::kInternalizedString); | 6155 v->Synchronize(VisitorSynchronization::kInternalizedString); |
6147 | 6156 |
6148 isolate_->bootstrapper()->Iterate(v); | 6157 isolate_->bootstrapper()->Iterate(v); |
6149 v->Synchronize(VisitorSynchronization::kBootstrapper); | 6158 v->Synchronize(VisitorSynchronization::kBootstrapper); |
6150 isolate_->Iterate(v); | 6159 isolate_->Iterate(v); |
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7720 static_cast<int>(object_sizes_last_time_[index])); | 7729 static_cast<int>(object_sizes_last_time_[index])); |
7721 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 7730 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
7722 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7731 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
7723 | 7732 |
7724 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7733 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
7725 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7734 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
7726 ClearObjectStats(); | 7735 ClearObjectStats(); |
7727 } | 7736 } |
7728 | 7737 |
7729 } } // namespace v8::internal | 7738 } } // namespace v8::internal |
OLD | NEW |