| 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/heap/heap.h" | 5 #include "src/heap/heap.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 5667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5678 | 5678 |
| 5679 // Set up the special root array entries containing the stack limits. | 5679 // Set up the special root array entries containing the stack limits. |
| 5680 // These are actually addresses, but the tag makes the GC ignore it. | 5680 // These are actually addresses, but the tag makes the GC ignore it. |
| 5681 roots_[kStackLimitRootIndex] = reinterpret_cast<Object*>( | 5681 roots_[kStackLimitRootIndex] = reinterpret_cast<Object*>( |
| 5682 (isolate_->stack_guard()->jslimit() & ~kSmiTagMask) | kSmiTag); | 5682 (isolate_->stack_guard()->jslimit() & ~kSmiTagMask) | kSmiTag); |
| 5683 roots_[kRealStackLimitRootIndex] = reinterpret_cast<Object*>( | 5683 roots_[kRealStackLimitRootIndex] = reinterpret_cast<Object*>( |
| 5684 (isolate_->stack_guard()->real_jslimit() & ~kSmiTagMask) | kSmiTag); | 5684 (isolate_->stack_guard()->real_jslimit() & ~kSmiTagMask) | kSmiTag); |
| 5685 } | 5685 } |
| 5686 | 5686 |
| 5687 | 5687 |
| 5688 void Heap::PrintAlloctionsHash() { |
| 5689 uint32_t hash = StringHasher::GetHashCore(raw_allocations_hash_); |
| 5690 PrintF("\n### Allocations = %u, hash = 0x%08x\n", allocations_count(), hash); |
| 5691 } |
| 5692 |
| 5693 |
| 5688 void Heap::NotifyDeserializationComplete() { | 5694 void Heap::NotifyDeserializationComplete() { |
| 5689 deserialization_complete_ = true; | 5695 deserialization_complete_ = true; |
| 5690 #ifdef DEBUG | 5696 #ifdef DEBUG |
| 5691 // All pages right after bootstrapping must be marked as never-evacuate. | 5697 // All pages right after bootstrapping must be marked as never-evacuate. |
| 5692 PagedSpaces spaces(this); | 5698 PagedSpaces spaces(this); |
| 5693 for (PagedSpace* s = spaces.next(); s != NULL; s = spaces.next()) { | 5699 for (PagedSpace* s = spaces.next(); s != NULL; s = spaces.next()) { |
| 5694 PageIterator it(s); | 5700 PageIterator it(s); |
| 5695 while (it.has_next()) CHECK(it.next()->NeverEvacuate()); | 5701 while (it.has_next()) CHECK(it.next()->NeverEvacuate()); |
| 5696 } | 5702 } |
| 5697 #endif // DEBUG | 5703 #endif // DEBUG |
| (...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6770 *object_type = "CODE_TYPE"; \ | 6776 *object_type = "CODE_TYPE"; \ |
| 6771 *object_sub_type = "CODE_AGE/" #name; \ | 6777 *object_sub_type = "CODE_AGE/" #name; \ |
| 6772 return true; | 6778 return true; |
| 6773 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6779 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
| 6774 #undef COMPARE_AND_RETURN_NAME | 6780 #undef COMPARE_AND_RETURN_NAME |
| 6775 } | 6781 } |
| 6776 return false; | 6782 return false; |
| 6777 } | 6783 } |
| 6778 } // namespace internal | 6784 } // namespace internal |
| 6779 } // namespace v8 | 6785 } // namespace v8 |
| OLD | NEW |